Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Make the Close button minimize the window to the Status Bar

I want to make the Close button (X) in the system menu of my Window to minimize the window to the Status Bar and not to close the application, how do I do it with Win32 ?

Comments

  • afterdeathafterdeath Posts: 14Member
    : I want to make the Close button (X) in the system menu of my Window to minimize the window to the Status Bar and not to close the application, how do I do it with Win32 ?
    :

    well, all you need to do is control the WM_CLOSE message that windows send to the application when you hit the close button, so all you need to do is respond to this message and minimize the window to the Status Bar.

  • yaronoyarono Posts: 24Member
    Thank you,
    So how do I do it ? The minimize operation ?
    I don't want to see the application in the task bar buttons, only in the status area as an icon.

    : : I want to make the Close button (X) in the system menu of my Window to minimize the window to the Status Bar and not to close the application, how do I do it with Win32 ?
    : :
    :
    : well, all you need to do is control the WM_CLOSE message that windows send to the application when you hit the close button, so all you need to do is respond to this message and minimize the window to the Status Bar.
    :


  • adrianxwadrianxw Posts: 127Member
    : Thank you,
    : So how do I do it ? The minimize operation ?
    : I don't want to see the application in the task bar buttons, only in the status area as an icon.
    :

    I assume you meant the system tray, (by the clock)? If so, use the Shell_NotifyIcon() function.

    Med venlig hilsen,

    Adrian...


  • yaronoyarono Posts: 24Member
    Thank u,
    Well, I succeed in puting an Icon in the system tray, this was not the problem. How do I get rid of the application button in the task bar buttons ? how do I make the application dialog to disappear ?

    : : Thank you,
    : : So how do I do it ? The minimize operation ?
    : : I don't want to see the application in the task bar buttons, only in the status area as an icon.
    : :
    :
    : I assume you meant the system tray, (by the clock)? If so, use the Shell_NotifyIcon() function.
    :
    : Med venlig hilsen,
    :
    : Adrian...
    :
    :


  • pingpongpingpong Posts: 937Member
    yarno,

    the only way i know of making an application icon not to appear in the taskbar is to wrap it inside another unvisible application. check this code courtesy of KMS

    http://www.geocities.com/al_ani/noicon.zip

    i suppose you can modify it like this:
    - when WM_CLOSE or WM_SIZE/Minimized detected, ShowWindow(SW_HIDE) and add to tary icon.
    - when tray icon is clicked, call ShowWindow(SW_SHOW).


Sign In or Register to comment.