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. Where I heve to set thread In my application??

Where I heve to set thread In my application??

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++visual-studiographicsworkspace
3 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.
  • A Offline
    A Offline
    ashishbhatt 0
    wrote on last edited by
    #1

    Hi All,, I am using MFC Application with VS 2005. In my application I am capturing the current screen by creating virtual window(by CreateWindow()) and apply hooks to that Window. In hooks I take the perticuler region which is going to be updated and convert it into the rectangle and send these messages to the my application. In My MFC class I store these all rectangles into the list. And I retrived these list and capture from screen (using bitmap)with that perticular rectangle and compress that rectangle using JPEG. Here I used Hooks as DLL in other project in my current workspace, so it gives me continues messages with that rectangles. So , How can I set thread ( or Critical section or mutex) in my application and plz suggest me where i have to create Thread or on which method or class. I am very sorry for very large description but it is good to understand. Thanks in Advance.

    Ashish Bhatt

    M L 2 Replies Last reply
    0
    • A ashishbhatt 0

      Hi All,, I am using MFC Application with VS 2005. In my application I am capturing the current screen by creating virtual window(by CreateWindow()) and apply hooks to that Window. In hooks I take the perticuler region which is going to be updated and convert it into the rectangle and send these messages to the my application. In My MFC class I store these all rectangles into the list. And I retrived these list and capture from screen (using bitmap)with that perticular rectangle and compress that rectangle using JPEG. Here I used Hooks as DLL in other project in my current workspace, so it gives me continues messages with that rectangles. So , How can I set thread ( or Critical section or mutex) in my application and plz suggest me where i have to create Thread or on which method or class. I am very sorry for very large description but it is good to understand. Thanks in Advance.

      Ashish Bhatt

      M Offline
      M Offline
      Mattias G
      wrote on last edited by
      #2

      Do you really have to use a thread? (Multitasking should be avoided at all costs, in my opinion)

      1 Reply Last reply
      0
      • A ashishbhatt 0

        Hi All,, I am using MFC Application with VS 2005. In my application I am capturing the current screen by creating virtual window(by CreateWindow()) and apply hooks to that Window. In hooks I take the perticuler region which is going to be updated and convert it into the rectangle and send these messages to the my application. In My MFC class I store these all rectangles into the list. And I retrived these list and capture from screen (using bitmap)with that perticular rectangle and compress that rectangle using JPEG. Here I used Hooks as DLL in other project in my current workspace, so it gives me continues messages with that rectangles. So , How can I set thread ( or Critical section or mutex) in my application and plz suggest me where i have to create Thread or on which method or class. I am very sorry for very large description but it is good to understand. Thanks in Advance.

        Ashish Bhatt

        L Offline
        L Offline
        led mike
        wrote on last edited by
        #3

        ashishbhatt wrote:

        but it is good to understand.

        Yes it is. Therefore it would be good for you to understand threads and threading issues before you develop a multi-threading application yes? There are sources on the internet you can use, try google, I also recommend the book Advanced Windows by Richter.

        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