Solved

Modeless dialog w/push-pin -- like VC5 "Properties"

Posted on 1998-03-22
5
257 Views
Last Modified: 2013-11-19
I'm trying to create a modeless dialog with push-pin support, like the one in VC5 "Properties" dialog.  I've got the pin working, but I can't figure out how to notify the dialog that it has lost focus.  When the pin is not "pinned" I want the dialog to hide itself if the user clicks on the main CFormView, otherwise to update itself with new data; very similar to VC5's popup.  What messages do I need to look for in the dialog to accomplish this?  Any help would be great.  Thanks.
0
Comment
Question by:mweagle
  • 3
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
tflai earned 120 total points
ID: 1317146
In MSVC, if you use Spy++ to look through windows, the "Property" dialog box is always there.  In "unpinned" state, whenever it receives WM_KILLFOCUS, it hides itself.
0
 

Author Comment

by:mweagle
ID: 1317147
Exactly, but it seems that WM_KILLFOCUS is never making it to my dialog.  I should also mention that both the main CFormView and the popup dialog have custom controls on them.  I don't know if this is relevant, but better safe than sorry.

Spy++ tells me different things in NT and 95:
NT: WM_KILLFOCUS does get sent to the popup dialog, but if you try to catch it in either PreTranslateMessage or OnKillFocus, it never seems to show up.

95: WM_KILLFOCUS never gets called for the dialog.  

Could I try WM_ACTIVATE?  Thanks for the reply.  
0
 

Author Comment

by:mweagle
ID: 1317148
If you can't solve it, avoid it:  I tried using WM_ACTIVATE instead and it works fine.  Thanks for the help.
0
 
LVL 4

Expert Comment

by:tflai
ID: 1317149
Sorry about that.  I didn't check my work e-mail till today.
0
 

Author Comment

by:mweagle
ID: 1317150
I guess I can't take back the points, huh?  :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

914 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now