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. Which way ?

Which way ?

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
6 Posts 3 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.
  • G Offline
    G Offline
    Great ATuin
    wrote on last edited by
    #1

    hi folks, i want to make a MFC application which only should have a tray icon and a popup menu (accessible via the tray icon). but i don't know what kind of application i should choose. should i make a dialog based or a sdi one ? i mean i only need the message map. thanks in advance. greets

    T B 2 Replies Last reply
    0
    • G Great ATuin

      hi folks, i want to make a MFC application which only should have a tray icon and a popup menu (accessible via the tray icon). but i don't know what kind of application i should choose. should i make a dialog based or a sdi one ? i mean i only need the message map. thanks in advance. greets

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      are you designing a service ? anyway, didlog based is good enough... simply remove the dialog class form the project...


      TOXCCT >>> GEII power
      [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]

      1 Reply Last reply
      0
      • G Great ATuin

        hi folks, i want to make a MFC application which only should have a tray icon and a popup menu (accessible via the tray icon). but i don't know what kind of application i should choose. should i make a dialog based or a sdi one ? i mean i only need the message map. thanks in advance. greets

        B Offline
        B Offline
        Bob Stanneveld
        wrote on last edited by
        #3

        Hello, If you only need a message map, I suggest that you don't use MFC at all. Just using plain old WIN32 APIs frees you from loading DLLs and eases the deployment. If this is no problem, you should use the SDI application. Simply removing the dialog class is not enough as you need a window to have a message map. You can also use some handy classes here on CP for tray icons. Hope this helps :-D Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

        G 1 Reply Last reply
        0
        • B Bob Stanneveld

          Hello, If you only need a message map, I suggest that you don't use MFC at all. Just using plain old WIN32 APIs frees you from loading DLLs and eases the deployment. If this is no problem, you should use the SDI application. Simply removing the dialog class is not enough as you need a window to have a message map. You can also use some handy classes here on CP for tray icons. Hope this helps :-D Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

          G Offline
          G Offline
          Great ATuin
          wrote on last edited by
          #4

          hi, yes, i have to use MFC because there are some classes in my app which need it. creating the tray icon and the popup is no problem. i only have to bother with getting rid of unnecessary dialogs and/or windows. the result should be a MFC based application with only a tray icon and a popup menu as its GUI - neither a dialog nor a window can be visible. aren't there any sample codes out there? i can't believe that i'm the first one who's trying this. greeting

          B 1 Reply Last reply
          0
          • G Great ATuin

            hi, yes, i have to use MFC because there are some classes in my app which need it. creating the tray icon and the popup is no problem. i only have to bother with getting rid of unnecessary dialogs and/or windows. the result should be a MFC based application with only a tray icon and a popup menu as its GUI - neither a dialog nor a window can be visible. aren't there any sample codes out there? i can't believe that i'm the first one who's trying this. greeting

            B Offline
            B Offline
            Bob Stanneveld
            wrote on last edited by
            #5

            Hello, You can simply set the style of the framewindow (in the SDI case) or your dialog to invisible. Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

            G 1 Reply Last reply
            0
            • B Bob Stanneveld

              Hello, You can simply set the style of the framewindow (in the SDI case) or your dialog to invisible. Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

              G Offline
              G Offline
              Great ATuin
              wrote on last edited by
              #6

              yes thanks. now i got what i want. here's what i have done: i've used a simple MFC dialog based application. i used to start it in InitInstance with RunModalLoop() and set the visible mode of the dialog in the resource editor to false. In the CDialog derived class i've overloaded the function OnCreate and added the following Window Style: ModifyStyleEx(0, WS_EX_TOOLWINDOW ); and, well, it works: NO WINDOW. NO DIALOG. NO TASKBAR ENTRY. AND I STILL GOT MY MESSAGE MAP :cool: thanks everone. greetings

              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