[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 181
  • Last Modified:

Double Left Click of MDI bypass

I have a MDI app.  When the uses double-left clicks the child caption, the default behavior is to maximizes the child.  How do I bypass the double left mouse click on the child MDI caption bar?  All suggestions welcome and code samples greatly appreciated.
0
Surfer
Asked:
Surfer
1 Solution
 
Vinayak KumbarSr Program ManagerCommented:
Hi,

Using class wizard map the WindowProc function to ur child frame class and modify that function as


LRESULT CChildFrame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
     if((message == WM_NCLBUTTONDBLCLK) && (wParam == HTCAPTION))
     {
          AfxMessageBox("Hit Caption of child!!!");
          return 0;//I am terminating as I dont want my child frame to maximize!!!
     }
     return CMDIChildWnd::WindowProc(message, wParam, lParam);
}

That will give u access when user double clicks on caption bar.
Try it out.
VinExpert
0
 
SurferAuthor Commented:
Just what I needed!
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now