As promised, here's the tabular version of the evolution of dialog templates. It doesn't contain any new information, but it may give you a little glimpse into how things evolved to see the small changes highlighted against each other.
|
16-bit classic |
|
32-bit classic |
|
16-bit extended |
32-bit extended |
Header |
style 8-bit item count coordinates |
|
extended style, style 16-bit item count coordinates |
|
help ID, extended style, style 8-bit item count coordinates |
help ID, extended style, style 16-bit item count coordinates |
Menu |
ASCIIZ or ordinal |
|
UNICODEZ or ordinal |
|
ASCIIZ or ordinal |
UNICODEZ or ordinal |
Class |
ASCIIZ or ordinal |
|
UNICODEZ or ordinal |
|
ASCIIZ or ordinal |
UNICODEZ or ordinal |
Caption |
ASCIIZ |
|
UNICODEZ |
|
ASCIIZ |
UNICODEZ |
Font (if DS_SETFONT) |
size ASCIIZ font name |
|
size UNICODEZ font name |
|
size, weight, italic, charset ASCIIZ font name |
size, weight, italic, charset UNICODEZ font name |
Item template alignment |
BYTE |
|
DWORD |
|
BYTE |
DWORD |
Item templates |
size, position 16-bit ID style class, ASCIIZ text/ordinal 8-bit extra data |
|
size, position 16-bit ID extended style, style class, UNICODEZ text/ordinal 16-bit extra data |
|
size, position 32-bit ID help ID, extended style, style class, ASCIIZ text/ordinal 16-bit extra data |
size, position 32-bit ID help ID, extended style, style class, UNICODEZ text/ordinal 16-bit extra data |
|
Sorry to veer off topic (although it is related to dialogs) – perhaps it can be a future topic.
Why do windows use WM_CREATE and dialogs use WM_INITDIALOG?
Why don’t they both use WM_CREATE? Is there some special or subtle difference between the two? Or are they just two independent messages that really could have been just one?
Think about the things you typically do during dialog box initialization – think about when WM_CREATE is sent – do you see the disconnect? If you don’t, you can wait until I discuss dialog boxes in greater detail later this year.
Is there a way to get CW_USEDEFAULT behavior when using a Dialog Template?
I tried 0x8000 in X and Y as well as doing SetWindowPos in WM_INITDIALOG without success.
Regards,
JuanC
No there isn’t. You’ll see why when I go into dialog boxes in greater detail later.