CompuServe Messages

#popup child window

    11-Jul-94 09:25:42
Sb: #popup child window
Fm: Chit V Leung 74323,2143
To: all
I have a small button on my formview. By clicking the button, I want a window to be created and covered the small button. And by clicking the new window or anywhere in the formview, the new window will be closed. (I want a behaviour similar to those popup calendar found in some popular Personal Information Manager). I have used the CreateEx with WS_CHILD and parent window = the formview! (I use WS_CHILD because I want the new window to move along with the parent window and also the color of the caption bar of the formview won't change when the new window is clicked) The problem here is: when the new window first shown on the screen it did covered the small button but if I moved the cursor to the area where the new window and button overlapped the WM message still goes to the button and if I click that area the button is no longer hidden by the new window instead the button covered the new window! Can someone give me an idea why is this happening and what is the workaround? Thanks Chit