Click here to Skip to main content
15,916,463 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multithread and GDI Issues Pin
rp_suman8-Mar-08 21:53
rp_suman8-Mar-08 21:53 
GeneralRe: Multithread and GDI Issues Pin
Cedric Moonen8-Mar-08 23:09
Cedric Moonen8-Mar-08 23:09 
GeneralRe: Multithread and GDI Issues Pin
kanduripavan9-Mar-08 2:26
kanduripavan9-Mar-08 2:26 
GeneralRe: Multithread and GDI Issues Pin
Cedric Moonen9-Mar-08 2:34
Cedric Moonen9-Mar-08 2:34 
GeneralRe: Multithread and GDI Issues Pin
kanduripavan9-Mar-08 2:49
kanduripavan9-Mar-08 2:49 
GeneralRe: Multithread and GDI Issues Pin
kanduripavan10-Mar-08 0:08
kanduripavan10-Mar-08 0:08 
GeneralRe: Multithread and GDI Issues Pin
Rajkumar R10-Mar-08 0:46
Rajkumar R10-Mar-08 0:46 
GeneralRe: Multithread and GDI Issues Pin
Mark Salsbery9-Mar-08 8:58
Mark Salsbery9-Mar-08 8:58 
You can do drawing from another thread, but you need to really understand thread
synchronization.

Nothing in GDI is thread safe, so ALL GDI operations need to be synchronized between threads.

Have you initialized your GDI critical section?
Do you have one and ONLY one critical section object shared by all the threads?

If you answered no to either of those, you aren't using thread synchronization objects correctly.

Don't forget to synchronize the UI thread as well.

What is causing the assertion?  You should be able to look right at the offending line of
code in the debugger.

What is the exact assertion message?

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Multithread and GDI Issues Pin
kanduripavan10-Mar-08 0:18
kanduripavan10-Mar-08 0:18 
GeneralRe: Multithread and GDI Issues Pin
Mark Salsbery10-Mar-08 6:52
Mark Salsbery10-Mar-08 6:52 
GeneralRe: Multithread and GDI Issues Pin
Mark Salsbery10-Mar-08 6:55
Mark Salsbery10-Mar-08 6:55 
GeneralRe: Multithread and GDI Issues Pin
kanduripavan11-Mar-08 8:12
kanduripavan11-Mar-08 8:12 
QuestionHow can I get the mouse position when i click on the CListCtrl? Pin
Md. Ali Naser Khan8-Mar-08 18:00
Md. Ali Naser Khan8-Mar-08 18:00 
AnswerRe: How can I get the mouse position when i click on the CListCtrl? Pin
Md. Ali Naser Khan8-Mar-08 19:48
Md. Ali Naser Khan8-Mar-08 19:48 
GeneralRe: How can I get the mouse position when i click on the CListCtrl? Pin
Rajkumar R8-Mar-08 21:28
Rajkumar R8-Mar-08 21:28 
GeneralCSpinButton event handling Pin
Tom Paronis8-Mar-08 10:16
Tom Paronis8-Mar-08 10:16 
GeneralRe: CSpinButton event handling Pin
Mark Salsbery8-Mar-08 10:21
Mark Salsbery8-Mar-08 10:21 
GeneralRe: CSpinButton event handling Pin
Tom Paronis8-Mar-08 10:27
Tom Paronis8-Mar-08 10:27 
GeneralRe: CSpinButton event handling Pin
Mark Salsbery8-Mar-08 11:30
Mark Salsbery8-Mar-08 11:30 
GeneralRe: CSpinButton event handling Pin
Tom Paronis9-Mar-08 8:31
Tom Paronis9-Mar-08 8:31 
GeneralRe: CSpinButton event handling Pin
Mark Salsbery9-Mar-08 8:43
Mark Salsbery9-Mar-08 8:43 
GeneralRadio Buttons Pin
RomTibi8-Mar-08 9:02
RomTibi8-Mar-08 9:02 
GeneralRe: Radio Buttons Pin
Christian Graus8-Mar-08 14:25
protectorChristian Graus8-Mar-08 14:25 
GeneralRe: Radio Buttons Pin
RomTibi8-Mar-08 23:47
RomTibi8-Mar-08 23:47 
GeneralRe: Radio Buttons Pin
Hamid_RT9-Mar-08 0:46
Hamid_RT9-Mar-08 0:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.