static INT_PTR CALLBACK installer_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_INITDIALOG: ShowWindow(GetDlgItem(hwnd, ID_DWL_PROGRESS), SW_HIDE); install_dialog = hwnd; return TRUE; case WM_NOTIFY: switch (((NMHDR *)lParam)->code) { case NM_CLICK: case NM_RETURN: if (wParam == ID_DWL_STATUS) run_winebrowser(((NMLINK*)lParam)->item.szUrl); break; } break; case WM_COMMAND: switch(wParam) { case IDCANCEL: if(dwl_binding) IBinding_Abort(dwl_binding); EndDialog(hwnd, 0); return FALSE; case ID_DWL_INSTALL: ShowWindow(GetDlgItem(hwnd, ID_DWL_PROGRESS), SW_SHOW); EnableWindow(GetDlgItem(hwnd, ID_DWL_INSTALL), 0); if(!start_download()) EndDialog(install_dialog, 0); } } return FALSE; }
static INT_PTR CALLBACK installer_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_INITDIALOG: ShowWindow(GetDlgItem(hwnd, ID_DWL_PROGRESS), SW_HIDE); install_dialog = hwnd; return TRUE; case WM_NOTIFY: switch (((NMHDR *)lParam)->code) { case NM_CLICK: case NM_RETURN: if (wParam == ID_DWL_STATUS) run_winebrowser(((NMLINK*)lParam)->item.szUrl); break; } break; case WM_COMMAND: switch(wParam) { case IDCANCEL: EndDialog(hwnd, 0); return FALSE; case ID_DWL_INSTALL: ShowWindow(GetDlgItem(hwnd, ID_DWL_PROGRESS), SW_SHOW); EnableWindow(GetDlgItem(hwnd, ID_DWL_INSTALL), 0); EnableWindow(GetDlgItem(hwnd, IDCANCEL), 0); /* FIXME */ CloseHandle( CreateThread(NULL, 0, download_proc, NULL, 0, NULL)); return FALSE; } } return FALSE; }