how do you specify the size of a window?
Posted on 2001-06-23 00:47:00 by SoftStab
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
   );	
Posted on 2001-06-23 01:19:00 by eet_1024

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
   );	
try that if you're doing it at run-time.
Posted on 2001-06-25 03:07:00 by disease_2000
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, hutch@pbq.com.au
Posted on 2001-06-25 04:50:00 by hutch--