Message about control visiblity

What is the message which is sent when the control is shown/hidden ? I tried 
WM_SHOW_WINDOW but it isn't sent in all cases. I have a child window ( it is 
my control ) and call ShowWindow(SW_SHOW),ShowWindow(SW_HIDE) on the parent. 
Main window gets notifications, but they are not propagated down do the 
childs.


Thanks in advance,
Kamil 


0
kamildobk (41)
8/23/2006 7:58:36 AM
vc.mfc 33608 articles. 0 followers. Follow

6 Replies
644 Views

Similar Articles

[PageSpeed] 1

WM_SHOW.  There is no WM_SHOW_WINDOW message.  And no, parent messages are not propagated
to the child.  
				joe

On Wed, 23 Aug 2006 09:58:36 +0200, "kamil" <kamildobk@xxxpoczta.onet.pl> wrote:

>What is the message which is sent when the control is shown/hidden ? I tried 
>WM_SHOW_WINDOW but it isn't sent in all cases. I have a child window ( it is 
>my control ) and call ShowWindow(SW_SHOW),ShowWindow(SW_HIDE) on the parent. 
>Main window gets notifications, but they are not propagated down do the 
>childs.
>
>
>Thanks in advance,
>Kamil 
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
8/23/2006 1:16:02 PM
If you hide the parent window using ShowWindow(SW_HIDE) it will also hide 
all child windows.

Tom

"kamil" <kamildobk@xxxpoczta.onet.pl> wrote in message 
news:usgyxnoxGHA.4876@TK2MSFTNGP05.phx.gbl...
> What is the message which is sent when the control is shown/hidden ? I 
> tried WM_SHOW_WINDOW but it isn't sent in all cases. I have a child window 
> ( it is my control ) and call ShowWindow(SW_SHOW),ShowWindow(SW_HIDE) on 
> the parent. Main window gets notifications, but they are not propagated 
> down do the childs.
>
>
> Thanks in advance,
> Kamil
> 


0
tserface (3861)
8/23/2006 3:12:44 PM
> What is the message which is sent when the control is shown/hidden ? I tried
> WM_SHOW_WINDOW but it isn't sent in all cases. I have a child window ( it is
> my control ) and call ShowWindow(SW_SHOW),ShowWindow(SW_HIDE) on the parent.
> Main window gets notifications, but they are not propagated down do the
> childs.
>

WM_SHOWWINDOW does not get to the child controls. I used spy++ and
found that about the only thing that child control was getting was
WM_WINDOWPOSCHANGING/CHANGED messages. You could key off that one and
check the WS_VISIBLE bit to see if the control has been hidden/shown.
Play with Spy++ and see what messages you get for your control.

---
Ajay

0
ajaykalra (6842)
8/23/2006 3:23:18 PM
My error.  I'm used to OnShow.  It is WM_SHOWWINDOW.

If you are hiding the parent, the state of the child makes no difference at all, which is
why it doesn't get an explicit notifcation.  If you show/hide the child, it will receive
the notifications.
				joe

On Wed, 23 Aug 2006 09:16:02 -0400, Joseph M. Newcomer <newcomer@flounder.com> wrote:

>WM_SHOW.  There is no WM_SHOW_WINDOW message.  And no, parent messages are not propagated
>to the child.  
>				joe
>
>On Wed, 23 Aug 2006 09:58:36 +0200, "kamil" <kamildobk@xxxpoczta.onet.pl> wrote:
>
>>What is the message which is sent when the control is shown/hidden ? I tried 
>>WM_SHOW_WINDOW but it isn't sent in all cases. I have a child window ( it is 
>>my control ) and call ShowWindow(SW_SHOW),ShowWindow(SW_HIDE) on the parent. 
>>Main window gets notifications, but they are not propagated down do the 
>>childs.
>>
>>
>>Thanks in advance,
>>Kamil 
>>
>Joseph M. Newcomer [MVP]
>email: newcomer@flounder.com
>Web: http://www.flounder.com
>MVP Tips: http://www.flounder.com/mvp_tips.htm
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
8/24/2006 2:22:00 AM
If the show/hide happens as a consequence of the parent being shown/hidden, the window
doesn't get a notification.  It shouldn't matter.
				joe

On 23 Aug 2006 08:23:18 -0700, "Ajay Kalra" <ajaykalra@yahoo.com> wrote:

