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. how to implemnt the threads in VC++?

how to implemnt the threads in VC++?

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorialquestion
15 Posts 5 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.
  • N Noor Akhter

    Hi,can anyone help me out how to implement the threads?in the beginners level. Regards NooR

    H Offline
    H Offline
    Hamid Taebi
    wrote on last edited by
    #2

    See Here[^]_**


    **_

    whitesky


    N 1 Reply Last reply
    0
    • N Noor Akhter

      Hi,can anyone help me out how to implement the threads?in the beginners level. Regards NooR

      K Offline
      K Offline
      KarstenK
      wrote on last edited by
      #3

      The MFC has as CWinThread class which helps you. Look for samples here and read the MSDN. Greeting from Germany

      N 1 Reply Last reply
      0
      • H Hamid Taebi

        See Here[^]_**


        **_

        whitesky


        N Offline
        N Offline
        Noor Akhter
        wrote on last edited by
        #4

        i don want dis....how to initialses and create the threads...can u provide me some examples at beg level? Thx NooR

        H D 2 Replies Last reply
        0
        • K KarstenK

          The MFC has as CWinThread class which helps you. Look for samples here and read the MSDN. Greeting from Germany

          N Offline
          N Offline
          Noor Akhter
          wrote on last edited by
          #5

          yup i hve seen in msdn ..but i don get the examples..kindly will u provide me sum examples? thx NooR

          T K 2 Replies Last reply
          0
          • N Noor Akhter

            i don want dis....how to initialses and create the threads...can u provide me some examples at beg level? Thx NooR

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #6

            I think a good and easy example is in MSDN Here[^]_**


            **_

            whitesky


            N 1 Reply Last reply
            0
            • N Noor Akhter

              yup i hve seen in msdn ..but i don get the examples..kindly will u provide me sum examples? thx NooR

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #7

              Noor Akhter wrote:

              ..but i don get the examples..kindly will u provide me sum examples?

              checkout http://www.codeproject.com/threads/crtmultithreading.asp http://www.codeproject.com/threads/Threads\_1.asp

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

              1 Reply Last reply
              0
              • H Hamid Taebi

                I think a good and easy example is in MSDN Here[^]_**


                **_

                whitesky


                N Offline
                N Offline
                Noor Akhter
                wrote on last edited by
                #8

                can v call local function in the thread..if it possible its not runing in my program..now wat to do? NooR

                H 1 Reply Last reply
                0
                • N Noor Akhter

                  yup i hve seen in msdn ..but i don get the examples..kindly will u provide me sum examples? thx NooR

                  K Offline
                  K Offline
                  KarstenK
                  wrote on last edited by
                  #9

                  NO!!! Write "CWinThread" in the Search Box up von den CP-Website and look yourself. I you want to learn programming you gotta learn this.:doh: Greetings from Germany

                  N 1 Reply Last reply
                  0
                  • K KarstenK

                    NO!!! Write "CWinThread" in the Search Box up von den CP-Website and look yourself. I you want to learn programming you gotta learn this.:doh: Greetings from Germany

                    N Offline
                    N Offline
                    Noor Akhter
                    wrote on last edited by
                    #10

                    Nice idea.....i did man.....but i don want bulitin function..i want to implemnt my own function..n how can i do this? thx NooR

                    T 1 Reply Last reply
                    0
                    • N Noor Akhter

                      Hi,can anyone help me out how to implement the threads?in the beginners level. Regards NooR

                      D Offline
                      D Offline
                      David Crow
                      wrote on last edited by
                      #11

                      See here and here.


                      "The largest fire starts but with the smallest spark." - David Crow

                      "Judge not by the eye but by the heart." - Native American Proverb

                      1 Reply Last reply
                      0
                      • N Noor Akhter

                        can v call local function in the thread..if it possible its not runing in my program..now wat to do? NooR

                        H Offline
                        H Offline
                        Hamid Taebi
                        wrote on last edited by
                        #12

                        I hope this helpful for you HANDLE thread; void CYourClass::Runthread() { DWORD ThreadID; thread=CreateThread(NULL,0,ThreadFunc,this,0,&ThreadID); } void ThreadFunc( LPVOID lpv ) { CYourClass* m_Class = (CYourClass*) lpv; m_Class->Function(); } void CYourClass::Function() { MessageBox("Test"); }_**


                        **_

                        whitesky


                        1 Reply Last reply
                        0
                        • N Noor Akhter

                          i don want dis....how to initialses and create the threads...can u provide me some examples at beg level? Thx NooR

                          D Offline
                          D Offline
                          David Crow
                          wrote on last edited by
                          #13

                          The two articles I provided are at the elementary level. What part is troubling you? Threads are usually not something to be tackled by a beginner.


                          "The largest fire starts but with the smallest spark." - David Crow

                          "Judge not by the eye but by the heart." - Native American Proverb

                          1 Reply Last reply
                          0
                          • N Noor Akhter

                            Nice idea.....i did man.....but i don want bulitin function..i want to implemnt my own function..n how can i do this? thx NooR

                            T Offline
                            T Offline
                            ThatsAlok
                            wrote on last edited by
                            #14

                            Noor Akhter wrote:

                            Nice idea.....i did man.....but i don want bulitin function..i want to implemnt my own function..n how can i do this?

                            you want to create you own threading function... is that right!

                            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                            cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

                            N 1 Reply Last reply
                            0
                            • T ThatsAlok

                              Noor Akhter wrote:

                              Nice idea.....i did man.....but i don want bulitin function..i want to implemnt my own function..n how can i do this?

                              you want to create you own threading function... is that right!

                              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                              cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

                              N Offline
                              N Offline
                              Noor Akhter
                              wrote on last edited by
                              #15

                              yup i want to create my own threads...n i cal the local function in it....is it possible? do reply////// NooR

                              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