Another wonderful newbie question 
Author Message
 Another wonderful newbie question

Hello again, here's my latest (read: newbie) question:
  I'm trying to have an application that resides only in the system tray.  Having finally gotten the tray icon working (and a function to process it) I need to know how to make the button disappear from the task bar.  Currently my app shows an icon in the tray and in the taskbar, along with all the other apps.  Microsoft says to use a window style (WS_PALETTE or something like that) but I don't have enough control over the window style then.  I tried making a hidden window, but I do not know how.  Is there
 a way to create a hidden window with visible children?
Here's an example
  HWND hHiddenWindow;
  HWND hNormalWindow;
  all the registering and creating...;
  SetParent(hNormalWindow, hHiddenWindow);
  SendMessage(hHiddenWindow, SW_HIDE, 0, 0);
But when I tell hHiddenWindow to hide then hNormalWindow hides too.  Can anyone help me?  (I thought maybe there's a special hidden window style or something but I can't find anything like that).
  Thanks a lot
   - J Woltman

-----------------** -- Posted from CodeGuru -- **-----------------
http://www.*-*-*.com/ ;  The website for Visual C++ programmers.



Tue, 29 Jan 2002 03:00:00 GMT  
 Another wonderful newbie question

Quote:
>  SetParent(hNormalWindow, hHiddenWindow);
>  SendMessage(hHiddenWindow, SW_HIDE, 0, 0);
>But when I tell hHiddenWindow to hide then hNormalWindow hides too.

Try SetOwner instead of SetParent.

To hide a window, you'd normally use ShowWindow( SW_HIDE ), but you
should be able to skip that step by creating the window hidden (by not
specifying the WS_VISIBLE style).

Dave
----
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Wed, 30 Jan 2002 03:00:00 GMT  
 Another wonderful newbie question

Thanks for helping me, I got it to work without calling the SetParent or SetOwner.
  - J Woltman

Quote:

>>  SetParent(hNormalWindow, hHiddenWindow);
>>  SendMessage(hHiddenWindow, SW_HIDE, 0, 0);
>>But when I tell hHiddenWindow to hide then hNormalWindow hides too.

>Try SetOwner instead of SetParent.

>To hide a window, you'd normally use ShowWindow( SW_HIDE ), but you
>should be able to skip that step by creating the window hidden (by not
>specifying the WS_VISIBLE style).

>Dave
>----
>My address is altered to discourage junk mail.
>Please post responses to the newsgroup thread,
>there's no need for follow-up email copies.

-----------------** -- Posted from CodeGuru -- **-----------------
http://www.codeguru.com/    The website for Visual C++ programmers.


Thu, 31 Jan 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Yet another wonderful ListBox initialization problem

2. Newbie: CATALOG sample question (SIMPLE question)

3. Newbie question ( certainly stupid question)

4. Newbie question: C++ beginner question

5. CFile/CCommon dialog question and DAO open question (yes, I'm a newbie)

6. Yet another CListCtrl() question from a newbie (sort question) on Dialog based project

7. Newbie OO questions

8. newbie:datagrid question

9. Newbie Question (VB.NET user)

10. Newbie Question - string to int

11. Newbie Question: Copying HTML content to the clip board

 

 
Powered by phpBB® Forum Software