把对话框属性中的Topmost设为TRUE!如果还不行的话,试试在create的时候给他指定父窗口,而不是传0要不然用SetWindowPos. 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 ); 需要置顶的第二个参数设置为HWND_TOPMOST 不需要的设置为HWND_NOTOPMOST
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
);
需要置顶的第二个参数设置为HWND_TOPMOST
不需要的设置为HWND_NOTOPMOST