Click here to Skip to main content
15,940,373 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalstore and retrieve .bmp using sql server 2000 and vc++ 6.0 Pin
mctpursuer26-Nov-03 23:09
mctpursuer26-Nov-03 23:09 
GeneralA confusing problem... Pin
Rob Manderson26-Nov-03 23:03
protectorRob Manderson26-Nov-03 23:03 
GeneralRe: A confusing problem... Pin
Ryan Roberts26-Nov-03 23:42
Ryan Roberts26-Nov-03 23:42 
GeneralRe: A confusing problem... Pin
Rob Manderson26-Nov-03 23:48
protectorRob Manderson26-Nov-03 23:48 
GeneralRe: A confusing problem... Pin
Mike Dimmick27-Nov-03 1:48
Mike Dimmick27-Nov-03 1:48 
GeneralRe: A confusing problem... Pin
Rob Manderson27-Nov-03 8:49
protectorRob Manderson27-Nov-03 8:49 
GeneralRe: A confusing problem... Pin
Mike Dimmick27-Nov-03 9:11
Mike Dimmick27-Nov-03 9:11 
GeneralRe: A confusing problem... Pin
Neville Franks27-Nov-03 0:23
Neville Franks27-Nov-03 0:23 
If I've read this correctly you are (indirectly) calling SendMessage() from a worker thread to act on a window that lives in the main app thread. If so you are asking for trouble, because it is very easy to get into a deadlock situation. This can happen because the main thread is processing some windows request, and your sendmessage has to wait until tht finishes and these actions beat on each other. It is late here on Oz and this isn't sounding too good. Frown | :(

To do this sort of thing across threads I always use PostMessage(). If the worker thread has to wait until the message has been processed then I use an event which I wait on in the worker thread. The app thread will signal the event when it has done whatever I've requested of it.

Another approach for this specific bit of code might be a publish-subscribe approach, where the worker threads publishes the information to say an STL vector, and the app thread checks this from time to time and pulls stuff which is waiting. But I'm probably heading off the track and off to bed.Sleepy | :zzz:

Hope I've been of help.

Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
GeneralRe: A confusing problem... Pin
Rob Manderson27-Nov-03 8:50
protectorRob Manderson27-Nov-03 8:50 
GeneralRe: A confusing problem... Pin
Neville Franks27-Nov-03 9:10
Neville Franks27-Nov-03 9:10 
GeneralRe: A confusing problem... Pin
Roger Allen27-Nov-03 3:31
Roger Allen27-Nov-03 3:31 
GeneralDrop-Down toolbar Pin
shyampriya26-Nov-03 22:56
shyampriya26-Nov-03 22:56 
GeneralTemplate class in a vector Pin
Jerome Conus26-Nov-03 22:35
Jerome Conus26-Nov-03 22:35 
GeneralRe: Template class in a vector Pin
Mike Dimmick27-Nov-03 2:01
Mike Dimmick27-Nov-03 2:01 
GeneralOutlook Express please help Pin
Jump_Around26-Nov-03 21:57
Jump_Around26-Nov-03 21:57 
GeneralSpawning error Pin
Cedric Moonen26-Nov-03 21:51
Cedric Moonen26-Nov-03 21:51 
GeneralRe: Spawning error Pin
Prakash Nadar26-Nov-03 23:47
Prakash Nadar26-Nov-03 23:47 
GeneralRe: Spawning error Pin
Cedric Moonen26-Nov-03 23:57
Cedric Moonen26-Nov-03 23:57 
GeneralVisual C++ 6 and Oracle rman Pin
steffen241226-Nov-03 21:16
steffen241226-Nov-03 21:16 
GeneralI need your suggestions of building a network scan tool. Pin
mctpursuer26-Nov-03 20:56
mctpursuer26-Nov-03 20:56 
QuestionPrinter DC? Pin
murali_utr26-Nov-03 20:33
murali_utr26-Nov-03 20:33 
AnswerRe: Printer DC? Pin
Roger Allen27-Nov-03 3:36
Roger Allen27-Nov-03 3:36 
Questionabababab() - what to do? Pin
dennisV26-Nov-03 18:59
dennisV26-Nov-03 18:59 
AnswerRe: abababab() - what to do? Pin
Prakash Nadar26-Nov-03 21:33
Prakash Nadar26-Nov-03 21:33 
GeneralRe: abababab() - what to do? Pin
dennisV26-Nov-03 21:40
dennisV26-Nov-03 21:40 

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.