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. Thread question??

Thread question??

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
23 Posts 6 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.
  • E Eytukan

    Basix. 1.include atlbase.h 2.You cannot access member variables from a static thread function. Pass the this(Dlg) pointer into the thread param and access it inside the function or do it in one of the 100 ways.


    OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus Best wishes to Rexx[^]

    Y Offline
    Y Offline
    york528
    wrote on last edited by
    #10

    after include atlbase.h only error C2065: 'ReadDirectoryChangesW' : undeclared identifier do i miss other head file??

    E 1 Reply Last reply
    0
    • D David Crow

      york528 wrote:

      error C2065: 'USES_CONVERSION' : undeclared identifier

      See here.

      york528 wrote:

      error C2065: 'ReadDirectoryChangesW' : undeclared identifier

      See here.

      york528 wrote:

      error C2065: 'm_list' : undeclared identifier

      See here. What does any of what you posted have to do with threads?

      "Love people and use things, not love things and use people." - Unknown

      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

      Y Offline
      Y Offline
      york528
      wrote on last edited by
      #11

      there's only one problem error C2065: 'ReadDirectoryChangesW' : undeclared identifier after i do the follow Header Declared in WinBase.h; include Windows.h. it's still have the problem

      1 Reply Last reply
      0
      • H Hamid Taebi

        Can you show your code and it seems you forgot to include header file or your program?

        Y Offline
        Y Offline
        york528
        wrote on last edited by
        #12

        i did nothing the code dosen't changed but the m_list problem solved :confused::confused::confused:Amazing

        1 Reply Last reply
        0
        • Y york528

          after include atlbase.h only error C2065: 'ReadDirectoryChangesW' : undeclared identifier do i miss other head file??

          E Offline
          E Offline
          Eytukan
          wrote on last edited by
          #13

          define this :

          #define _WIN32_WINNT 0x400

          in stdafx.h. What OS are you using?


          OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus Best wishes to Rexx[^]

          Y 1 Reply Last reply
          0
          • E Eytukan

            define this :

            #define _WIN32_WINNT 0x400

            in stdafx.h. What OS are you using?


            OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus Best wishes to Rexx[^]

            Y Offline
            Y Offline
            york528
            wrote on last edited by
            #14

            windows XP thank you so much #define _WIN32_WINNT 0x400 what's that for i am new and my English is not so good

            E 1 Reply Last reply
            0
            • D David Crow

              york528 wrote:

              error C2065: 'USES_CONVERSION' : undeclared identifier

              See here.

              york528 wrote:

              error C2065: 'ReadDirectoryChangesW' : undeclared identifier

              See here.

              york528 wrote:

              error C2065: 'm_list' : undeclared identifier

              See here. What does any of what you posted have to do with threads?

              "Love people and use things, not love things and use people." - Unknown

              "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

              Y Offline
              Y Offline
              york528
              wrote on last edited by
              #15

              thank you i forgot to #define _WIN32_WINNT 0x400 the problem solved

              1 Reply Last reply
              0
              • H Hamid Taebi

                Can you show your code and it seems you forgot to include header file or your program?

                Y Offline
                Y Offline
                york528
                wrote on last edited by
                #16

                problem solved with #define _WIN32_WINNT 0x400 thank you for help me so much time and give me a lot usful advises

                H 1 Reply Last reply
                0
                • A Ahmed Charfeddine

                  i expect that the threadFunction improperly tries to access the list object, etc which are own by the main thread. pass the this value to the param field of beginthread, then receive it inside your functionbloc and cast it to a main dialog pointer by wich you access things.

                  Our Philosophy, Mohammed Baqir Al Sadr

                  Y Offline
                  Y Offline
                  york528
                  wrote on last edited by
                  #17

                  problem solved with #define _WIN32_WINNT 0x400 thank you all

                  A 1 Reply Last reply
                  0
                  • Y york528

                    windows XP thank you so much #define _WIN32_WINNT 0x400 what's that for i am new and my English is not so good

                    E Offline
                    E Offline
                    Eytukan
                    wrote on last edited by
                    #18

                    Few APIs would be supported to specific OS. That's the OS version. Windows NT 4.0 -> _WIN32_WINNT =0x0400. The error is gone or not?


                    OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus Best wishes to Rexx[^]

                    Y 1 Reply Last reply
                    0
                    • E Eytukan

                      Few APIs would be supported to specific OS. That's the OS version. Windows NT 4.0 -> _WIN32_WINNT =0x0400. The error is gone or not?


                      OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus Best wishes to Rexx[^]

                      Y Offline
                      Y Offline
                      york528
                      wrote on last edited by
                      #19

                      it's already gone thank you ;P

                      E 1 Reply Last reply
                      0
                      • Y york528

                        it's already gone thank you ;P

                        E Offline
                        E Offline
                        Eytukan
                        wrote on last edited by
                        #20

                        Oh ok ok :beer:


                        OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus Best wishes to Rexx[^]

                        1 Reply Last reply
                        0
                        • S Saurabh Garg

                          Wow you have some serious issues!!!

                          hINTModuleState wrote:

                          CListCtrl m_list; // static UINT ThreadProc(LPVOID pParam) { CThreadQuestionDlg* pMe = reinterpret_cast(pParam); pMe->m_list.DeleteAllItems(); /*This is the case number 1*/ //m_list.DeleteAllItems(); /*This is the case number 2*/ return 0; } void StartThread() { AfxBeginThread(ThreadProc, this); }

                          Uncommenting second case will lead to compiling error because ThreadProc is a static function and a static function can only access static members of a class. Since m_list is not a static variable you cannot access it directly from with the function. For you profiling needs try http://www.codeproject.com/KB/datetime/perftimer.aspx[^] Saurabh

                          A Offline
                          A Offline
                          Ahmed Charfeddine
                          wrote on last edited by
                          #21

                          yes apparently i have serious issues. i'd better start find a book or pdf and learn all the keywords and langage basis before making any judgement on any thing. thank you for the profiler link.

                          Our Philosophy, Mohammed Baqir Al Sadr

                          1 Reply Last reply
                          0
                          • Y york528

                            problem solved with #define _WIN32_WINNT 0x400 thank you all

                            A Offline
                            A Offline
                            Ahmed Charfeddine
                            wrote on last edited by
                            #22

                            No comment.

                            Our Philosophy, Mohammed Baqir Al Sadr

                            1 Reply Last reply
                            0
                            • Y york528

                              problem solved with #define _WIN32_WINNT 0x400 thank you for help me so much time and give me a lot usful advises

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

                              It seems your problem solved and I arrived late,but I glad it solved. :-D

                              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