起動中のウィンドウを知る プログラムは、現在デスクトップにどのようなウィンドウがあるのかを知り そして、そのウィンドウを制御するためのハンドルを必要とするかもしれません もちろん、必要な時以外には 異なるプログラムのウィンドウを制御するようなことは避けるべきですが プログラムによっては、その必要に迫られる時もあることでしょう Windows は、げんざい有効なウィンドウのハンドルを列挙する EnumWindows() 関数を提供しています これを用いれば、有効なメインウィンドウのハンドルを全て取得できます BOOL EnumWindows(WNDENUMPROC lpEnumFunc , LPARAM lParam); lpEnumFunc は、WNDENUMPROC 型の関数へのポインタを指定します これは、アプリケーション定義のコールバック関数へのポインタです lParam には、列挙