>> What is the message which is sent when the control is shown/hidden ? I tried
>> WM_SHOW_WINDOW but it isn't sent in all cases. I have a child window ( it is
>> my control ) and call ShowWindow(SW_SHOW),ShowWindow(SW_HIDE) on the parent.
>> Main window gets notifications, but they are not propagated down do the
>> childs.
>>
>
>WM_SHOWWINDOW does not get to the child controls. I used spy++ and
>found that about the only thing that child control was getting was
>WM_WINDOWPOSCHANGING/CHANGED messages. You could key off that one and
>check the WS_VISIBLE bit to see if the control has been hidden/shown.
>Play with Spy++ and see what messages you get for your control.
>
>---
>Ajay
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
8/24/2006 2:22:58 AM
> If the show/hide happens as a consequence of the parent being shown/hidden, the window
> doesn't get a notification.  It shouldn't matter.


I think OP was keying off the WM_SHOWWINDOW message in the control when
the parent is hidden. At least thats what I understood.

---
Ajay

0
ajaykalra (6842)
8/24/2006 2:50:37 AM
Reply:

Similar Artilces:

static message handlers
Is it possible to assign static method as command handler without additional nonstatic wrapper method? I.e. now I have some handlers looking like this: void OnStaticJob() {CMyClass::DoStaticJob();} Another problem is CCmdUI update handlers, which enables/disables command according to BOOL IsX() method result. I have these BOOL IsX() methods, but there is no way to 'connect' them with command update handlers, so I need to define wrapper handlers, which just does this code: OnUpdateX(CCmdUI* pCmdUI) {pCmdUI->Enable(IsX());} Maybe there is more elegant solutions for these problems? T...

Office Error Message
I reinstalled Microsoft Office 2004 and now when I open any of the Microsoft Office applications I get the following message "An unexpexted error occured while trying to load the Microsoft Framework library".....why is this happening now??? How do I get rid of it? Is this a problem??? Hi, You'll get that message until you install the Office updates. From the Help menu of any office application choose "Check For Updates." You can obtain the updates from Mactopia's download section, as well. -Jim Gordon MacMVP Quoting from "jasonwozniak@yahoo.com" &l...

Error Messages in CRM Trace
Hello, I'm getting the following Eror Messages in my CRM 4.0 Trace. This Error Message occours every minute, even when nobody is using the CRM. I think this error comes from a background service because I never got an error message when using CRM. Has someone an idea how to solve the problem? with regards Janis ----- [2008-10-17 09:53:29.6] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 1 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error | CrmException..ctor at CrmException..ctor(String message, Exception innerException, ...

The Operation Failed message
I had Outlook 2003 installed on my PC but I uninstalled it and installed Outlook 2002. Now when I click on the Send/Receive button, I get this message: 'The Operation Failed' I click on OK and the window goes away but I don't get any messages. I've removed my email account in Outlook. I created a new .pst file. I've uninstalled and reinstalled Office 2002. All with no luck. Any ideas? Matt, you wrote on Thu, 15 Sep 2005 14:39:57 -0500: > I had Outlook 2003 installed on my PC but I uninstalled it and installed > Outlook 2002. Now when I click on the Send...

Tooltip position incorrect for controls added to CToolbar.
I have a toolbar derived from CToolbar control. The tooltip displays BELOW the cursor as expected for buttons on this toolbar. However, this toolbar also has several CSliderbar controls (used for adjusting volumes, and show the progress). The tooltip for the CSliderbar controls always displays right below the control, centered, regardless where the mouse cursor is. As a result, the cursor will often block the tooltip. I've tried using TTN_SHOW to get notifications when the tooltip is about to appear, then call SetWindowPos. The only thing it was successful at was changing the dimension of...

Clicking on Link within e-mail results in access denied message
My Mother-In-Law is having a problem opening links sent to her within E-mails with Outlook. When she clicks on them, it yields an error message that tells her to contact the system administrator, that her access is denied. This is a home PC with a new installation of Windows XP. Does anyone know what steps she can take to fix this? Thanks! -Steve ...

