CompuServe Thread

#popup child window

5 messages in this thread
#30494From: Chit V LeungJul 11, 1994 9:25 AM
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
#30546From: Steve McAdamsJul 11, 1994 3:01 PM
(I'm not MS.) Sounds like either a z-order or a WS_CLIPSIBLINGS problem, most likely you don't have WS_CLIPSIBLINGS specified for the new window. Suggest you run SPY and see (a) that you have a "real" window instead of something that just looks like a window but isn't (it can happen), and (b) what style bits are specified for both the button and the new window. -steve
#30670From: Chit V LeungJul 12, 1994 10:24 AM
After I put the WS_CLIPSIBLINGS in my CreateEx, when I clicked the small button the new child window popup and this time it DID NOT cover the small button (which means it is even worse!). And as before if I moved the cursor to the area where the new window and button overlapped the WM message still goes to the button. I have used SPY to check the windows, the new window is really a window and its style bit is 50000000 (WS_CHILD) Thanks Chit
#30679From: Steve McAdamsJul 12, 1994 11:30 AM
>> this time it DID NOT cover the small button (which means it is even worse!) << I don't think it's even worse. I think you need to do a BringWindowToTop so the new window will cover the button. -steve
#30708From: Chit V LeungJul 12, 1994 2:58 PM
After I called BringWindowToTop, the WM messages no longer went to the button, they all went to the new window. But the button still covered by the new window! Chit