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. WM_COMMAND custom message ID

WM_COMMAND custom message ID

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestionannouncement
3 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.
  • J Offline
    J Offline
    JennyP
    wrote on last edited by
    #1

    Hello, I would like for my DialogBar class to update all it's values from my CDocument class. I've been told I need to add a new command ID and use WM_COMMAND. I know how to set up the DialogBar side of things, but I don't know how to send the command from the CDocument class. Any help or pointers to articles? thanks! JennyP

    A T 2 Replies Last reply
    0
    • J JennyP

      Hello, I would like for my DialogBar class to update all it's values from my CDocument class. I've been told I need to add a new command ID and use WM_COMMAND. I know how to set up the DialogBar side of things, but I don't know how to send the command from the CDocument class. Any help or pointers to articles? thanks! JennyP

      A Offline
      A Offline
      alex barylski
      wrote on last edited by
      #2

      To send a WM_COMMAND message to your dialog bar object I think it would look something like: // Somewhere inside CDocument

      ((CMainFrame*)AfxGetMainWnd())->m_MyDlgBar.SendMessage(WM_COMMAND);

      "An expert is someone who has made all the mistakes in his or her field" - Niels Bohr

      1 Reply Last reply
      0
      • J JennyP

        Hello, I would like for my DialogBar class to update all it's values from my CDocument class. I've been told I need to add a new command ID and use WM_COMMAND. I know how to set up the DialogBar side of things, but I don't know how to send the command from the CDocument class. Any help or pointers to articles? thanks! JennyP

        T Offline
        T Offline
        Tomasz Sowinski
        wrote on last edited by
        #3

        JennyP wrote: I've been told I need to add a new command ID and use WM_COMMAND I don' think you need new command ID. Rather, you should provide ON_UPDATE_CMD_UI handlers for controls hosted in dialog bar using their control IDs. Tomasz Sowinski -- http://www.shooltz.com

        "Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.

        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