• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

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

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
mweagle
Asked:
mweagle
  • 3
  • 2
1 Solution
 
tflaiCommented:
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
 
mweagleAuthor Commented:
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
 
mweagleAuthor Commented:
If you can't solve it, avoid it:  I tried using WM_ACTIVATE instead and it works fine.  Thanks for the help.
0
 
tflaiCommented:
Sorry about that.  I didn't check my work e-mail till today.
0
 
mweagleAuthor Commented:
I guess I can't take back the points, huh?  :)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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