From c4582dd65b444e5dae29ada7cc3f6c9a9c20edf3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 2 Dec 2012 18:19:49 +0000 Subject: new easy standard way of registering icons: Icon_Register git-svn-id: http://svn.miranda-ng.org/main/trunk@2601 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CrashDumper/src/ui.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'plugins/CrashDumper/src/ui.cpp') diff --git a/plugins/CrashDumper/src/ui.cpp b/plugins/CrashDumper/src/ui.cpp index f39a329069..2055554374 100644 --- a/plugins/CrashDumper/src/ui.cpp +++ b/plugins/CrashDumper/src/ui.cpp @@ -70,8 +70,8 @@ INT_PTR CALLBACK DlgProcView(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara { hViewWnd = hwndDlg; TranslateDialogDefault(hwndDlg); - SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadIconEx("versionInfo", true)); - SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadIconEx("versionInfo")); + SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadIconEx(IDI_VI, true)); + SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadIconEx(IDI_VI)); CHARFORMAT2 chf; chf.cbSize = sizeof(chf); @@ -192,8 +192,8 @@ INT_PTR CALLBACK DlgProcView(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara case WM_DESTROY: hViewWnd = NULL; - ReleaseIconEx((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, 0)); - ReleaseIconEx((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, 0)); + Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, 0)); + Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, 0)); Utils_SaveWindowPosition(hwndDlg, NULL, PluginName, "ViewInfo_"); if (servicemode) PostQuitMessage(0); break; @@ -273,15 +273,13 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP LRESULT CALLBACK DlgProcPopup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { - switch (msg) - { + switch (msg) { case WM_CONTEXTMENU: PUDeletePopUp(hWnd); break; case WM_COMMAND: - switch ((int)PUGetPluginData(hWnd)) - { + switch ((int)PUGetPluginData(hWnd)) { case 0: OpenAuthUrl("http://www.miranda-vi.org/"); break; @@ -301,7 +299,8 @@ LRESULT CALLBACK DlgProcPopup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) break; case UM_FREEPLUGINDATA: - ReleaseIconEx("versionInfo"); + Skin_ReleaseIcon((HICON)SendMessage(hWnd, WM_SETICON, ICON_BIG, 0)); + Skin_ReleaseIcon((HICON)SendMessage(hWnd, WM_SETICON, ICON_SMALL, 0)); break; } @@ -321,7 +320,7 @@ void ShowMessage(int type, const TCHAR* format, ...) if (ServiceExists(MS_POPUP_ADDPOPUPT)) { _tcscpy(pi.lptzContactName, TEXT(PluginName)); - pi.lchIcon = LoadIconEx("versionInfo"); + pi.lchIcon = LoadIconEx(IDI_VI); pi.PluginWindowProc = DlgProcPopup; pi.PluginData = (void*)type; -- cgit v1.2.3