Force Text-Only Viewing of Messages in Outlook 2000
I'd like all my email to come in as text only and not view the rendered HTML page by default. Using Outlook 2000 and XP Pro, is this possible? BrianEWilliams <sorry_no_email@yahoo.com> wrote: > I'd like all my email to come in as text only and not view the > rendered HTML page by default. Using Outlook 2000 and XP Pro, is > this possible? The option to read all mail in Plain Text was not introduced until Outlook 2002. -- Brian Tillman Brian Tillman wrote: > BrianEWilliams <sorry_no_email@yahoo.com> wrote: > > > I'd like all my email to c...

Archiving all messages in Exchange 2003 ?
Is it possible to effectively BCC a copy of every message through the exchange( internally and externally IN/OUT) into some sort of PST file or folder which can be archived off somewhere and deleted at regular intervals ? Any help much appreciated. TIA Gary Sure: http://www.msexchange.org/tutorials/MF011.html -- Neil Hobson Exchange MVP For Exchange news, links, and tips, check: http://www.msexchangeblog.com "Gary D" <gary@admp.fsnet.co.uk> wrote in message news:e7qYko0kFHA.3436@tk2msftngp13.phx.gbl... > Is it possible to effectively BCC a copy of every message thr...

Changing a Tab Control's properties at runtime
Hi, I have got a form on which is a basic Tab Control, what I would like to do is either change the colour of a tab when selected on add an embeded picture to it, then remove the colour/picture when another tab is selected. Is this possible and if it is how? Many Thanks Graham Stephen Lebans has a way to color the tabs: http://www.lebans.com/tabcolors.htm -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Graham Naylor" <spam@spam2.co> wrote in...

Automatic reply to messages
I am a new Outlook user and have difficulty trying to set up an automatic repsonse to messages. I create the email and save it as a user defined template. The send to field is blank and i just add content to the body of the message. I then create a rule and reference this template. Is there anything else i need to do ... My rule has 3 conditions ... look for a specific email address conming in, reply using template and move message to a specific folder. The rule does 1 and 3 ok but not send out a reply .. Any comments are appreciated. Thanks. Cheers, Seamus You don't say wha...

How can I design a Control Chart with Excel?
How can I design a Control Chart, i.e., for an Industrial production statistical control, with its lower and upper limit lines (+ - 3 sigmas)? Thanks very much. Jon Peltier has several examples on his site that should help: http://peltiertech.com/Excel/Charts/RunChtLines.html http://peltiertech.com/Excel/Charts/statscharts.html -- John "Carlos" wrote: > How can I design a Control Chart, i.e., for an Industrial production > statistical control, with its lower and upper limit lines (+ - 3 sigmas)? > Thanks very much. Carlos: Here's a link to another example. ...

ActiveX App-wizard generated control and memory leaks
Hi, I use Visual Studio 2008 version 9.21022.8 RTM I have created a ActiveX control project using App-wizard. (Only what it generated, no programming done !) I have created a CDialog project using App-wizard. (nothing more) I have put this ActiveX control on the dialog an created an instance of this control in the CDialog class. I have not done anything else than that. If i run the ActiveX project and then close the dialog which shows the activex control i get a memory leak dump: Info: AfxDllCanUnloadNow returning S_OK Detected memory leaks! Dumping objects -> f:\dd\vctools...

cannot enter text in an Outlook message
The message pane has a small blinking dot in the middle. I cannot enter text. I hit a key or two by accident. How do I fix? ...

Service, Threads and Messages
I'm working on converting an existing application into a Windows Service. The resulting service will be multi-threaded. Some threads are simple little worker threads that need to post a message to the main thread when they are finished. Currently, the worker threads just post a message to the main apps window. But, since a Service doesn't have any Windows, how do I go about posting a message to my main thread from a worker thread? Thank you, DanB Dan Baker wrote: > I'm working on converting an existing application into a Windows Service. > The resulting service w...

Welcome Screen says I have unread mail messages
Today I have noticed the XP welcome screen says I have unread mail messages when I don't. I've checked all my email clients and all messages are marked as read. Is there anything else I can do to check where these unread messages might be? Check your Junk Mail Folder. You may want to post this in the correct newsgroup, depending on which email client you are using...Outlook? Outlook Express? This is a newsgroop for Publisher "Steve Spurgin" <SteveSpurgin@discussions.microsoft.com> wrote in message news:2937B518-6373-4EE4-AAED-7167DD4E2318@microsoft.com... | ...

