integrate win32 program to desktop

Started by
6 comments, last by gan 18 years, 7 months ago
How? I'm making a small win32 program, need to integrate it into desktop without showing border and showing title in the taskbar. What is the APIcommand that Ineed to use?
Advertisement
You should create the window without the title bar style. Something like WS_POPUPWINDOW should do the job for you. Then, make sure you show your window maximized.
but i think what I want is a small win32 program that act like embeded in desktop(like messenger)
In that case, I believe what you are looking for is a system tray icon. We'd need to know what language you're using to help you there.
I'm thinking maybe you want the Shell_NotifyIcon function. I've never used it but its what I would look into first.
how the tray icon works is that the window remains closed until the tray icon is clicked on and a menu option is chosen, then the program opens the window

you have to design your program to be able to run without a window and to be able to reopen the window

just because your window closes doesn't mean your winmain can't live on forever

create a loop in winmain that does stuff and monitor your tray icon and open the window when lets say somebody clicks on the icon

as a matter of fact those tray programs where a menu opens when the icon is clicked, the menu itself is a window (a certain style)
the tray icon is registered with the shell and the shell notifies you when it has messages for it, so a part of your program will have to handle messages from the icon

the link for the how to from msdn
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/createwindow.asp

from your program you use Shell_NotifyIcon to place your icon down in the tray
you dont have to start your program with a window, you can just loop winmain with like a sleep timer of 100
then when the user clicks on the tray icon open your window
wrong link ^^

this link..lol
[link]http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shell_notifyicon.asp?frame=true[/link]
Quote:Original post by Anonymous Poster
 
create a loop in winmain that does stuff and monitor your tray icon and open the window when lets say somebody clicks on the icon



but i want the icon and window both show at the same time when loading the executable file. (actually not neccessary icon, anything else but not show the window title in the start menu bar)

This topic is closed to new replies.

Advertisement