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.
  • 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