PreTranslateWindow::PreTranslateWindow(HWND hwnd) : super(hwnd) { register_pretranslate(hwnd); }
TrayNotifyDlg::TrayNotifyDlg(HWND hwnd) : super(hwnd), _tree_ctrl(GetDlgItem(hwnd, IDC_NOTIFY_ICONS)), _himl(ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR24, 3, 0)), _pNotifyArea(static_cast<NotifyArea*>(Window::get_window((HWND)SendMessage(g_Globals._hwndDesktopBar, PM_GET_NOTIFYAREA, 0, 0)))) { _selectedItem = 0; if (_pNotifyArea) { // save original icon states and configuration data for(NotifyIconMap::const_iterator it=_pNotifyArea->_icon_map.begin(); it!=_pNotifyArea->_icon_map.end(); ++it) _icon_states_org[it->first] = IconStatePair(it->second._mode, it->second._dwState); _cfg_org = _pNotifyArea->_cfg; _show_hidden_org = _pNotifyArea->_show_hidden; } SetWindowIcon(hwnd, IDI_REACTOS); _haccel = LoadAccelerators(g_Globals._hInstance, MAKEINTRESOURCE(IDA_TRAYNOTIFY)); { WindowCanvas canvas(_hwnd); HBRUSH hbkgnd = GetStockBrush(WHITE_BRUSH); ImageList_AddAlphaIcon(_himl, SmallIcon(IDI_DOT), hbkgnd, canvas); ImageList_AddAlphaIcon(_himl, SmallIcon(IDI_DOT_TRANS), hbkgnd, canvas); ImageList_AddAlphaIcon(_himl, SmallIcon(IDI_DOT_RED), hbkgnd, canvas); } (void)TreeView_SetImageList(_tree_ctrl, _himl, TVSIL_NORMAL); _resize_mgr.Add(IDC_NOTIFY_ICONS, RESIZE); _resize_mgr.Add(IDC_LABEL1, MOVE_Y); _resize_mgr.Add(IDC_NOTIFY_TOOLTIP, RESIZE_X|MOVE_Y); _resize_mgr.Add(IDC_LABEL2, MOVE_Y); _resize_mgr.Add(IDC_NOTIFY_TITLE, RESIZE_X|MOVE_Y); _resize_mgr.Add(IDC_LABEL3, MOVE_Y); _resize_mgr.Add(IDC_NOTIFY_MODULE, RESIZE_X|MOVE_Y); _resize_mgr.Add(IDC_LABEL4, MOVE_Y); _resize_mgr.Add(IDC_NOTIFY_SHOW, MOVE_Y); _resize_mgr.Add(IDC_NOTIFY_HIDE, MOVE_Y); _resize_mgr.Add(IDC_NOTIFY_AUTOHIDE,MOVE_Y); _resize_mgr.Add(IDC_PICTURE, MOVE); _resize_mgr.Add(ID_SHOW_HIDDEN_ICONS,MOVE_Y); _resize_mgr.Add(IDC_LABEL6, MOVE_Y); _resize_mgr.Add(IDC_LAST_CHANGE, MOVE_Y); _resize_mgr.Add(IDOK, MOVE); _resize_mgr.Add(IDCANCEL, MOVE); _resize_mgr.Resize(+150, +200); Refresh(); SetTimer(_hwnd, 0, 3000, NULL); register_pretranslate(hwnd); }