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. Other Discussions
  3. IT & Infrastructure
  4. wxWidgets and MFC not playing together nicely

wxWidgets and MFC not playing together nicely

Scheduled Pinned Locked Moved IT & Infrastructure
helpc++visual-studioquestion
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.
  • S Offline
    S Offline
    Shaheed Legion
    wrote on last edited by
    #1

    Okay , I have a main MFC dialog which is supposed to pop up a wxWidgets dialog for data entry. The problem with that is that , after struggling to get the two to work in the same app, the wxWidgets dialog either displays as a child Control of the main MFC dialog , or, depending on the flags I've managed to isolate as being the problem, a totally separate top-level window , with its own taskbar icon. This behaviour is very non-standard since it all boils down to the WS_CHILD vs. WS_POPUP flag. WS_CHILD creates the wxWidgets dialog as a Control (with dialog behaviour) WITHIN the client area of the main MFC dialog , and changing the flag to WS_POPUP , creates a totally separate window... Does anyone have a workaround so that I can have a functional top-level dialog , but still a "child" of the MFC application - without its own taskbar button? I've tried creating a "blank" wxWindow and using AssociateHandle() with the HWND of the main dialog , and I've tried using ::SetParent(...) to do the same thing , but it simply refuses to work. Any help , tips or suggestions would be greatly appreciated. Thanks Everybody - and Seasons Greetings! Max

    The tears shed in vain and the hatred and pain will be nothing but dust at the end of the day

    J 1 Reply Last reply
    0
    • S Shaheed Legion

      Okay , I have a main MFC dialog which is supposed to pop up a wxWidgets dialog for data entry. The problem with that is that , after struggling to get the two to work in the same app, the wxWidgets dialog either displays as a child Control of the main MFC dialog , or, depending on the flags I've managed to isolate as being the problem, a totally separate top-level window , with its own taskbar icon. This behaviour is very non-standard since it all boils down to the WS_CHILD vs. WS_POPUP flag. WS_CHILD creates the wxWidgets dialog as a Control (with dialog behaviour) WITHIN the client area of the main MFC dialog , and changing the flag to WS_POPUP , creates a totally separate window... Does anyone have a workaround so that I can have a functional top-level dialog , but still a "child" of the MFC application - without its own taskbar button? I've tried creating a "blank" wxWindow and using AssociateHandle() with the HWND of the main dialog , and I've tried using ::SetParent(...) to do the same thing , but it simply refuses to work. Any help , tips or suggestions would be greatly appreciated. Thanks Everybody - and Seasons Greetings! Max

      The tears shed in vain and the hatred and pain will be nothing but dust at the end of the day

      J Offline
      J Offline
      JudyL_MD
      wrote on last edited by
      #2

      I don't have a solution but I'd be interested in the solution you find. I've never mixed the two before since all my wx is cross-platform with Linux. Curiously yours, Judy

      S 1 Reply Last reply
      0
      • J JudyL_MD

        I don't have a solution but I'd be interested in the solution you find. I've never mixed the two before since all my wx is cross-platform with Linux. Curiously yours, Judy

        S Offline
        S Offline
        Shaheed Legion
        wrote on last edited by
        #3

        Yeah , sure , as soon as I figure it out... I'll probably write an article on it at some point too, just to be sure that nobody runs into this problem again.

        The tears shed in vain and the hatred and pain will be nothing but dust at the end of the day

        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