how do you specify the size of a window?
From the Win32API.hlp
HWND CreateWindowEx( DWORD dwExStyle, // extended window style LPCTSTR lpClassName, // address of registered class name LPCTSTR lpWindowName, // address of window name DWORD dwStyle, // window style int x, // horizontal position of window int y, // vertical position of window int nWidth, // window width int nHeight, // window height HWND hWndParent, // handle of parent or owner window HMENU hMenu, // handle of menu, or child-window identifier HINSTANCE hInstance, // handle of application instance LPVOID lpParam // address of window-creation data );
try that if you're doing it at run-time.
BOOL SetWindowPos( HWND hWnd, // handle of window HWND hWndInsertAfter, // placement-order handle int X, // horizontal position int Y, // vertical position int cx, // width int cy, // height UINT uFlags // window-positioning flags );
SoftStab, The API calls the guys have given you are fine, with CreateWindowEx() the 4 co-ordinates are in pixel position in relation to the desktop so with a bit of twiddling, you can both size and locate the window anywhere on the desktop. SetWindowPos() and MoveWindow() will both work once the window has been created, MoveWindow() is faster if it matters but SetWindowPos() has a few more options so it depends what you require. Regards, firstname.lastname@example.org