- Status Unconfirmed
- Percent Complete
- 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
FS#292 - Form styles: Code generation error
Style 94C8 0000 generates $WS_SYSMENU,$WS_POPUP. It should generate $WS_POPUPWINDOW, $WS_CAPTION.
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.
I have been trying to understand the oddities of GuiCreate (thanks to Microsoft!)
I am attaching a zip file which contains:
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.
I updated attachment
Further updates are possible. Please ask if any are available.
Sorry I can't delete the first version from this task.
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.
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).
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.
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.
Thanks, even better!
Nope, since every style have unique name. Just need to decide where to place all definitions.
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.
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.