BOOL TrigModifyWindow::DlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch ( msg ) { case WM_SHOWWINDOW: if ( wParam == FALSE && onTrigTextTab() ) trigModifyTextWindow.ParentHidden(); else if ( wParam == FALSE && currTab == TAB_CONDITIONS ) conditionsWindow.HideSuggestions(); return FALSE; break; case WM_ACTIVATE: if ( LOWORD(wParam) != WA_INACTIVE ) chkd.SetCurrDialog(hWnd); else // LOWORD(wParam) == WA_INACTIVE conditionsWindow.HideSuggestions(); return FALSE; break; case WM_NCACTIVATE: if ( (BOOL)wParam == FALSE ) conditionsWindow.HideSuggestions(); return FALSE; break; case WM_INITDIALOG: { SetSmallIcon((HANDLE)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_PROGRAM_ICON), IMAGE_ICON, 16, 16, 0 )); tabs.FindThis(hWnd, IDC_TRIGMODIFYTABS); const char* tabLabels[] = { "General", "Players", "Conditions", "Actions", "Text" }; for ( int i=0; i<sizeof(tabLabels)/sizeof(const char*); i++ ) tabs.InsertTab(i, tabLabels[i]); CreateSubWindows(hWnd); DoSize(); ReplaceChildFonts(defaultFont); RedrawWindow(hWnd, NULL, NULL, RDW_INVALIDATE); } break; case WM_SIZE: DoSize(); break; case WM_CLOSE: ShowWindow(hWnd, SW_HIDE); break; default: return FALSE; break; } return TRUE; }
BOOL TrigEditorWindow::DlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch ( msg ) { case WM_ACTIVATE: if ( LOWORD(wParam) != WA_INACTIVE ) chkd.SetCurrDialog(hWnd); return FALSE; break; case WM_INITDIALOG: SetSmallIcon((HANDLE)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_PROGRAM_ICON), IMAGE_ICON, 16, 16, 0)); CreateSubWindows(hWnd); ReplaceChildFonts(defaultFont); RedrawWindow(hWnd, NULL, NULL, RDW_INVALIDATE); break; case WM_SIZE: DoSize(); break; case WM_CLOSE: triggersWindow.trigModifyWindow.Hide(); ClassDialog::DestroyDialog(); return FALSE; break; default: return FALSE; break; } return TRUE; }
// Not part of the wxBookctrl API, but must be called in OnIdle or // by application to realize the toolbar and select the initial page. void wxToolbook::Realize() { if (m_needsRealizing) { GetToolBar()->SetToolBitmapSize(m_maxBitmapSize); int remap = wxSystemOptions::GetOptionInt(wxT("msw.remap")); wxSystemOptions::SetOption(wxT("msw.remap"), 0); GetToolBar()->Realize(); wxSystemOptions::SetOption(wxT("msw.remap"), remap); } m_needsRealizing = false; if (m_selection == -1) m_selection = 0; if (GetPageCount() > 0) { int sel = m_selection; m_selection = -1; SetSelection(sel); } DoSize(); }
void TrigModifyWindow::CreateSubWindows(HWND hWnd) { generalWindow.CreateThis(tabs.getHandle(), WIN_GENERAL); playersWindow.CreateThis(tabs.getHandle(), WIN_PLAYERS); conditionsWindow.CreateThis(tabs.getHandle(), WIN_CONDITIONS); actionsWindow.CreateThis(tabs.getHandle(), WIN_ACTIONS); trigModifyTextWindow.CreateThis(tabs.getHandle(), WIN_TRIGMODIFYTEXT); DoSize(); }
void MyFrame::RecreateList(long flags, bool withText) { // we could avoid recreating it if we don't set/clear the wxLC_VIRTUAL // style, but it is more trouble to do it than not #if 0 if ( !m_listCtrl || ((flags & wxLC_VIRTUAL) != (m_listCtrl->GetWindowStyleFlag() & wxLC_VIRTUAL)) ) #endif { delete m_listCtrl; m_listCtrl = new MyListCtrl(m_panel, LIST_CTRL, wxDefaultPosition, wxDefaultSize, flags | wxBORDER_THEME | wxLC_EDIT_LABELS); switch ( flags & wxLC_MASK_TYPE ) { case wxLC_LIST: InitWithListItems(); break; case wxLC_ICON: InitWithIconItems(withText); break; case wxLC_SMALL_ICON: InitWithIconItems(withText, true); break; case wxLC_REPORT: if ( flags & wxLC_VIRTUAL ) InitWithVirtualItems(); else InitWithReportItems(); break; default: wxFAIL_MSG( wxT("unknown listctrl mode") ); } wxMenuBar* const mb = GetMenuBar(); if ( mb ) m_listCtrl->EnableBellOnNoMatch(mb->IsChecked(LIST_TOGGLE_BELL)); } DoSize(); GetMenuBar()->Check(LIST_ROW_LINES, false); m_logWindow->Clear(); }
void TrigEditorWindow::CreateSubWindows(HWND hWnd) { tabs.FindThis(hWnd, IDC_TRIGEDITTABS); const char* tabLabels[] = { "Triggers", "Templates", "Counters", "CUWPs", "Switches" }; for ( int i=0; i<sizeof(tabLabels)/sizeof(const char*); i++ ) tabs.InsertTab(i, tabLabels[i]); triggersWindow.CreateThis(tabs.getHandle(), WIN_TRIGGERS); templatesWindow.CreateThis(tabs.getHandle(), WIN_TEMPLATES); countersWindow.CreateThis(tabs.getHandle(), WIN_COUNTERS); cuwpsWindow.CreateThis(tabs.getHandle(), WIN_CUWPS); switchesWindow.CreateThis(tabs.getHandle(), WIN_SWITCHES); DoSize(); }
LRESULT CImportPatchDlg::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_NOTIFY: if (wParam == IDC_AM_SPLIT) { SPC_NMHDR* pHdr = (SPC_NMHDR*) lParam; DoSize(pHdr->delta); } break; } return CResizableStandAloneDialog::DefWindowProc(message, wParam, lParam); }
LRESULT CRebaseDlg::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_NOTIFY: if (wParam == IDC_REBASE_SPLIT) { SPC_NMHDR* pHdr = (SPC_NMHDR*) lParam; DoSize(pHdr->delta); } break; } return __super::DefWindowProc(message, wParam, lParam); }
bool Suggestions::CreateThis(HWND hParent, int x, int y, int width, int height) { if ( ClassWindow::RegisterWindowClass(0, NULL, NULL, NULL, NULL, "Suggestions", NULL, false) ) { if ( ClassWindow::CreateClassWindow(WS_EX_TOPMOST | WS_EX_NOACTIVATE, "SuggestionsWindow", WS_POPUP, x, y, width, height, NULL, NULL) ) { suggestParent = hParent; SetWindowPos(getHandle(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); listSuggestions.CreateThis(getHandle(), 0, 0, width, height + 12, false, false, true, 0); listSuggestions.SetFont(defaultFont, false); DoSize(); return true; } } return false; }
// Not part of the wxBookctrl API, but must be called in OnIdle or // by application to realize the toolbar and select the initial page. void wxToolbook::Realize() { if (m_needsRealizing) { m_needsRealizing = false; GetToolBar()->SetToolBitmapSize(m_maxBitmapSize); GetToolBar()->Realize(); } if (m_selection == -1) m_selection = 0; if (GetPageCount() > 0) { int sel = m_selection; m_selection = -1; SetSelection(sel); } DoSize(); }
BOOL CRebaseDlg::OnInitDialog() { CResizableStandAloneDialog::OnInitDialog(); CAppUtils::MarkWindowAsUnpinnable(m_hWnd); // Let the TaskbarButtonCreated message through the UIPI filter. If we don't // do this, Explorer would be unable to send that message to our window if we // were running elevated. It's OK to make the call all the time, since if we're // not elevated, this is a no-op. CHANGEFILTERSTRUCT cfs = { sizeof(CHANGEFILTERSTRUCT) }; typedef BOOL STDAPICALLTYPE ChangeWindowMessageFilterExDFN(HWND hWnd, UINT message, DWORD action, PCHANGEFILTERSTRUCT pChangeFilterStruct); CAutoLibrary hUser = ::LoadLibrary(_T("user32.dll")); if (hUser) { ChangeWindowMessageFilterExDFN *pfnChangeWindowMessageFilterEx = (ChangeWindowMessageFilterExDFN*)GetProcAddress(hUser, "ChangeWindowMessageFilterEx"); if (pfnChangeWindowMessageFilterEx) { pfnChangeWindowMessageFilterEx(m_hWnd, WM_TASKBARBTNCREATED, MSGFLT_ALLOW, &cfs); } } m_pTaskbarList.Release(); m_pTaskbarList.CoCreateInstance(CLSID_TaskbarList); CRect rectDummy; //IDC_REBASE_DUMY_TAB GetClientRect(m_DlgOrigRect); m_CommitList.GetClientRect(m_CommitListOrigRect); CWnd *pwnd=this->GetDlgItem(IDC_REBASE_DUMY_TAB); pwnd->GetWindowRect(&rectDummy); this->ScreenToClient(rectDummy); if (!m_ctrlTabCtrl.Create(CMFCTabCtrl::STYLE_FLAT, rectDummy, this, IDC_REBASE_TAB)) { TRACE0("Failed to create output tab window\n"); return FALSE; // fail to create } m_ctrlTabCtrl.SetResizeMode(CMFCTabCtrl::RESIZE_NO); // Create output panes: //const DWORD dwStyle = LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL; DWORD dwStyle =LVS_REPORT | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP | WS_CHILD | WS_VISIBLE; if (! this->m_FileListCtrl.Create(dwStyle,rectDummy,&this->m_ctrlTabCtrl,0) ) { TRACE0("Failed to create output windows\n"); return FALSE; // fail to create } if( ! this->m_LogMessageCtrl.Create(_T("Scintilla"),_T("source"),0,rectDummy,&m_ctrlTabCtrl,0,0) ) { TRACE0("Failed to create log message control"); return FALSE; } m_LogMessageCtrl.Init(0); m_LogMessageCtrl.Call(SCI_SETREADONLY, TRUE); dwStyle = LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL; if (!m_wndOutputRebase.Create(_T("Scintilla"),_T("source"),0,rectDummy, &m_ctrlTabCtrl, 0,0) ) { TRACE0("Failed to create output windows\n"); return -1; // fail to create } m_wndOutputRebase.Init(0); m_wndOutputRebase.Call(SCI_SETREADONLY, TRUE); m_tooltips.Create(this); m_tooltips.AddTool(IDC_REBASE_CHECK_FORCE,IDS_REBASE_FORCE_TT); m_tooltips.AddTool(IDC_REBASE_ABORT,IDS_REBASE_ABORT_TT); m_FileListCtrl.Init(GITSLC_COLEXT | GITSLC_COLSTATUS |GITSLC_COLADD|GITSLC_COLDEL , _T("RebaseDlg"),(GITSLC_POPALL ^ (GITSLC_POPCOMMIT|GITSLC_POPRESTORE)),false); m_ctrlTabCtrl.AddTab(&m_FileListCtrl,_T("Revision Files")); m_ctrlTabCtrl.AddTab(&m_LogMessageCtrl,_T("Commit Message"),1); AddRebaseAnchor(); CString sWindowTitle; GetWindowText(sWindowTitle); CAppUtils::SetWindowTitle(m_hWnd, g_Git.m_CurrentDir, sWindowTitle); EnableSaveRestore(_T("RebaseDlg")); DWORD yPos = CRegDWORD(_T("Software\\TortoiseGit\\TortoiseProc\\ResizableState\\RebaseDlgSizer")); RECT rcDlg, rcLogMsg, rcFileList; GetClientRect(&rcDlg); m_CommitList.GetWindowRect(&rcLogMsg); ScreenToClient(&rcLogMsg); this->m_ctrlTabCtrl.GetWindowRect(&rcFileList); ScreenToClient(&rcFileList); if (yPos) { RECT rectSplitter; m_wndSplitter.GetWindowRect(&rectSplitter); ScreenToClient(&rectSplitter); int delta = yPos - rectSplitter.top; if ((rcLogMsg.bottom + delta > rcLogMsg.top)&&(rcLogMsg.bottom + delta < rcFileList.bottom - 30)) { m_wndSplitter.SetWindowPos(NULL, 0, yPos, 0, 0, SWP_NOSIZE); DoSize(delta); } } if( this->m_RebaseStage == CHOOSE_BRANCH) { this->LoadBranchInfo(); } else { this->m_BranchCtrl.EnableWindow(FALSE); this->m_UpstreamCtrl.EnableWindow(FALSE); } m_CommitList.m_ColumnRegKey = _T("Rebase"); m_CommitList.m_IsIDReplaceAction = TRUE; // m_CommitList.m_IsOldFirst = TRUE; m_CommitList.m_IsRebaseReplaceGraph = TRUE; m_CommitList.InsertGitColumn(); this->SetControlEnable(); if(!this->m_PreCmd.IsEmpty()) { CProgressDlg progress; progress.m_GitCmd=m_PreCmd; progress.m_bAutoCloseOnSuccess=true; progress.DoModal(); } if(m_IsCherryPick) { this->m_BranchCtrl.SetCurSel(-1); this->m_BranchCtrl.EnableWindow(FALSE); this->m_UpstreamCtrl.AddString(_T("HEAD")); this->m_UpstreamCtrl.EnableWindow(FALSE); this->SetWindowText(_T("Cherry Pick")); this->m_CommitList.StartFilter(); } else { SetContinueButtonText(); m_CommitList.DeleteAllItems(); FetchLogList(); } m_CommitList.m_ContextMenuMask &= ~(m_CommitList.GetContextMenuBit(CGitLogListBase::ID_CHERRY_PICK)| m_CommitList.GetContextMenuBit(CGitLogListBase::ID_SWITCHTOREV)| m_CommitList.GetContextMenuBit(CGitLogListBase::ID_RESET)| m_CommitList.GetContextMenuBit(CGitLogListBase::ID_REVERTREV)| m_CommitList.GetContextMenuBit(CGitLogListBase::ID_REBASE_TO_VERSION)| m_CommitList.GetContextMenuBit(CGitLogListBase::ID_REVERTTOREV)| m_CommitList.GetContextMenuBit(CGitLogListBase::ID_COMBINE_COMMIT)); if(m_CommitList.m_IsOldFirst) this->m_CurrentRebaseIndex = -1; else this->m_CurrentRebaseIndex = m_CommitList.m_logEntries.size(); if(this->CheckRebaseCondition()) { /* Disable Start Rebase */ this->GetDlgItem(IDC_REBASE_CONTINUE)->EnableWindow(FALSE); } return TRUE; }
BOOL CImportPatchDlg::OnInitDialog() { CResizableStandAloneDialog::OnInitDialog(); CAppUtils::MarkWindowAsUnpinnable(m_hWnd); // Let the TaskbarButtonCreated message through the UIPI filter. If we don't // do this, Explorer would be unable to send that message to our window if we // were running elevated. It's OK to make the call all the time, since if we're // not elevated, this is a no-op. CHANGEFILTERSTRUCT cfs = { sizeof(CHANGEFILTERSTRUCT) }; typedef BOOL STDAPICALLTYPE ChangeWindowMessageFilterExDFN(HWND hWnd, UINT message, DWORD action, PCHANGEFILTERSTRUCT pChangeFilterStruct); CAutoLibrary hUser = ::LoadLibrary(_T("user32.dll")); if (hUser) { ChangeWindowMessageFilterExDFN *pfnChangeWindowMessageFilterEx = (ChangeWindowMessageFilterExDFN*)GetProcAddress(hUser, "ChangeWindowMessageFilterEx"); if (pfnChangeWindowMessageFilterEx) { pfnChangeWindowMessageFilterEx(m_hWnd, WM_TASKBARBTNCREATED, MSGFLT_ALLOW, &cfs); } } m_pTaskbarList.Release(); m_pTaskbarList.CoCreateInstance(CLSID_TaskbarList); CRect rectDummy; GetClientRect(m_DlgOrigRect); m_cList.GetClientRect(m_PatchListOrigRect); CWnd *pwnd=this->GetDlgItem(IDC_AM_DUMY_TAB); pwnd->GetWindowRect(&rectDummy); this->ScreenToClient(rectDummy); if (!m_ctrlTabCtrl.Create(CMFCTabCtrl::STYLE_FLAT, rectDummy, this, IDC_AM_TAB)) { TRACE0("Failed to create output tab window\n"); return FALSE; // fail to create } m_ctrlTabCtrl.SetResizeMode(CMFCTabCtrl::RESIZE_NO); // Create output panes: //const DWORD dwStyle = LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL; DWORD dwStyle =LVS_REPORT | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP |LVS_SINGLESEL |WS_CHILD | WS_VISIBLE; if( ! this->m_PatchCtrl.Create(_T("Scintilla"),_T("source"),0,rectDummy,&m_ctrlTabCtrl,0,0) ) { TRACE0("Failed to create log message control"); return FALSE; } m_PatchCtrl.Init(0); m_PatchCtrl.Call(SCI_SETREADONLY, TRUE); m_PatchCtrl.SetUDiffStyle(); dwStyle = LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL; if (!m_wndOutput.Create(_T("Scintilla"),_T("source"),0,rectDummy, &m_ctrlTabCtrl, 0,0) ) { TRACE0("Failed to create output windows\n"); return -1; // fail to create } m_wndOutput.Init(0); m_wndOutput.Call(SCI_SETREADONLY, TRUE); m_tooltips.Create(this); m_tooltips.AddTool(IDC_CHECK_3WAY,IDS_AM_3WAY_TT); m_tooltips.AddTool(IDC_CHECK_IGNORE_SPACE,IDS_AM_IGNORE_SPACE_TT); m_ctrlTabCtrl.AddTab(&m_PatchCtrl,_T("Patch"),0); m_ctrlTabCtrl.AddTab(&m_wndOutput,_T("Log"),1); AddAmAnchor(); m_PathList.SortByPathname(true); m_cList.SetExtendedStyle( m_cList.GetExtendedStyle()| LVS_EX_CHECKBOXES ); for(int i=0;i<m_PathList.GetCount();i++) { m_cList.InsertItem(0,m_PathList[i].GetWinPath()); m_cList.SetCheck(0,true); } DWORD yPos = CRegDWORD(_T("Software\\TortoiseGit\\TortoiseProc\\ResizableState\\AMDlgSizer")); RECT rcDlg, rcLogMsg, rcFileList; GetClientRect(&rcDlg); m_cList.GetWindowRect(&rcLogMsg); ScreenToClient(&rcLogMsg); this->m_ctrlTabCtrl.GetWindowRect(&rcFileList); ScreenToClient(&rcFileList); if (yPos) { RECT rectSplitter; m_wndSplitter.GetWindowRect(&rectSplitter); ScreenToClient(&rectSplitter); int delta = yPos - rectSplitter.top; if ((rcLogMsg.bottom + delta > rcLogMsg.top)&&(rcLogMsg.bottom + delta < rcFileList.bottom - 30)) { m_wndSplitter.SetWindowPos(NULL, 0, yPos, 0, 0, SWP_NOSIZE); DoSize(delta); } } CAppUtils::SetListCtrlBackgroundImage(m_cList.GetSafeHwnd(), IDI_IMPORTPATHCES_BKG); CString sWindowTitle; GetWindowText(sWindowTitle); CAppUtils::SetWindowTitle(m_hWnd, g_Git.m_CurrentDir, sWindowTitle); EnableSaveRestore(_T("ImportDlg")); SetSplitterRange(); return TRUE; }
void CWallChangerDlg::OnSize(UINT nType, int cx, int cy) { __super::OnSize(nType, cx, cy); DoSize(); }
void MyFrame::OnSize(wxSizeEvent& event) { DoSize(); event.Skip(); }
BOOL CImportPatchDlg::OnInitDialog() { CResizableStandAloneDialog::OnInitDialog(); CAppUtils::MarkWindowAsUnpinnable(m_hWnd); // Let the TaskbarButtonCreated message through the UIPI filter. If we don't // do this, Explorer would be unable to send that message to our window if we // were running elevated. It's OK to make the call all the time, since if we're // not elevated, this is a no-op. CHANGEFILTERSTRUCT cfs = { sizeof(CHANGEFILTERSTRUCT) }; typedef BOOL STDAPICALLTYPE ChangeWindowMessageFilterExDFN(HWND hWnd, UINT message, DWORD action, PCHANGEFILTERSTRUCT pChangeFilterStruct); CAutoLibrary hUser = AtlLoadSystemLibraryUsingFullPath(L"user32.dll"); if (hUser) { auto pfnChangeWindowMessageFilterEx = reinterpret_cast<ChangeWindowMessageFilterExDFN*>(GetProcAddress(hUser, "ChangeWindowMessageFilterEx")); if (pfnChangeWindowMessageFilterEx) pfnChangeWindowMessageFilterEx(m_hWnd, TaskBarButtonCreated, MSGFLT_ALLOW, &cfs); } m_pTaskbarList.Release(); if (FAILED(m_pTaskbarList.CoCreateInstance(CLSID_TaskbarList))) m_pTaskbarList = nullptr; CRect rectDummy; GetClientRect(m_DlgOrigRect); m_cList.GetClientRect(m_PatchListOrigRect); CWnd *pwnd=this->GetDlgItem(IDC_AM_DUMY_TAB); pwnd->GetWindowRect(&rectDummy); this->ScreenToClient(rectDummy); if (!m_ctrlTabCtrl.Create(CMFCTabCtrl::STYLE_FLAT, rectDummy, this, IDC_AM_TAB)) { TRACE0("Failed to create output tab window\n"); return FALSE; // fail to create } m_ctrlTabCtrl.SetResizeMode(CMFCTabCtrl::RESIZE_NO); // Create output panes: if (!m_PatchCtrl.Create(L"Scintilla", L"source", 0, rectDummy, &m_ctrlTabCtrl, 0, 0)) { TRACE0("Failed to create log message control"); return FALSE; } m_PatchCtrl.Init(-1); m_PatchCtrl.Call(SCI_SETREADONLY, TRUE); m_PatchCtrl.SetUDiffStyle(); if (!m_wndOutput.Create(L"Scintilla", L"source", 0, rectDummy, &m_ctrlTabCtrl, 0, 0)) { TRACE0("Failed to create output windows\n"); return -1; // fail to create } m_wndOutput.Init(-1); m_wndOutput.Call(SCI_SETREADONLY, TRUE); m_tooltips.AddTool(IDC_CHECK_3WAY,IDS_AM_3WAY_TT); m_tooltips.AddTool(IDC_CHECK_IGNORE_SPACE,IDS_AM_IGNORE_SPACE_TT); m_ctrlTabCtrl.AddTab(&m_PatchCtrl, CString(MAKEINTRESOURCE(IDS_PATCH)), 0); m_ctrlTabCtrl.AddTab(&m_wndOutput, CString(MAKEINTRESOURCE(IDS_LOG)), 1); AdjustControlSize(IDC_CHECK_3WAY); AdjustControlSize(IDC_CHECK_IGNORE_SPACE); AdjustControlSize(IDC_SIGN_OFF); AdjustControlSize(IDC_KEEP_CR); AddAmAnchor(); m_PathList.SortByPathname(true); m_cList.SetExtendedStyle(m_cList.GetExtendedStyle() | LVS_EX_CHECKBOXES | LVS_EX_DOUBLEBUFFER); m_cList.InsertColumn(0, L""); m_cList.SetExtendedStyle((CRegDWORD(L"Software\\TortoiseGit\\FullRowSelect", TRUE) ? LVS_EX_FULLROWSELECT : 0) | m_cList.GetExtendedStyle()); for (int i = 0; i < m_PathList.GetCount(); ++i) { m_cList.InsertItem(0,m_PathList[i].GetWinPath()); m_cList.SetCheck(0,true); } m_cList.SetColumnWidth(0, LVSCW_AUTOSIZE); DWORD yPos = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\ResizableState\\AMDlgSizer"); RECT rcDlg, rcLogMsg, rcFileList; GetClientRect(&rcDlg); m_cList.GetWindowRect(&rcLogMsg); ScreenToClient(&rcLogMsg); this->m_ctrlTabCtrl.GetWindowRect(&rcFileList); ScreenToClient(&rcFileList); if (yPos) { RECT rectSplitter; m_wndSplitter.GetWindowRect(&rectSplitter); ScreenToClient(&rectSplitter); int delta = yPos - rectSplitter.top; if ((rcLogMsg.bottom + delta > rcLogMsg.top) && (rcLogMsg.bottom + delta < rcFileList.bottom - CDPIAware::Instance().ScaleY(30))) { m_wndSplitter.SetWindowPos(nullptr, 0, yPos, 0, 0, SWP_NOSIZE); DoSize(delta); } } CAppUtils::SetListCtrlBackgroundImage(m_cList.GetSafeHwnd(), IDI_IMPORTPATHCES_BKG); CString sWindowTitle; GetWindowText(sWindowTitle); CAppUtils::SetWindowTitle(m_hWnd, g_Git.m_CurrentDir, sWindowTitle); EnableSaveRestore(L"ImportDlg"); SetSplitterRange(); return TRUE; }
void wxBookCtrlBase::OnSize(wxSizeEvent& event) { event.Skip(); DoSize(); }
FX_BOOL CFWL_NoteDriver::DispatchMessage(CFWL_Message* pMessage, IFWL_Widget* pMessageForm) { FX_BOOL bRet = FALSE; switch (pMessage->GetClassID()) { case FWL_MSGHASH_Activate: { bRet = DoActivate(static_cast<CFWL_MsgActivate*>(pMessage), pMessageForm); break; } case FWL_MSGHASH_Deactivate: { bRet = DoDeactivate(static_cast<CFWL_MsgDeactivate*>(pMessage), pMessageForm); break; } case FWL_MSGHASH_SetFocus: { bRet = DoSetFocus(static_cast<CFWL_MsgSetFocus*>(pMessage), pMessageForm); break; } case FWL_MSGHASH_KillFocus: { bRet = DoKillFocus(static_cast<CFWL_MsgKillFocus*>(pMessage), pMessageForm); break; } case FWL_MSGHASH_Key: { bRet = DoKey(static_cast<CFWL_MsgKey*>(pMessage), pMessageForm); break; } case FWL_MSGHASH_Mouse: { bRet = DoMouse(static_cast<CFWL_MsgMouse*>(pMessage), pMessageForm); break; } case FWL_MSGHASH_MouseWheel: { bRet = DoWheel(static_cast<CFWL_MsgMouseWheel*>(pMessage), pMessageForm); break; } case FWL_MSGHASH_Size: { bRet = DoSize(static_cast<CFWL_MsgSize*>(pMessage)); break; } case FWL_MSGHASH_Cursor: { bRet = TRUE; break; } case FWL_MSGHASH_WindowMove: { bRet = DoWindowMove(static_cast<CFWL_MsgWindowMove*>(pMessage), pMessageForm); break; } case FWL_MSGHASH_DropFiles: { bRet = DoDragFiles(static_cast<CFWL_MsgDropFiles*>(pMessage), pMessageForm); break; } default: { bRet = TRUE; break; } } if (bRet) { IFWL_WidgetDelegate* pDelegate = pMessage->m_pDstTarget->SetDelegate(NULL); if (pDelegate) { pDelegate->OnProcessMessage(pMessage); } } return bRet; }