• Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Application
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Development
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Koda
Opened by Chris Haslam - 25.05.2011

FS#292 - Form styles: Code generation error

Style 94C8 0000 generates $WS_SYSMENU,$WS_POPUP. It should generate $WS_POPUPWINDOW, $WS_CAPTION.

Martin Gibson commented on 30.05.2011 16:36

There are some other problems with form styles. I you have WS_CAPTION checked it doesn't mean that you will get that style in the AutoIt code. I find it difficalt to get the form style to include a caption and a border if I don't want the minimize and maximize buttons for example.

Chris Haslam commented on 31.05.2011 04:36

I have been trying to understand the oddities of GuiCreate (thanks to Microsoft!)

I am attaching a zip file which contains:

  • Analysis of Form Styles, a spreadsheet, as a PDF, and the original Quattro Pro file (My Excel doesn't seem to have bitwise operators for cell formulas.
  • Test Form styles.au3, the script I modified many times to provide data for the spreadsheet
  • Styles with Presets suggestion.au3, both a test-bed and a suggestion for a dialog that might replace the Styles and exStyles tabs for Form.
  • Styles with Presets suggestion.kxf: generates GUI code in the .au3 file

I think that Styles with Presets suggestion.au3 is fairly bug-free. Please see the long comment at the start of the file for how I see handling Form styles. This file may be helpful to Lazycat in further developing Koda using Delphi. My approach tells the user what will work, and allows him to see the results of his own experimentation before he clicks on OK.

Chris Haslam commented on 31.05.2011 12:31

I updated attachment

Further updates are possible. Please ask if any are available.

Sorry I can't delete the first version from this task.

Chris Haslam commented on 01.06.2011 16:24

GUI and code have been reorganized and expanded in scope, thanks in part to new discoveries. Please ask for latest version.

The approach is to concede that it is impossible to offer all of the WS and WS_EX constants and ensure that the generated code will work. So Presets are guaranteed to work but the user is also welcome to experiment. The test form that is generated by the dialog shows whether he succeeded or not.

In his experimentation, he will usually not have to search through MSDN to find out what the constants mean because the dialog has checkboxes with brief descriptions rather than constants.

Admin
Admin commented on 09.06.2011 09:05

Great work, Chris! Surely, your "safe" presets can be used as default form presets for Koda.

About descriptions: I already thought before about showing descriptions of styles (short or even extended) when mouse is over styles in editor (now it's show only value). This can be probably done, but need to decide where to keep those descriptions - in current language file or separate one(s).

Chris Haslam commented on 09.06.2011 14:14

Attached is the latest version of my suggestion. I have tested it quite thoroughly, but testing by the author is not the best way! Do read the readme.

For those who love Windows constants (I don't!), there could be an option to show Windows constants rather than descriptions. Some Windows constants seem to do the opposite of what their names indicate!

Localizing looks like a significant issue.

Chris Haslam commented on 09.06.2011 18:10

My script shows the Windows constants as hints, and shows Windows constants in the list boxes.

MSDN's description of some Windows constants is not as clear as it might be (and in a few cases, the requires appears to be wrong.

I am wondering whether the approach I took would also be useful for styles for controls. Mostly the normal styles don't need descriptions (but a few do), but many exStyles which apply to Form also apply to controls.

Admin
Admin commented on 10.06.2011 06:04

Thanks, even better!

Localizing looks like a significant issue.

Nope, since every style have unique name. Just need to decide where to place all definitions.

I am wondering whether the approach I took would also be useful for styles for controls. Mostly the normal styles don't need descriptions (but a few do), but many exStyles which apply to Form also apply to controls.

I'm imagine presets in a bit different way. But since form is most tricky and messed thing, I think is nothing wrong if we will have your dialog as some sort of "Wizard".

But in order to add it for other controls, dialog and it's logic should be generalized.

Chris Haslam commented on 10.06.2011 15:03
But in order to add it for other controls, dialog and its logic should be generalized.

I will think about it. I may start with creating a dialog for a few specific controls, to gain experience and to try to see how to generalize.

I can see my dialog as a kind of Wizard.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing