Hi all, Is there an easy way to save the current CMFCpropertyPage number when closing a CMFCPropertySheet so that it can be reopened on that page. It seems that this is not implemented by default.
User 13219589
Posts
-
MFC: CMFCPropertysheet CMFCPropertypage -
CMFCRibbonComboBoxThese are derived from CComboBox, not from CMFCRibbonComboBox. We are in a C++ MFC thread
-
CMFCRibbonComboBoxAny url?
-
OnMouseWheel and OnSetCursor interactionActually SendMessage(WM_SETCURSOR, 0, 0 or use default) before zooming does the trick.
-
CMFCRibbonComboBoxThere are many examples of CMFCRibbonComboBox that display simple text. I am actually looking for a CMFCRibbonComboBox example that display image or something like graphic, or say is ownerdraw. Unless I mistake, I think CMFCRibbonComboBox class and inherited classes have ownerdraw capabilities since in afxribboncombobox.cpp there is a Draw and OnDrawLabelAndImage and others functions with CDC arguments. Unfortunately, without step by step example, it is very difficult to implement such a class. Any links or suggestions are welcomed
Pierre
-
MFC: Most recently used (MRU) filesWorks fine. Thanks Piere
-
MFC: Most recently used (MRU) filesMicrosoft Visual C++ 2019. Windows 10, using MFC Is there a nice step by step example of code showing how to use the MRU in a standard SDI application with ribbon and without document/view architecture? My used files (*.jpg, *.bmp) are well stored in the MRU file list of the main menu of the ribbon. But when I click on one of them I have an error in .../MFC/appui.cpp showing that ENSURE_VALID(m_pDocManager) failed, which is normal because I did not choose doc/view support. Is there any way out, unless completely rewriting a new project with pDocManager? Pierre
-
OnMouseWheel and OnSetCursor interactionUnder debugger m_bMouseWheel (which is global to the class) is always true. The problem is maybe that OnSetCursor is not triggered during that time (one mousewheel). The doc say that "The WM_SETCURSOR message is sent to a window if the mouse causes the cursor to move within a window" which is not the case when mousewheeling. So I am thinking on SendMessage(WM_SETCURSOR, some "params") before entering Zoom function. But actually I do not know what to use as "params". Is it a good track? Pierre
-
OnMouseWheel and OnSetCursor interactionHi all, I have the following code which works for zooming in and out BOOL CChildView::OnMouseWheel(UINT nFlags, short zDelta, CPoint point) { if (theApp.pBitmap) { //Caution! point is in screen coordinate! CPoint pClient = point; ScreenToClient(&pClient); if (crDest.PtInRect(pClient)) { m_bMouseWheel = TRUE; if (zDelta == 120) { OnZoomPlus(pClient); } else if (zDelta == -120) { OnZoomMinus(pClient); } m_bMouseWheel = FALSE; } else PlaySound(MAKEINTRESOURCE(IDR_WAV_SPRING), GetModuleHandle(NULL), SND_RESOURCE); } return TRUE; } Normally in SetCursor, the BOOL m_bMouseWheel would change the cursor BOOL CChildView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) { if (m_bMouseDown || m_bMouseWheel)//Todo::Doesnot work for m_bMouseWheel { ::SetCursor(LoadCursor(NULL, IDC_SIZEALL)); return TRUE; } if (theApp.m_hLenseCursor && theApp.bTrackLenseMode) { ::SetCursor(theApp.m_hLenseCursor); return TRUE; } else { ::SetCursor(::LoadCursor(NULL, IDC_ARROW)); } return CWnd::OnSetCursor(pWnd, nHitTest, message); } but actually nothing happens. Any suggestion? Pierre