最終更新 2003 07/24
サンプルのダウンロード → API_TopmostWindow.lzh(35k)
SetWindowPos関数
対応しているバージョン
95, 98, Me, NT3.1以降, CE1.0以降, 2000, XP
使用するヘッダとライブラリ
winuser.h
user32.lib
|
ウィンドウを最前面に表示させるには SetWindowPos() 関数を使います。
SetWindowPos( hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE );
|
最前面表示を解除するには
SetWindowPos( hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE );
|
こう書くだけです。
|