diff options
Diffstat (limited to 'plugins/SendScreenshotPlus/src/UAboutForm.cpp')
-rw-r--r-- | plugins/SendScreenshotPlus/src/UAboutForm.cpp | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/plugins/SendScreenshotPlus/src/UAboutForm.cpp b/plugins/SendScreenshotPlus/src/UAboutForm.cpp index f05738281e..e12b5a72d8 100644 --- a/plugins/SendScreenshotPlus/src/UAboutForm.cpp +++ b/plugins/SendScreenshotPlus/src/UAboutForm.cpp @@ -41,7 +41,8 @@ void TfrmAbout::Unload() } } -//--------------------------------------------------------------------------- +///////////////////////////////////////////////////////////////////////////////////////// + TfrmAbout::CHandleMapping TfrmAbout::_HandleMapping; INT_PTR CALLBACK TfrmAbout::DlgTfrmAbout(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) @@ -84,33 +85,30 @@ INT_PTR CALLBACK TfrmAbout::DlgTfrmAbout(HWND hWnd, UINT msg, WPARAM wParam, LPA return FALSE; } -//--------------------------------------------------------------------------- -//WM_INITDIALOG: +///////////////////////////////////////////////////////////////////////////////////////// +// WM_INITDIALOG: + LRESULT TfrmAbout::wmInitdialog(WPARAM, LPARAM) { // Headerbar SendDlgItemMessage(m_hWnd, IDC_HEADERBAR, WM_SETICON, ICON_BIG, (LPARAM)GetIcon(ICO_MAIN)); - //License + // License { - wchar_t* pszText = NULL; - mir_tstradd(pszText, _A2W(__COPYRIGHT)); - mir_tstradd(pszText, L"\r\n\r\n"); + CMStringW pszText(_A2W(__COPYRIGHT)); + pszText.Append(L"\r\n\r\n"); HRSRC hRes = FindResource(g_hSendSS, MAKEINTRESOURCE(IDR_LICENSE), L"TEXT"); DWORD size = SizeofResource(g_hSendSS, hRes); char* data = (char*)mir_alloc(size + 1); memcpy(data, LockResource(LoadResource(g_hSendSS, hRes)), size); data[size] = '\0'; - wchar_t* pszCopyright = mir_a2u(data); + pszText.AppendFormat(L"%S", data); mir_free(data); - mir_tstradd(pszText, pszCopyright); - mir_free(pszCopyright); SetDlgItemText(m_hWnd, IDC_LICENSE, pszText); - mir_free(pszText); } - //Credit + // Credit { HRSRC hRes = FindResource(g_hSendSS, MAKEINTRESOURCE(IDR_CREDIT), L"TEXT"); DWORD size = SizeofResource(g_hSendSS, hRes); @@ -132,10 +130,11 @@ LRESULT TfrmAbout::wmInitdialog(WPARAM, LPARAM) return FALSE; } -//WM_COMMAND: +///////////////////////////////////////////////////////////////////////////////////////// +// WM_COMMAND: + LRESULT TfrmAbout::wmCommand(WPARAM wParam, LPARAM) { - //--------------------------------------------------------------------------- if (HIWORD(wParam) == BN_CLICKED) { switch (LOWORD(wParam)) { case IDCANCEL: // ESC pressed @@ -155,7 +154,9 @@ LRESULT TfrmAbout::wmCommand(WPARAM wParam, LPARAM) return FALSE; } -//WM_CLOSE: +///////////////////////////////////////////////////////////////////////////////////////// +// WM_CLOSE: + LRESULT TfrmAbout::wmClose(WPARAM, LPARAM) { SendMessage(m_hWndOwner, UM_CLOSING, (WPARAM)m_hWnd, (LPARAM)IDD_UAboutForm); @@ -163,7 +164,8 @@ LRESULT TfrmAbout::wmClose(WPARAM, LPARAM) return FALSE; } -//--------------------------------------------------------------------------- +///////////////////////////////////////////////////////////////////////////////////////// + TfrmAbout::TfrmAbout(HWND Owner) { m_hWndOwner = Owner; @@ -179,7 +181,8 @@ TfrmAbout::~TfrmAbout() _HandleMapping.erase(m_hWnd); } -//--------------------------------------------------------------------------- +///////////////////////////////////////////////////////////////////////////////////////// + void TfrmAbout::btnPageClick() { HWND hCtrl = GetDlgItem(m_hWnd, IDA_CONTRIBLINK); |