Albert Tsang
Albert Tsang

Reputation: 53

how to create an application without window frame

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

Upvotes: 1

Views: 2919

Answers (2)

Mike Kwan
Mike Kwan

Reputation: 24447

  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.

Upvotes: 2

Deanna
Deanna

Reputation: 24273

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.

Upvotes: 1

Related Questions