GIDForums  

Go Back   GIDForums > Computer Programming Forums > FLTK Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 24-Aug-2005, 02:22
hcker2000 hcker2000 is offline
New Member
 
Join Date: Aug 2005
Posts: 2
hcker2000 is on a distinguished road

Fltk app in system tray?


Basicly I need to know if there is any way to hide all fltk windows with out it closing its self.

If so this would be a great help so I can put my app in the tray.

I'm using fltk 2.0 and win2k sp4
  #2  
Old 26-Aug-2005, 17:53
MatthiasWM MatthiasWM is offline
VIP
 
Join Date: Nov 2004
Posts: 62
MatthiasWM will become famous soon enough
Quote:
Originally Posted by hcker2000
Basicly I need to know if there is any way to hide all fltk windows with out it closing its self.

Yes, you can. FLTK merely leaves fltk::run() when all windows are closed. It does not call exit() or anything similar. But since you do not have a window anymore, you will not get any message handling either. I am sure that MSWindows has some mechanism for apps in the tray, however that is not built into FLTK.
  #3  
Old 06-Sep-2005, 03:26
hcker2000 hcker2000 is offline
New Member
 
Join Date: Aug 2005
Posts: 2
hcker2000 is on a distinguished road
As far as I can tell when all windows are hidden in fltk 2.0 the program closes and I can not seem to find a way around it.

If any one could post some example code that would be great.
  #4  
Old 31-Jan-2006, 02:29
Jetman Jetman is offline
New Member
 
Join Date: Jan 2006
Posts: 7
Jetman is on a distinguished road

Re: Fltk app in system tray?


resourcefile.rc
Code:
IDR_TRAYICON ICON "myicon.ico"

somwhere in somefile.c
Code:
NOTIFYICONDATA icondata; int ret; icondata.cbSize = sizeof(icondata); icondata.hWnd = hWnd; icondata.uFlags = NIF_MESSAGE | NIF_TIP | NIF_ICON; icondata.uID = 0x1001; /* some random id as below */ icondata.uCallbackMessage = 0x1001; icondata.hIcon = LoadIcon(NULL, IDR_TRAYICON); icondata.szTip = "This is some tip text"; Shell_NotifyIcon(NIM_ADD, &icondata);

Of course there is no handling of the icon, but you might want to pick yourself up a copy of the win32 api docs. http://www.mingw.org has one.
 
 

Recent GIDBlogWriting a book by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] GUI programming with FLTK dsmith FLTK Forum 10 03-Oct-2005 16:41
How to minimize a application to the system tray? Thomas555 C++ Forum 12 20-May-2005 14:35
FLTK2 setting input value of an FLTK Input field causes system to crash. Gutty FLTK Forum 0 06-Apr-2005 14:30
Track change in system time Poolan C++ Forum 3 19-Nov-2004 05:08
Welcome to the FLTK Forums dsmith FLTK Forum 0 08-Sep-2004 07:58

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 10:49.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.