i am currently porting an application from mac to windows. the app uses a library which creates a window and an opengl context on initialization. i can retrieve the opengl context (HGLRC) and drawable (HDC) from the library methods, but i also need to retrieve the HWND window handle associated with that drawable.
on the mac, it was a a few lines of code to achieve this from an existing drawable (HDC on win, AGLDrawable on mac):
OpaqueWindowPtr* myWindow = (OpaqueWindowPtr*)drawable;
the windows version of ControlRef (HWND) is what i’m trying to retrieve.
does anyone have any ideas how i can achieve this on windows?
many thanks for any tips.