TaskBar - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

TaskBar

DB1DB1 Posts: 1,142Member
I've made a MFC dialog app with no border and title bar (no minimize maximize & close buttons). I use "SetWindowText" so that I have a taskbar button with the title, but when you right-click on the taskbar button, there is no options pop-up. Is there a way to have at least a minimize/maximize option added to the taskbar button without adding a title bar to the application?

Thanks :)



[italic][blue]To understand recursive, first you need to understand recursive[/blue][/italic]

Comments

  • DB1DB1 Posts: 1,142Member
    : I've made a MFC dialog app with no border and title bar (no minimize maximize & close buttons). I use "SetWindowText" so that I have a taskbar button with the title, but when you right-click on the taskbar button, there is no options pop-up. Is there a way to have at least a minimize/maximize option added to the taskbar button without adding a title bar to the application?
    :
    : Thanks :)
    :


    If anyone wants to know the answer, I was looking through a .rc file for another project and came up with this...

    When you have a dialog that has no title bar or system menu (such as a custom draw bitmap dialog), all you end up with for a taskbar button is a blank button that does nothing except bring a window into focus. So, just 2 lines of code seem to resolve the issue:

    SetWindowText("My Application"); // sets the taskbar button text

    ModifyStyle( 0, WS_MINIMIZEBOX | WS_SYSMENU );

    The WS_MINIMIZEBOX style sets it so that clicking on the taskbar button will minimize/restore the application, and the WS_SYSMENU style sets it so that 1) your application icon shows up on the taskbar button and 2) there is a right-click system menu on the taskbar button.

    Hope someone else finds this useful.

    [italic][blue]To understand recursive, first you need to understand recursive[/blue][/italic]

Sign In or Register to comment.