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. Creating windows in worker threads

Creating windows in worker threads

Scheduled Pinned Locked Moved C / C++ / MFC
questiondata-structures
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.
  • G Offline
    G Offline
    GeMe_Hendrix
    wrote on last edited by
    #1

    ;PHere's an interesting question... What are the consequences of creating windows (by using either Create(..) or DoModal() in a worker thread. Since a worker thread has no message queue and AfxGetMainWnd() returns the window associated with the thread, how will it work? Should it work? What are the effects? The reason I'm asking, is I've noticed some part of the program I'm been assigned to create windows in worker threads. I know the best way is to create a GUI thread and assign the m_pMainWnd variable to the created window. I really just want to know the effects of windows in worker threads. Regards, GeMe_Hendrix ;P

    B 1 Reply Last reply
    0
    • G GeMe_Hendrix

      ;PHere's an interesting question... What are the consequences of creating windows (by using either Create(..) or DoModal() in a worker thread. Since a worker thread has no message queue and AfxGetMainWnd() returns the window associated with the thread, how will it work? Should it work? What are the effects? The reason I'm asking, is I've noticed some part of the program I'm been assigned to create windows in worker threads. I know the best way is to create a GUI thread and assign the m_pMainWnd variable to the created window. I really just want to know the effects of windows in worker threads. Regards, GeMe_Hendrix ;P

      B Offline
      B Offline
      Brigsoft
      wrote on last edited by
      #2

      Try AfxMessageBox("Some message")? If it works, it is good. =========================== My home is www.brigsoft.com

      G 1 Reply Last reply
      0
      • B Brigsoft

        Try AfxMessageBox("Some message")? If it works, it is good. =========================== My home is www.brigsoft.com

        G Offline
        G Offline
        GeMe_Hendrix
        wrote on last edited by
        #3

        Yeah, thanks for that comprehensive answer to the complex subject of multithreading and message queueing that I was trying to find out about. :wtf:

        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