"Desktopbar Settings" Property Sheet Dialog More...
#include <settings.h>
Public Types | |
typedef OwnerDrawParent < PropSheetPageDlg > | super |
Public Member Functions | |
DesktopSettingsDlg (HWND hwnd) | |
Protected Member Functions | |
virtual int | Command (int id, int code) |
virtual int | Notify (int id, NMHDR *pnmh) |
Protected Attributes | |
ResBitmap | _bmp0 |
ResBitmap | _bmp1 |
ResBitmap | _bmp2 |
ResBitmap | _bmp3 |
ResBitmap | _bmp4 |
ResBitmap | _bmp5 |
ResBitmap | _bmp6 |
ResBitmap | _bmp7 |
ResBitmap | _bmp8 |
ResBitmap | _bmp9 |
ResBitmap | _bmp10 |
int | _alignment_cur |
int | _alignment_tmp |
int | _display_version_org |
"Desktopbar Settings" Property Sheet Dialog
Definition at line 35 of file settings.h.
Reimplemented from OwnerDrawParent< PropSheetPageDlg >.
Definition at line 37 of file settings.h.
DesktopSettingsDlg::DesktopSettingsDlg | ( | HWND | hwnd ) |
Definition at line 66 of file settings.cpp.
References _alignment_cur, _alignment_tmp, _bmp0, _bmp1, _bmp10, _bmp2, _bmp3, _bmp4, _bmp5, _bmp6, _bmp7, _bmp8, _bmp9, _display_version_org, WindowHandle::_hwnd, ExplorerGlobals::_hwndShellView, g_Globals, ID_DESKTOP_VERSION, IDC_ICON_ALIGN_0, IDC_ICON_ALIGN_1, IDC_ICON_ALIGN_10, IDC_ICON_ALIGN_2, IDC_ICON_ALIGN_3, IDC_ICON_ALIGN_4, IDC_ICON_ALIGN_5, IDC_ICON_ALIGN_6, IDC_ICON_ALIGN_7, IDC_ICON_ALIGN_8, IDC_ICON_ALIGN_9, PM_DISPLAY_VERSION, and PM_GET_ICON_ALGORITHM.
: super(hwnd), _bmp0(IDB_ICON_ALIGN_0), _bmp1(IDB_ICON_ALIGN_1), _bmp2(IDB_ICON_ALIGN_2), _bmp3(IDB_ICON_ALIGN_3), _bmp4(IDB_ICON_ALIGN_4), _bmp5(IDB_ICON_ALIGN_5), _bmp6(IDB_ICON_ALIGN_6), _bmp7(IDB_ICON_ALIGN_7), _bmp8(IDB_ICON_ALIGN_8), _bmp9(IDB_ICON_ALIGN_9), _bmp10(IDB_ICON_ALIGN_10) { new PictureButton(_hwnd, IDC_ICON_ALIGN_0, _bmp0); new PictureButton(_hwnd, IDC_ICON_ALIGN_1, _bmp1); new PictureButton(_hwnd, IDC_ICON_ALIGN_2, _bmp2); new PictureButton(_hwnd, IDC_ICON_ALIGN_3, _bmp3); new PictureButton(_hwnd, IDC_ICON_ALIGN_4, _bmp4); new PictureButton(_hwnd, IDC_ICON_ALIGN_5, _bmp5); new PictureButton(_hwnd, IDC_ICON_ALIGN_6, _bmp6); new PictureButton(_hwnd, IDC_ICON_ALIGN_7, _bmp7); new PictureButton(_hwnd, IDC_ICON_ALIGN_8, _bmp8); new PictureButton(_hwnd, IDC_ICON_ALIGN_9, _bmp9); new PictureButton(_hwnd, IDC_ICON_ALIGN_10, _bmp10); _alignment_cur = SendMessage(g_Globals._hwndShellView, PM_GET_ICON_ALGORITHM, 0, 0); _alignment_tmp = _alignment_cur; _display_version_org = SendMessage(g_Globals._hwndShellView, PM_DISPLAY_VERSION, 0, MAKELONG(0,0)); CheckDlgButton(hwnd, ID_DESKTOP_VERSION, _display_version_org? BST_CHECKED: BST_UNCHECKED); }
int DesktopSettingsDlg::Command | ( | int | id, |
int | code | ||
) | [protected, virtual] |
Reimplemented from PropSheetPageDlg.
Definition at line 128 of file settings.cpp.
References _alignment_tmp, WindowHandle::_hwnd, ExplorerGlobals::_hwndShellView, g_Globals, ID_DESKTOP_VERSION, IDC_ICON_ALIGN_0, IDC_ICON_ALIGN_10, PM_DISPLAY_VERSION, and PM_SET_ICON_ALGORITHM.
{ if (id>=IDC_ICON_ALIGN_0 && id<=IDC_ICON_ALIGN_10) { int alignment = id - IDC_ICON_ALIGN_0; if (alignment != _alignment_tmp) { _alignment_tmp = alignment; PropSheet_Changed(GetParent(_hwnd), _hwnd); SendMessage(g_Globals._hwndShellView, PM_SET_ICON_ALGORITHM, alignment, 0); } return 0; } switch(id) { case ID_DESKTOP_VERSION: SendMessage(g_Globals._hwndShellView, PM_DISPLAY_VERSION, 0, MAKELONG(0,1)); // toggle version display flag PropSheet_Changed(GetParent(_hwnd), _hwnd); break; default: return 1; } return 0; }
int DesktopSettingsDlg::Notify | ( | int | id, |
NMHDR * | pnmh | ||
) | [protected, virtual] |
Reimplemented from Window.
Definition at line 103 of file settings.cpp.
References _alignment_cur, _alignment_tmp, _display_version_org, WindowHandle::_hwnd, ExplorerGlobals::_hwndShellView, g_Globals, IDC_ICON_ALIGN_0, Window::Notify(), PM_DISPLAY_VERSION, PM_SET_ICON_ALGORITHM, and PSN_QUERYINITIALFOCUS.
{ switch(pnmh->code) { case PSN_QUERYINITIALFOCUS: SetWindowLong(_hwnd, DWL_MSGRESULT, (LPARAM)GetDlgItem(_hwnd, IDC_ICON_ALIGN_0+_alignment_cur)); break; case PSN_APPLY: _alignment_cur = _alignment_tmp; _display_version_org = SendMessage(g_Globals._hwndShellView, PM_DISPLAY_VERSION, 0, MAKELONG(0,0)); break; case PSN_RESET: if (_alignment_tmp != _alignment_cur) SendMessage(g_Globals._hwndShellView, PM_SET_ICON_ALGORITHM, _alignment_cur, 0); SendMessage(g_Globals._hwndShellView, PM_DISPLAY_VERSION, _display_version_org, MAKELONG(1,0)); break; default: return super::Notify(id, pnmh); } return 0; }
int DesktopSettingsDlg::_alignment_cur [protected] |
Definition at line 54 of file settings.h.
Referenced by DesktopSettingsDlg(), and Notify().
int DesktopSettingsDlg::_alignment_tmp [protected] |
Definition at line 55 of file settings.h.
Referenced by Command(), DesktopSettingsDlg(), and Notify().
ResBitmap DesktopSettingsDlg::_bmp0 [protected] |
Definition at line 42 of file settings.h.
Referenced by DesktopSettingsDlg().
ResBitmap DesktopSettingsDlg::_bmp1 [protected] |
Definition at line 43 of file settings.h.
Referenced by DesktopSettingsDlg().
ResBitmap DesktopSettingsDlg::_bmp10 [protected] |
Definition at line 52 of file settings.h.
Referenced by DesktopSettingsDlg().
ResBitmap DesktopSettingsDlg::_bmp2 [protected] |
Definition at line 44 of file settings.h.
Referenced by DesktopSettingsDlg().
ResBitmap DesktopSettingsDlg::_bmp3 [protected] |
Definition at line 45 of file settings.h.
Referenced by DesktopSettingsDlg().
ResBitmap DesktopSettingsDlg::_bmp4 [protected] |
Definition at line 46 of file settings.h.
Referenced by DesktopSettingsDlg().
ResBitmap DesktopSettingsDlg::_bmp5 [protected] |
Definition at line 47 of file settings.h.
Referenced by DesktopSettingsDlg().
ResBitmap DesktopSettingsDlg::_bmp6 [protected] |
Definition at line 48 of file settings.h.
Referenced by DesktopSettingsDlg().
ResBitmap DesktopSettingsDlg::_bmp7 [protected] |
Definition at line 49 of file settings.h.
Referenced by DesktopSettingsDlg().
ResBitmap DesktopSettingsDlg::_bmp8 [protected] |
Definition at line 50 of file settings.h.
Referenced by DesktopSettingsDlg().
ResBitmap DesktopSettingsDlg::_bmp9 [protected] |
Definition at line 51 of file settings.h.
Referenced by DesktopSettingsDlg().
int DesktopSettingsDlg::_display_version_org [protected] |
Definition at line 57 of file settings.h.
Referenced by DesktopSettingsDlg(), and Notify().
ROS Explorer Source Code Documentation
generated on 02.01.2013 by ![]() |