INT_PTR CALLBACK abtDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_INITDIALOG: ConvertStaticToHyperlink(hwndDlg, IDC_GITHUB); ConvertStaticToHyperlink(hwndDlg, IDC_README); Edit_SetText(GetDlgItem(hwndDlg, IDC_VERSION), TEXT("DoxyIt v") VERSION_TEXT TEXT(" ") VERSION_STAGE TEXT(" ") BITNESS); return true; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: DestroyWindow(hwndDlg); return true; case IDC_GITHUB: ShellExecute(hwndDlg, TEXT("open"), TEXT("https://github.com/dail8859/DoxyIt/"), NULL, NULL, SW_SHOWNORMAL); return true; case IDC_README: ShellExecute(hwndDlg, TEXT("open"), TEXT("https://github.com/dail8859/DoxyIt/blob/v") VERSION_TEXT TEXT("/README.md"), NULL, NULL, SW_SHOWNORMAL); return true; } case WM_DESTROY: DestroyWindow(hwndDlg); return true; } return false; }
void AboutDialog::dialogInit(HWND hWnd,LPARAM lParam) { SetWindowText(GetDlgItem(hWnd,IDC_STATIC_APPLICATION), TEXT(APP_NAME) TEXT(" ") TEXT(APP_VERSION) TEXT(APP_MILESTONE)); ConvertStaticToHyperlink(GetDlgItem(hWnd,IDC_STATIC_URL)); WinUtil::WindowUtil::centerParent(hWnd); SetFocus(GetDlgItem(hWnd, IDC_BUTTON_CLOSE)); }
LRESULT WINAPI AboutDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch(uMsg) { case WM_INITDIALOG: hSilverBMP = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_PS2SILVER)); SetWindowText(hDlg, _("About PCSX2")); Button_SetText(GetDlgItem(hDlg, IDOK), _("OK")); Static_SetText(GetDlgItem(hDlg, IDC_PCSX_ABOUT_AUTHORS), _(LabelAuthors)); Static_SetText(GetDlgItem(hDlg, IDC_PCSX_ABOUT_GREETS), _(LabelGreets)); ConvertStaticToHyperlink( hDlg, IDC_LINK_GOOGLECODE ); ConvertStaticToHyperlink( hDlg, IDC_LINK_WEBSITE ); return TRUE; case WM_COMMAND: switch(wParam) { case IDOK: EndDialog( hDlg, TRUE ); return TRUE; case IDC_LINK_WEBSITE: ShellExecute(hDlg, "open", "http://www.pcsx2.net/", NULL, NULL, SW_SHOWNORMAL); return TRUE; case IDC_LINK_GOOGLECODE: ShellExecute(hDlg, "open", "http://code.google.com/p/pcsx2", NULL, NULL, SW_SHOWNORMAL); return TRUE; } return FALSE; case WM_CLOSE: EndDialog( hDlg, TRUE ); return TRUE; } return FALSE; }
void ServerPage::dialogInit(HWND hWnd,LPARAM lParam) { m_hCheckAutoConfigureRouter = GetDlgItem(hWnd,IDC_CHECK_AUTOCONFIGUREROUTER); m_hComboIpAddress = GetDlgItem(hWnd,IDC_COMBO_IPADDRESS); m_hEditAddress = GetDlgItem(hWnd,IDC_EDIT_ADDRESS); m_hEditMaxSessions = GetDlgItem(hWnd,IDC_EDIT_MAXSESSIONS); m_hEditPort = GetDlgItem(hWnd,IDC_EDIT_PORT); m_hEditSessionTimeout = GetDlgItem(hWnd,IDC_EDIT_SESSIONTIMEOUT); ConvertStaticToHyperlink(GetDlgItem(hWnd,IDC_STATIC_WHATISTHIS)); SetWindowPos(hWnd,HWND_TOP,158,0,-1,-1,SWP_NOSIZE); }
INT_PTR CALLBACK abtDlgProc(HWND hwndDlg,UINT uMsg,WPARAM wParam, LPARAM lParam) { switch(uMsg) { case WM_INITDIALOG: ConvertStaticToHyperlink(hwndDlg,IDC_WEB); return TRUE; case WM_COMMAND: switch(LOWORD(wParam)) { case IDOK: EndDialog(hwndDlg,wParam); return TRUE; case IDC_WEB: ShellExecute(hwndDlg, TEXT("open"),TEXT("http://nppdocit.sourceforge.net/"),NULL, NULL, SW_SHOWNORMAL); return TRUE; } } return FALSE; }
INT_PTR CALLBACK abtDlgProc(HWND hwndDlg,UINT uMsg,WPARAM wParam, LPARAM /*lParam*/) { switch(uMsg) { case WM_INITDIALOG: ConvertStaticToHyperlink(hwndDlg,IDC_WEB); return TRUE; case WM_COMMAND: switch(LOWORD(wParam)) { case IDCANCEL: // Close this dialog when clicking to close button case IDOK: EndDialog(hwndDlg,wParam); return TRUE; case IDC_WEB: ShellExecute(hwndDlg, TEXT("open"),TEXT("https://sourceforge.net/projects/nppjsonviewer/"),NULL, NULL, SW_SHOWNORMAL); return TRUE; } } return FALSE; }
BOOL ConvertCtlStaticToHyperlink(HWND hwndParent, UINT uiCtlId) { return ConvertStaticToHyperlink(GetDlgItem(hwndParent, uiCtlId)); }
/* * Function CHyperLink::ConvertStaticToHyperlink */ BOOL CHyperLink::ConvertStaticToHyperlink(HWND hwndParent, UINT uiCtlId, LPCTSTR strURL) { return ConvertStaticToHyperlink(GetDlgItem(hwndParent, uiCtlId), strURL); }