Can someone please tell me how to obtain the Windows handle when you know the windows resource. Its a MFC application.
I need to pass the handle for a push button to another routine. The resource is IDC_TEST1
I have been trying code snips like:
CWnd *pWnd = FindWindow( "IDC_TEST", NULL );
HWND hWnd = pWnd->GetSafeHwnd();
Note it is the hWnd that I require.
I am lost, too many APIs and handles!
I need to pass the handle for a push button to another routine. The resource is IDC_TEST1
I have been trying code snips like:
CWnd *pWnd = FindWindow( "IDC_TEST", NULL );
HWND hWnd = pWnd->GetSafeHwnd();
Note it is the hWnd that I require.
I am lost, too many APIs and handles!