Solved

Double Left Click of MDI bypass

Posted on 2002-03-22
2
164 Views
Last Modified: 2013-11-20
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
Comment
Question by:Surfer
2 Comments
 
LVL 8

Accepted Solution

by:
VinExpert earned 200 total points
ID: 6888198
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
 

Author Comment

by:Surfer
ID: 6888214
Just what I needed!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question