1

I just want to create an application with several functions.

but i don't need a normal window frame with this:

  1. title bar ...
  2. min/max/close button ...
  3. bottom status bar ....

here is what I need :

  1. the whole application is a standalone bar, this small bar is about 200*20 pixels on top of the screen
  2. show message text and current time on this bar
  3. with the mouse left click and drag to move the bar, change position ...
  4. on the right click menu with an option to exit the application

could you please give me some examples to explore the windows programming

2
  • How about a normal window with a zero size? You'll get just the title bar that you can show message text/time and intercept mouse events on the bar. Commented Dec 5, 2011 at 6:00
  • Use SHAppBarMessage to create task bars. Commented Dec 5, 2011 at 16:51

2 Answers 2

2
  1. Can be done with window styling as described by @Deanna
  2. Can be achieved with a timer via SetTimer firing WM_TIMER messages. On your handler, you get the time, generate the string and use SetWindowText on some static control in your window.
  3. This can be done by handling WM_NCHITTEST as described here.
  4. For this, you need to handle WM_CONTEXTMENU, generating a right-click menu via TrackPopupMenu/TrackPopupMenuEx

For more specific questions, you should probably pose a new question since right now your question is very general and broad.

Sign up to request clarification or add additional context in comments.

5 Comments

thank you, i would like to rephrase my question to this: HOW TO CREATE A STANDALONE DESKTOP TOOLBAR APPLICATION? no tittle bar, no taskbar button, no tray icon, complete button free tool bar, minimal GUI footprint, just a toolbar display message text and current time, and uses right click menu to exit. i could really use some help with windows desktop programming, win32 GUI guidance.
Can you give an example or link as to what you mean by a 'toolbar application'?
The task bar I guess is a good one :) The last one I've seen before that was the Office toolbar shudder :o)
i mean a standalone bar, without window frame, no taskbar button, no tray icon.
yeah, something like that, or freebar, except those buttons
1

To remove the window frame and border, you need to remove the WS_BORDER and WS_THICKFRAME styles when you create the window. How you do this depends on the framework in use and how you're creating thw window.

Have a look at Windows Application bars that allow windows to be docked to the side of the workspace.

2 Comments

thank you. could you give me some more specific guidance about window styles. should i uses CreateWindowEx function to creating that desktop tool bar?
You can do. As I said, it depends what you're using currently. If it's CreateWindowEx() then yes, you just need to change the style value you pass. If you use dialog templates, then they're also fine and you just need to change the flags in the template. If you're using MFC then that also has equivalant values (I don't use MFC so can't give any more details)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.