diff options
| author | Kevin Wasserman <kevin.wasserman@painless-security.com> | 2012-08-01 12:19:12 -0400 |
|---|---|---|
| committer | Ben Kaduk <kaduk@mit.edu> | 2012-08-24 12:21:44 -0400 |
| commit | b32bad9b36671702d439ee1089ce0060280f213b (patch) | |
| tree | eff2a563498850cfe0e3707e94daf1b6e9a5e059 /src/windows/leash/MainFrm.cpp | |
| parent | d0b0d8e231b27ff9e27b4615fceee094b06cf60c (diff) | |
| download | krb5-b32bad9b36671702d439ee1089ce0060280f213b.tar.gz krb5-b32bad9b36671702d439ee1089ce0060280f213b.tar.xz krb5-b32bad9b36671702d439ee1089ce0060280f213b.zip | |
kfw implement ribbon UI
Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7248 (new)
queue: kfw
target_version: 1.10.4
tags: pullup
Diffstat (limited to 'src/windows/leash/MainFrm.cpp')
| -rw-r--r-- | src/windows/leash/MainFrm.cpp | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/src/windows/leash/MainFrm.cpp b/src/windows/leash/MainFrm.cpp index 2332a1b8b..15c01579c 100644 --- a/src/windows/leash/MainFrm.cpp +++ b/src/windows/leash/MainFrm.cpp @@ -87,6 +87,22 @@ CMainFrame::~CMainFrame() int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { + if (CLeashApp::m_useRibbon) { + CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows7)); + CDockingManager::SetDockingMode(DT_SMART); + m_wndRibbonBar.SetWindows7Look(TRUE); + + // Create the ribbon bar + if (!m_wndRibbonBar.Create(this)) + return -1; // Failed to create ribbon bar + + m_wndRibbonBar.LoadFromResource(IDR_RIBBON1); + + m_wndApplicationButton.SetVisible(FALSE); + // Uncomment the next line to hide the application button + //m_wndRibbonBar.SetApplicationButton(&m_wndApplicationButton, CSize()); + } + if (CLeashFrame::OnCreate(lpCreateStruct) == -1) return -1; @@ -135,8 +151,8 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) } // TODO: Remove this if you don't want tool tips or a resizeable toolbar - m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | - CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + //m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | + // CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); // TODO: Delete these three lines if you don't want the toolbar to // be dockable @@ -160,11 +176,11 @@ BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { // Use the specific class name we established earlier // Remove the Minimize and Maximize buttons - cs.style &= ~WS_MINIMIZEBOX; +// cs.style &= ~WS_MINIMIZEBOX; cs.style &= ~WS_MAXIMIZEBOX; // Initialize the extended window style to display a TaskBar entry with WS_EX_APPWINDOW cs.dwExStyle |= WS_EX_APPWINDOW; - cs.dwExStyle |= WS_EX_OVERLAPPEDWINDOW ; +// cs.dwExStyle |= WS_EX_OVERLAPPEDWINDOW ; cs.lpszClass = _T("LEASH.0WNDCLASS"); cs.lpszName = _T("Leash32"); @@ -364,8 +380,12 @@ void CMainFrame::OnClose(void) LRESULT CMainFrame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) { BOOL oldMin = m_isMinimum; + printf("CMainFrame::WindowProc() Msg: %x, WPARAM: %x, LPARAM: %x\n", message, wParam, lParam); switch(message) { + case WM_CLOSE: + printf("received WM_CLOSE!"); + break; case WM_SIZE: switch ( wParam ) { case SIZE_MINIMIZED: |
