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. SetDlgCtrlID() fails for popup dialog

SetDlgCtrlID() fails for popup dialog

Scheduled Pinned Locked Moved C / C++ / MFC
helphardwarequestion
1 Posts 1 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.
  • Z Offline
    Z Offline
    zoid
    wrote on last edited by
    #1

    Hi, I have a dialog that was previously a child window of another window. This dialog implements a custom control that notifies the parent using by sending custom WM_COMMAND messages. I want to change this window to be a popup window but to remain a control of the parent dialog. The problem is that once I change the window's style to popup() the SetDlgCtrlID() function fails. GetLastError() reports: 1401: Invalid menu handle. I have tried setting the id using ::SetWindowLong() as well, but I got the same error message. Is it not possible to make a popup act as a control of another window? I need this control to be flexible enough so that it can be embedded in another window or to float on its own. I would prefer to use the WM_COMMAND message for sending notifications instead of defining a new window message for each notification. Any help is appreciated. Thank you, Tom

    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