PDA

View Full Version : [VC++] Luôn hiện cửa sổ lên trên các cửa sổ khác


hiepitbk
30-11-2006, 11:02 AM
Có bác nào biết cách làm cho một cửa sổ luôn hiển thị lên trên các cửa sổ khác không.

ilovecplusplus
01-12-2006, 06:07 PM
WS_EX_TOPMOST: Specifies that a window created with this style should be placed above all nontopmost windows and stay above them even when the window is deactivated. An application can use the SetWindowPos member function to add or remove this attribute.

Reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/createwindowex.asp

tienthanhict
04-12-2006, 06:17 PM
BOOL SetWindowPos(
HWND hWnd, // handle to window
HWND hWndInsertAfter, // placement-order handle
int X, // horizontal position
int Y, // vertical position
int cx, // width
int cy, // height
UINT uFlags // window-positioning options
);

hWndInsertAfter đặt là HWND_TOPMOST là ôkê