Advertisement

Change the propeties of windows

Started by July 24, 2001 12:53 PM
1 comment, last by Lalle 23 years, 6 months ago
How do I change the properties(size, title, etc) of an already made window in Windows? I''m using C++ thanks Lalle
SetWindowPos() will do some of the things you want. (like resize) Look it up on MSDN. It is either called that or SetWindowPosition().
Advertisement
MoveWindow() to change position and size:

BOOL MoveWindow(
HWND hWnd, // handle to window
int X, // horizontal position
int Y, // vertical position
int nWidth, // width
int nHeight, // height
BOOL bRepaint // repaint flag
);

SetWindowText() to set the title of a window or to set the text of a control:

BOOL SetWindowText(
HWND hWnd, // handle to window or control
LPCTSTR lpString // address of string
);

GetWindowText() can be used if you need to get the window title. Try looking stuff on MSDN, you will be surprised at all the stuff in the API that you never knew about.

Edited by - Midnight Coder on July 25, 2001 3:42:26 PM

This topic is closed to new replies.

Advertisement