GetSafeHwnd
This function returns the window handle
HWND GetSafeHwnd( )
Returns the window handle for a window.
Returns NULL if the Window class is not attached to a window.
EX1
int Window_GetSaftHwnd_ex1() { // make active window iconized WorksheetPage myDlg = Project.WorksheetPages(0); Window winDlg = myDlg.GetWindow(); MessageBox(winDlg.GetSafeHwnd(), "Hello", "Test", MB_OK); return 0; }
origin.h