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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to prevent mfc dialog based app beign displayed on taskbar

how to prevent mfc dialog based app beign displayed on taskbar

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
3 Posts 2 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.
  • M Offline
    M Offline
    muharrem
    wrote on last edited by
    #1

    hi all, how to prevent mfc dialog based app beign displayed on taskbar ? Either when maximised and minimised. Thanks.

    M 2 Replies Last reply
    0
    • M muharrem

      hi all, how to prevent mfc dialog based app beign displayed on taskbar ? Either when maximised and minimised. Thanks.

      M Offline
      M Offline
      Mohammad A Gdeisat
      wrote on last edited by
      #2

      hi friend, I quote the folowing from MSDN 2003, I dont know if it really works but I hope so: I will simply tell you the answer: you must create your dialog as a child of an invisible window that has WS_EX_TOOLWINDOW set, and you must make sure your dialog has the WS_EX_APPWINDOW style turned off. If you read the documentation’s fine print, you might figure this out—but only if you use a powerful magnifying glass. // pre-create window: set WS_EX_TOOLWINDOW style // BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { if (CFrameWnd::PreCreateWindow(cs)) { cs.dwExStyle |= WS_EX_TOOLWINDOW; return TRUE; } return FALSE; } . . . // InitInstance: create dialog as child of invisible main frame // BOOL CMyApp::InitInstance() { CMainFrame* pFrame = new CMainFrame; m_pMainWnd = pFrame; pFrame->LoadFrame(IDR_MAINFRAME, WS_OVERLAPPED, NULL, NULL); CMyDlg dlg(pFrame); int nResponse = dlg.DoModal(); if (nResponse == IDOK) { } else if (nResponse == IDCANCEL) { } return FALSE; } hope it helps :) good luck A candle looses nothing by lighting another candle

      1 Reply Last reply
      0
      • M muharrem

        hi all, how to prevent mfc dialog based app beign displayed on taskbar ? Either when maximised and minimised. Thanks.

        M Offline
        M Offline
        Mohammad A Gdeisat
        wrote on last edited by
        #3

        hi friend, I found something on MSDN 2003 and i hope its helpful: quote says: I will simply tell you the answer: you must create your dialog as a child of an invisible window that has WS_EX_TOOLWINDOW set, and you must make sure your dialog has the WS_EX_APPWINDOW style turned off. If you read the documentation’s fine print, you might figure this out—but only if you use a powerful magnifying glass. // pre-create window: set WS_EX_TOOLWINDOW style // BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { if (CFrameWnd::PreCreateWindow(cs)) { cs.dwExStyle |= WS_EX_TOOLWINDOW; return TRUE; } return FALSE; } . . . // InitInstance: create dialog as child of invisible main frame // BOOL CMyApp::InitInstance() { CMainFrame* pFrame = new CMainFrame; m_pMainWnd = pFrame; pFrame->LoadFrame(IDR_MAINFRAME, WS_OVERLAPPED, NULL, NULL); CMyDlg dlg(pFrame); int nResponse = dlg.DoModal(); if (nResponse == IDOK) { } else if (nResponse == IDCANCEL) { } return FALSE; } I hope its helpful Mohammad. A candle looses nothing by lighting another candle

        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