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. Worker-Thread in Win32 Application

Worker-Thread in Win32 Application

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
4 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.
  • Z Offline
    Z Offline
    ZarrinPour
    wrote on last edited by
    #1

    Hi: I have recently created a "Win32 Application" project or, more accurately "A Simple Win32 Application". but i need to use a Worker-Thread in this app so i useed AfxBeginThread()function,but when i want to compile project,i receive the following error: error C2065: 'AfxBeginThread' : undeclared identifier :confused::confused: Is it possible to use this function in Win32 Application ? Please Help me. Best Regards.

    B 1 Reply Last reply
    0
    • Z ZarrinPour

      Hi: I have recently created a "Win32 Application" project or, more accurately "A Simple Win32 Application". but i need to use a Worker-Thread in this app so i useed AfxBeginThread()function,but when i want to compile project,i receive the following error: error C2065: 'AfxBeginThread' : undeclared identifier :confused::confused: Is it possible to use this function in Win32 Application ? Please Help me. Best Regards.

      B Offline
      B Offline
      Bartosz Bien
      wrote on last edited by
      #2

      Nope. AfxBeginThread is declared in afxwin.h, which is a part of MFC framework. In Win32 apps, use _beginthread instead. Regards, BB

      J 1 Reply Last reply
      0
      • B Bartosz Bien

        Nope. AfxBeginThread is declared in afxwin.h, which is a part of MFC framework. In Win32 apps, use _beginthread instead. Regards, BB

        J Offline
        J Offline
        Joe Woodbury
        wrote on last edited by
        #3

        Win32 apps should use _beginthreadex, not _beginthread.

        B 1 Reply Last reply
        0
        • J Joe Woodbury

          Win32 apps should use _beginthreadex, not _beginthread.

          B Offline
          B Offline
          Bartosz Bien
          wrote on last edited by
          #4

          Both may be used, however _beginthreadex is better (security information, initial state, autoclosing handle, etc.). Thanks for your comment. :rolleyes: Regards, BB

          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