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

CWinThread

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
5 Posts 2 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.
  • M Offline
    M Offline
    MAXS72U
    wrote on last edited by
    #1

    I to all, I have a big problem with a CWinThread derived class. From another class I post messages to this derived class with PostThreadMessage(...) member function, and if I store all messages in a log file I can see all them. On the derived class, if I store to a log file all messages that I receive, I can't see all them! X| So it seems that my derived class is missing some messages! Is this possible? help me please. Thanks in advance.

    S 1 Reply Last reply
    0
    • M MAXS72U

      I to all, I have a big problem with a CWinThread derived class. From another class I post messages to this derived class with PostThreadMessage(...) member function, and if I store all messages in a log file I can see all them. On the derived class, if I store to a log file all messages that I receive, I can't see all them! X| So it seems that my derived class is missing some messages! Is this possible? help me please. Thanks in advance.

      S Offline
      S Offline
      Shane Hyde
      wrote on last edited by
      #2

      This one gave me grief when Win2K came out. Check out the KB, and you will see it is a "feature". You need to create a HiddenWindow and send the messages there. http://support.microsoft.com/support/kb/articles/Q183/1/16.ASP Shane

      M 1 Reply Last reply
      0
      • S Shane Hyde

        This one gave me grief when Win2K came out. Check out the KB, and you will see it is a "feature". You need to create a HiddenWindow and send the messages there. http://support.microsoft.com/support/kb/articles/Q183/1/16.ASP Shane

        M Offline
        M Offline
        MAXS72U
        wrote on last edited by
        #3

        Thanks a lot Shane, but I've solved my problem simply adding a sleep statement of 100 ms after the PostThreadMessage(...):confused: :confused: :confused: ! I don't know why, but now it works fine..... Thanks Massimo "Take time to think, it is the source of power"

        S 1 Reply Last reply
        0
        • M MAXS72U

          Thanks a lot Shane, but I've solved my problem simply adding a sleep statement of 100 ms after the PostThreadMessage(...):confused: :confused: :confused: ! I don't know why, but now it works fine..... Thanks Massimo "Take time to think, it is the source of power"

          S Offline
          S Offline
          Shane Hyde
          wrote on last edited by
          #4

          Be very careful with this solution, what works for you may not work for those with Dual CPUs. Shane

          M 1 Reply Last reply
          0
          • S Shane Hyde

            Be very careful with this solution, what works for you may not work for those with Dual CPUs. Shane

            M Offline
            M Offline
            MAXS72U
            wrote on last edited by
            #5

            Thanks in advance. "Take time to think, it is the source of power"

            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