Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Minimizing app with task bar button

Minimizing app with task bar button

Scheduled Pinned Locked Moved C / C++ / MFC
debugginghelpquestion
3 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    Yuri Gershanov
    wrote on last edited by
    #1

    Hi everybody, Encountered a strange problem. When started, my application reacts properly on task bar events - it can be minimized by clicking on its task bar icon, and restored when the button is clicked again. But after I load a file into the app, the program will not minimize by task bar button, though the caption color changes to inactive. If I click on the caption, or use system menu to minimize the program, or just open the system menu, the normal behavior of task bar button is restored. Setting breakpoint in syscommand handler, I see that when the taskbar button is working correctly the program gets SC_MINIMIZE/SC_MAXIMIZE. After loading a file, it does not. Any idea on possible reason? Thanks, Yuri

    R 1 Reply Last reply
    0
    • Y Yuri Gershanov

      Hi everybody, Encountered a strange problem. When started, my application reacts properly on task bar events - it can be minimized by clicking on its task bar icon, and restored when the button is clicked again. But after I load a file into the app, the program will not minimize by task bar button, though the caption color changes to inactive. If I click on the caption, or use system menu to minimize the program, or just open the system menu, the normal behavior of task bar button is restored. Setting breakpoint in syscommand handler, I see that when the taskbar button is working correctly the program gets SC_MINIMIZE/SC_MAXIMIZE. After loading a file, it does not. Any idea on possible reason? Thanks, Yuri

      R Offline
      R Offline
      Ramu Pulipati
      wrote on last edited by
      #2

      If you are using MFC, make sure you are not dealing with taskbar icon in CMyDocument::OnNewDocument() or CMyDocument::OnCloseDocument() or CMyDocument::DeleteConetents(). Its better to handle taskbar add/remove operations in CWinApp derived class. Just some wild guesses ;) Hth, Ramu

      Y 1 Reply Last reply
      0
      • R Ramu Pulipati

        If you are using MFC, make sure you are not dealing with taskbar icon in CMyDocument::OnNewDocument() or CMyDocument::OnCloseDocument() or CMyDocument::DeleteConetents(). Its better to handle taskbar add/remove operations in CWinApp derived class. Just some wild guesses ;) Hth, Ramu

        Y Offline
        Y Offline
        Yuri Gershanov
        wrote on last edited by
        #3

        Ramu Pulipati wrote: If you are using MFC, make sure you are not dealing with taskbar icon in CMyDocument::OnNewDocument() or CMyDocument::OnCloseDocument() or CMyDocument::DeleteConetents(). Its better to handle taskbar add/remove operations in CWinApp derived class. I do not actually handle any of taskbar events explicitly, nor I use tray icons. This is just regular taskbar button that does not work... Thanks, Yuri

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups