And if I set the "Overlapped" style on it, it looks like this when I create it at runtime:
But I want this to be a child window so I set the "Child" style on the dialog. However, when I create it at runtime as a child, I get this:
As you can see, the button has decided to move itself down and to the right. This also affects other controls as well as buttons.
The code I'm using to create it is straight forward:
HWND window = CreateDialog(RuntimeEnvironment::ModuleInstance, MAKEINTRESOURCE(dialogResource), mMainWindow, WindowHandler::DialogProcedure); ShowWindow(window , SW_SHOW); RECT dialogSize; GetWindowRect(window , &dialogSize);
Incidentally, the rectangle I get from the dialog is completely wrong too; it's far too big.
Does anyone know of any Windows behaviour that would cause this to occur and if so, how to prevent it?
Edited by Dom_152, 28 October 2012 - 06:55 AM.