Handle of console windows

  • Thread starter Thread starter ZartPARZ
  • Start date Start date
Z

ZartPARZ

Hi.

How can I get HWND of console windows?

I wrote mfc console application and want to use handle for joystick.

Thanks.
 
Bruno van Dooren said:
GetCurrentWindow();

GetCurrentWindow()? You mean GetActiveWindow()?

A lot of folks use SetConsoleTitle() with a unique string (perhaps derived
from a GUID) then FindWindow() to find its handle, followed by
SetConsoleTitle() to set it back to something reasonable.

Regards,
Will
 
Thanks for your help,Bruno.

But I use (HWND) GetModuleHandle(NULL).
I think it work fine for me.

ZartPARZ
 
Back
Top