How to reference a control value in a row source query?
How to reference a control value in a row source query? I have two combo boxes on a form the value of cboA I want to use in the row source SELECT of cboB. In the query designer for the row source of cboB I have entered for the WHERE clause: =[Forms]![form_form1]![cboProjectName] I have left the Access default form names The actual SELECT from the SQL View is SELECT ProjectToParticipant.ProjectID, Participant.NameLast, Participant. NameFirst, Participant.NameMiddle FROM Participant INNER JOIN ProjectToParticipant ON Participant.ParticipantID = ProjectToParticipant.Particip...

Entourage recurring shut down message
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Email Client: pop From working absolutely fine for the past 15 months or so, today I am getting constant &quot;Microsoft Entourage has encountered a problem and needs to shut down&quot; messages. It makes no difference whether I opt to send report or not, the message goes away, entourage does not shut down and the message comes back around 30 seconds later. In between the messages, send and receive is working fine. I have force quit both entourage and error reporting, restarted my computer, closed down totally and left...

Importing messages from WM to WLM
Hi, I am upgrading to Win 7 and with no email client on Win 7 I have downloaded WLM and would like to transfer my messages. When I use the import in Win 7 it transfers the messages but does not transfer the newest messages??? Can I open WM & WLM and drag and drop the new messages to theri respective folders? If not what can I do to have the new messages added to the old for import? Thanking you in advance. Ricky I'm not quite clear on your setup. Are you running both Win7 and Vista side by side and wanting to receive new messages in both programs? What ki...

Out of Office Assistant giving error message
When I click on Out of Office Assistant I get the following message: The command is not available. See the program documentation about how to use this extension. I checked the support knowledge base and found a suggestion about renaming the resiliency key in the registry but that key was not there. Any other suggestions/resolutions? thanks Do you connect to an Exchange server? If not, there's no Out of Office feature. Joy wrote: > When I click on Out of Office Assistant I get the > following message: > > The command is not available. See the program > documentatio...

How do I tell if a message has been read?
After sending a message and clicking the "read receipt" box, how do you tell if the message has been read? On Thu, 14 Apr 2005 11:15:02 -1000, Mbalina <Mbalina@discussions.microsoft.com> wrote: > After sending a message and clicking the "read receipt" box, how do you > tell > if the message has been read? Depends upon who you sent it to. Generally speaking if you send a read receipt request and the other person "reads" the message using a client that supports read receipts, and a server that supports read receipts, and in an organizat...

Can't find messages in inbox
I opened windows mail in vista this morning and all of my messages are missing. It indicates I have 16 messages not opened, but I can't see any of them. I have messages in other boxes. The current view is show all messages. Can anyone tell me how to find the missing messages? -- Linda You may have some database corruption. You can try repairing it = (www.oehelp.com/WMUtil/). Also, you can examine the message store to = see if the eml files are actually under the inbox directory (see = www.oehelp.com/backup.aspx#wm and the section on WinMail). =20 Problems such as t...

Database Size, Database Corruption, Message Store & Storage Group
We're just recovering from an Exchange disaster. We discovered that we could not get database backups off of two of our four storage groups. We then discovered we were down one drive in our RAID 5 array. Then we discovered that we could not rebuild onto a new drive, probably due to issues on a second drive. We then attempted to save as much data as we could by exmerging data out of the two damaged stores and moving mailboxes to a second server. In the midst of this, the server crashed and would not reboot. We've since rebuild and recovered what we could, but we want to kn...

Automaticly Show new messages
Hi All, Is there any way of automatically showing window with new message on POS ?? I want to notify cashiers about some "quick" promotions but they usually cant see the message icon. Thanks, Arthur ...

Error Messages in Outlook XP
To All, I have installed then reinstalled Office XP two times. I get an error message when I do a send/receeive in Outlook. The error message is as follows: "Operation failed. Could not find object." What am I missing? Any help with this matter would be greatly appreciated. Thanks, Kevin ...

How to create a dummy contorl which processes no messages?
I want to create a control to do some drawing only. It's derived from static or wnd. I want the user can interact with the controls beneath it as normal. So how can I do with the control? Not sure that I fully understand the question, but you can always make windows not visible. Su Wei wrote: > I want to create a control to do some drawing only. It's derived from static > or wnd. I want the user can interact with the controls beneath it as normal. > So how can I do with the control? > > I mean a control that does some drawing job only and passes the mouse and key...