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. Multithread ?

Multithread ?

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpcom
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.
  • D Offline
    D Offline
    dlhson
    wrote on last edited by
    #1

    How can I show a modeless dialog in a separate thread ? Ex: I wrote a app as dialog, let's call it CMyProgDlg I have a button, whenever I press at that button, it calls a function( let's call it static void Thread(LPVOID lParam) This function shows a modeless dialog. This modeless dialog run in a thread. I tried AfxBeginThread(Thread, this) in CMyProgDlg, but it failed. Anyway ? Thanks Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com

    N L 2 Replies Last reply
    0
    • D dlhson

      How can I show a modeless dialog in a separate thread ? Ex: I wrote a app as dialog, let's call it CMyProgDlg I have a button, whenever I press at that button, it calls a function( let's call it static void Thread(LPVOID lParam) This function shows a modeless dialog. This modeless dialog run in a thread. I tried AfxBeginThread(Thread, this) in CMyProgDlg, but it failed. Anyway ? Thanks Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      You don't really need to create a modeless dialog using a separate thread because the parent dialog or window is still accesible and can process messages. Nish


      Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

      1 Reply Last reply
      0
      • D dlhson

        How can I show a modeless dialog in a separate thread ? Ex: I wrote a app as dialog, let's call it CMyProgDlg I have a button, whenever I press at that button, it calls a function( let's call it static void Thread(LPVOID lParam) This function shows a modeless dialog. This modeless dialog run in a thread. I tried AfxBeginThread(Thread, this) in CMyProgDlg, but it failed. Anyway ? Thanks Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com

        L Offline
        L Offline
        Larry Antram
        wrote on last edited by
        #3

        You've got it backwards. Assuming you really do need a thread -- have the modeless dialog create, control, and abide by the thread, instead of the other way around. Regards, Larry Antram Stardust Software "I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." -- Albert Einstein

        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