wejrepus
January 19th, 2008, 09:40 PM
I'm trying to make my main window (a dialog) appear at the default position,
as if passing CW_USEDEFAULT,CW_USEDEFAULT to CreateWindowEx().
Setting the dialog's position to CW_USEDEFAULT had no effect. I
tried changing the dialog-template at runtime, but the problem is that DLGTEMPLATE's x & y fields are both shorts,
while CW_USEDEFAULT is defined as 0x80000000 - a DWORD. Setting x&y to -1 has no effect either.
So before i resort to hooking CreateWindow\Ex which CreateDialog internally uses,
is there any sane way to achieve this default positioning?
as if passing CW_USEDEFAULT,CW_USEDEFAULT to CreateWindowEx().
Setting the dialog's position to CW_USEDEFAULT had no effect. I
tried changing the dialog-template at runtime, but the problem is that DLGTEMPLATE's x & y fields are both shorts,
while CW_USEDEFAULT is defined as 0x80000000 - a DWORD. Setting x&y to -1 has no effect either.
So before i resort to hooking CreateWindow\Ex which CreateDialog internally uses,
is there any sane way to achieve this default positioning?