static int uiOnDialogShow(Ihandle *ih, int state) { // only need to process on show HWND hWnd; BOOL exit; HICON icon; HINSTANCE hInstance; if (state != IUP_SHOW) return IUP_DEFAULT; hWnd = (HWND)IupGetAttribute(ih, "HWND"); hInstance = GetModuleHandle(NULL); // set application icon icon = LoadIcon(hInstance, "CLUMSY_ICON"); SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)icon); SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)icon); // try elevate and decides whether to exit exit = tryElevate(hWnd, parameterized); if (!exit && parameterized) { setFromParameter(filterText, "VALUE", "filter"); LOG("is parameterized, start filtering upon execution."); uiStartCb(filterButton); } return exit ? IUP_CLOSE : IUP_DEFAULT; }
static int uiOnDialogShow(Ihandle *ih, int state) { // only need to process on show HWND hWnd; BOOL exit; HICON icon; HINSTANCE hInstance; if (state != IUP_SHOW) return IUP_DEFAULT; hWnd = (HWND)IupGetAttribute(ih, "HWND"); hInstance = GetModuleHandle(NULL); // set application icon icon = LoadIcon(hInstance, "CLUMSY_ICON"); SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)icon); SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)icon); // try elevate and decides whether to exit exit = tryElevate(hWnd); return exit ? IUP_CLOSE : IUP_DEFAULT; }