Jump to content
  • Advertisement
Sign in to follow this  
brwarner

Windows XP "Gadget" [C++]

This topic is 3409 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, Just wondering how I would go about using Win32/C++ to develop a sort of desktop "gadget" that would stay up at all times (possibly remain top Z order) and not show up in task bar/etc. Kind of like a gadget from Vista but in XP. I'm pretty sure I have seen this done somewhere but I was wondering how I might do it.

Share this post


Link to post
Share on other sites
Advertisement
This should be pretty simple overall. You just need to combine a few concepts into one program.

1. For a window to have no Taskbar icon, you simply need to pass WS_EX_TOOLWINDOW to a CreateWindowEx function. If your code only uses CreateWindow, all you have to do is replace the CreateWindow( portion with CreateWindowEx(WS_EX_TOOLWINDOW, and you are set. You can reference this page: hiding a window's taskbar entry [solved].

2. For the always on top look, you just have to change the window Z order. You can refer to this example, Making a Window "Always On Top", but the code really is as simply as: SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE); to make the window always on top.

3. For the customized look, you will look into Win32 Regions, which basically are a form of window "skinning". This article, Win32 Window Skinning is a great start!

4. For even more jazz, you can look into using a Tray Icon. This article, Basic use of Shell_NotifyIcon in Win32, shows the basics to get you started. You can Google for more examples as well if you run into troubles.

If you combine all those concepts into one application, you are on your way to having your own little "gadget". [smile] I would suggest you work from the link provided in #3 and then make the approporiate changes for #1 and #2 and then spend the time integrating in #4 if required.

Good luck!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!