Click here to Skip to main content
15,910,787 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow do I create popup submenus dynamically Pin
Mike newberry12-Jun-00 5:52
sussMike newberry12-Jun-00 5:52 
AnswerRe: How do I create popup submenus dynamically Pin
GeVanCo19-Jun-00 20:11
GeVanCo19-Jun-00 20:11 
GeneralRe: How do I create popup submenus dynamically Pin
GeVanCo19-Jun-00 20:20
GeVanCo19-Jun-00 20:20 
GeneralLocalization (Date Time Numeric Currency Pin
Gary12-Jun-00 4:45
Gary12-Jun-00 4:45 
GeneralRe: Localization (Date Time Numeric Currency Pin
Mike Dunn12-Jun-00 9:45
Mike Dunn12-Jun-00 9:45 
GeneralAdding to IE context menu Pin
Bhaskar12-Jun-00 4:28
Bhaskar12-Jun-00 4:28 
GeneralUsing Bookmarks with Jet OLEDB Provider Pin
QamarAlZaman Habeek12-Jun-00 1:21
sussQamarAlZaman Habeek12-Jun-00 1:21 
Generalactivating a view with a mouse click Pin
Steve Kearon11-Jun-00 22:39
Steve Kearon11-Jun-00 22:39 
I'd like to make my MFC/VC++5 doc-view MDI program work like Microsoft Word: when the user clicks on an inactive view then that click ONLY selects the view rather than selecting the stuff within the view.

The standard MFC behaviour selects the view and ALSO passes the mouse click to the view.

I *think* the solution lies with CView::OnMouseActivate() which is called by the framework during the click. My initial attempt simply used default processing then converted an "activate" return into a "activate-but-ignore-click" return:

afx_msg int CMyView::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)
{
int nResult = CView::OnMouseActivate(pDesktopWnd, nHitTest, message);
if (nResult == MA_ACTIVATE)
nResult = MA_ACTIVATEANDEAT;
return nResult;
}

This works great. Too great...

Now ALL mouse clicks get ignored! There's something in the back of my mind about MDI behaviour here.

Am I on the right track ?

Am I missing some step ?

Many thanks
Steve

GeneralRemoving DLL exports Pin
Ben Burnett11-Jun-00 21:38
Ben Burnett11-Jun-00 21:38 
GeneralRe: Removing DLL exports Pin
Tim Deveaux12-Jun-00 12:41
Tim Deveaux12-Jun-00 12:41 
GeneralResource Difference Tool Pin
Blake Miller11-Jun-00 17:48
Blake Miller11-Jun-00 17:48 
GeneralRe: Resource Difference Tool Pin
Paolo Messina12-Jun-00 11:30
professionalPaolo Messina12-Jun-00 11:30 
GeneralLearning ATL Pin
Ryan Park11-Jun-00 15:07
Ryan Park11-Jun-00 15:07 
GeneralRe: Learning ATL Pin
Alex Gorev12-Jun-00 4:03
Alex Gorev12-Jun-00 4:03 
GeneralRe: Learning ATL Pin
Alfadhly12-Jun-00 5:42
sussAlfadhly12-Jun-00 5:42 
GeneralLearning MFC Pin
Donnie11-Jun-00 6:00
Donnie11-Jun-00 6:00 
GeneralRe: Learning MFC Pin
Arvind2311-Jun-00 10:05
Arvind2311-Jun-00 10:05 
GeneralRe: Learning MFC Pin
Buck12-Jun-00 15:14
Buck12-Jun-00 15:14 
GeneralRe: Learning MFC Pin
GeVanCo14-Jun-00 8:33
GeVanCo14-Jun-00 8:33 
QuestionHow to Silence an Activex 's errors Pin
Buck10-Jun-00 22:55
Buck10-Jun-00 22:55 
AnswerRe: How to Silence an Activex 's errors Pin
Alvaro Mendez13-Jun-00 5:42
Alvaro Mendez13-Jun-00 5:42 
GeneralRe: How to Silence an Activex 's errors Pin
Colin davies13-Jun-00 18:16
Colin davies13-Jun-00 18:16 
GeneralMy Vis Studio editor runs like a dog Pin
Andrew Torrance9-Jun-00 0:14
Andrew Torrance9-Jun-00 0:14 
GeneralRe: My Vis Studio editor runs like a dog Pin
Frank Deo9-Jun-00 3:35
Frank Deo9-Jun-00 3:35 
GeneralRe: My Vis Studio editor runs like a dog Pin
Robin9-Jun-00 11:23
Robin9-Jun-00 11:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.