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. Minimize application from taskbar

Minimize application from taskbar

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 4 Posters 0 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.
  • J Offline
    J Offline
    Junyor
    wrote on last edited by
    #1

    I have a dialog box with the Title Bar setting set to False. This means that the Minimize Bar setting is False as well. This is why I can't minimize the application when I click on the icon task bar, but I would like this to happen.Any suggestions?:confused::confused::confused: Thank you!

    N 1 Reply Last reply
    0
    • J Junyor

      I have a dialog box with the Title Bar setting set to False. This means that the Minimize Bar setting is False as well. This is why I can't minimize the application when I click on the icon task bar, but I would like this to happen.Any suggestions?:confused::confused::confused: Thank you!

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      Junyor wrote:

      This is why I can't minimize the application when I click on the icon task bar, but I would like this to happen.Any suggestions?

      You can send a WM_SYSCOMMAND message with wParam parameter set to SC_MINIMIZE. :~


      Nibu thomas A Developer Programming tips[^]  My site[^]

      H 1 Reply Last reply
      0
      • N Nibu babu thomas

        Junyor wrote:

        This is why I can't minimize the application when I click on the icon task bar, but I would like this to happen.Any suggestions?

        You can send a WM_SYSCOMMAND message with wParam parameter set to SC_MINIMIZE. :~


        Nibu thomas A Developer Programming tips[^]  My site[^]

        H Offline
        H Offline
        helpcode
        wrote on last edited by
        #3

        i hope this code might be helpful to u. bool bClientWinState = false;//define and declare this variable in OninitDialog(); of your application. handle the OnNotifyIcon event like this: LRESULT CMyApplication::OnNotifyIcon(WPARAM wParam, LPARAM lParam) { UINT uID; UINT uMouseMsg; uID = (UINT) wParam; uMouseMsg = (UINT) lParam; if ((uMouseMsg == WM_LBUTTONDOWN) || (uMouseMsg == WM_LBUTTONDBLCLK)) { if(bClientWinState) { AfxGetApp()->m_pMainWnd->ShowWindow(SW_RESTORE); AfxGetApp()->m_pMainWnd->SetForegroundWindow(); bClientWinState = false; } else { AfxGetApp()->m_pMainWnd->ShowWindow(SW_MINIMIZE); this->ShowWindow(SW_HIDE); bClientWinState = true; } } ] jiteen tilekar Siemens Info. systems Ltd., Pune

        N 1 Reply Last reply
        0
        • H helpcode

          i hope this code might be helpful to u. bool bClientWinState = false;//define and declare this variable in OninitDialog(); of your application. handle the OnNotifyIcon event like this: LRESULT CMyApplication::OnNotifyIcon(WPARAM wParam, LPARAM lParam) { UINT uID; UINT uMouseMsg; uID = (UINT) wParam; uMouseMsg = (UINT) lParam; if ((uMouseMsg == WM_LBUTTONDOWN) || (uMouseMsg == WM_LBUTTONDBLCLK)) { if(bClientWinState) { AfxGetApp()->m_pMainWnd->ShowWindow(SW_RESTORE); AfxGetApp()->m_pMainWnd->SetForegroundWindow(); bClientWinState = false; } else { AfxGetApp()->m_pMainWnd->ShowWindow(SW_MINIMIZE); this->ShowWindow(SW_HIDE); bClientWinState = true; } } ] jiteen tilekar Siemens Info. systems Ltd., Pune

          N Offline
          N Offline
          NianHawk
          wrote on last edited by
          #4

          good idea, just what's the message number of clicking the icon in the taskbar instead of system tray area. I think we need to respond the message to minimize our application. Nothing impossible, Nothing sure

          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