/*** About Dialog with one Command Button (Unload dialog on press)** Center on Init rel. to main Window!*/BOOL CALLBACK AboutProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam){ switch (uMsg) { case WM_INITDIALOG: CenterDialog(hWndDlg, GetParent(hWndDlg)); hCursor=LoadCursor(NULL, IDC_HAND); // Windows 98/Me, Windows 2000/XP: Hand if(!hCursor) hCursor=LoadCursor(hInstance, MAKEINTRESOURCE(IDC_MY_HAND)); //SetClassLong(GetDlgItem(hWndDlg, IDC_STATIC_MAIL), GCL_HCURSOR, (LPARAM)hCursor); //SetClassLong(GetDlgItem(hWndDlg, IDC_STATIC_URL), GCL_HCURSOR, (LPARAM)hCursor); return TRUE; case WM_CTLCOLORSTATIC: switch(GetDlgCtrlID((HWND)lParam)) { case IDC_STATIC_MAIL: case IDC_STATIC_URL: SetBkMode((HDC)wParam, TRANSPARENT); SetTextColor((HDC)wParam, RGB(0x00, 0x00, 0xFF)); return (BOOL)GetStockObject(NULL_BRUSH); case IDC_STATIC_DO: SetBkMode((HDC)wParam,TRANSPARENT); SetTextColor((HDC)wParam, RGB(0x00, 0xA0, 0x00)); return (BOOL)GetStockObject(NULL_BRUSH); } break; case WM_COMMAND: switch(LOWORD(wParam)) { case IDOK: DestroyCursor(hCursor); EndDialog(hWndDlg, 1); return TRUE; case IDC_STATIC_URL: if(HIWORD(wParam)==STN_CLICKED) { ShellExecute(GetParent(hWndDlg), "open", "http://darkone.yo.lv", 0, 0, SW_SHOW); return TRUE; } break; case IDC_STATIC_MAIL: if(HIWORD(wParam)==STN_CLICKED) { ShellExecute(GetParent(hWndDlg), "open", "mailto:[email
C++ DestroyDrawInfo函数代码示例
C++ DestroyChildren函数代码示例