Win32API Question:
Download Job Interview Questions and Answers PDF
Message to limit the size of window?
Answer:
BOOL MoveWindow(
HWND hWnd, // handle to window
int X, // horizontal position
int Y, // vertical position
int nWidth, // width
int nHeight, // height
BOOL bRepaint // repaint option
);
This cud be used in the WM_PAINT event section and in
WM_INITDIALOG section.
WM_SIZE message is received by the window procedure when a
user resizes a window. In order to limite the size of a
window, you could handle the WM_SIZE message appropriately.
HWND hWnd, // handle to window
int X, // horizontal position
int Y, // vertical position
int nWidth, // width
int nHeight, // height
BOOL bRepaint // repaint option
);
This cud be used in the WM_PAINT event section and in
WM_INITDIALOG section.
WM_SIZE message is received by the window procedure when a
user resizes a window. In order to limite the size of a
window, you could handle the WM_SIZE message appropriately.
Download Win32API Interview Questions And Answers
PDF
Previous Question | Next Question |
What is the function to repaint a window immediately? | What is GDI object? |