Click here to Skip to main content
15,895,011 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: App depending on wrong DLL version Pin
Randor 22-Nov-08 0:26
professional Randor 22-Nov-08 0:26 
QuestionSerialization and schema numbers Pin
softwaremonkey21-Nov-08 5:41
softwaremonkey21-Nov-08 5:41 
QuestionRe: Serialization and schema numbers Pin
Mark Salsbery21-Nov-08 6:13
Mark Salsbery21-Nov-08 6:13 
QuestionAVI frame grabber – needs timer, why? [modified] SOLVED Pin
Vaclav_21-Nov-08 5:08
Vaclav_21-Nov-08 5:08 
AnswerRe: AVI frame grabber – needs timer, why? Pin
Mark Salsbery21-Nov-08 6:54
Mark Salsbery21-Nov-08 6:54 
GeneralRe: AVI frame grabber – needs timer, why? Pin
Vaclav_23-Nov-08 5:48
Vaclav_23-Nov-08 5:48 
QuestionUser-defined objects in Windows message parameters Pin
Atropus21-Nov-08 3:50
Atropus21-Nov-08 3:50 
AnswerRe: User-defined objects in Windows message parameters Pin
Matthew Faithfull21-Nov-08 4:00
Matthew Faithfull21-Nov-08 4:00 
That's a tricky one. Maybe you can solve it by using PostMessage and having the message handling end do the delete but if the allocation was on a different thread this might be dangerous.
Can you use two messages, one to tell the Window end to allocate a structure, write a pointer to it at a specified address and then set an Event and the second, triggered in the secondary thread by the event, to tell the Window that structure has been filled in.

Kind of like:-
Window Thread                         Secondary Thread
                                      Set up a pointer pStruct
                                      Post a msg to the Window with pStruct
                                      Wait on a shared event
Recieve msg with &pStruct
pStruct = new Struct
Set Shared Event
                                      pStruct is now allocated so fill it
                                      SendMessage to Window
Recieve msg<--------------------------
Process and delete pStruct----------->Secondary Thread continues


Perhaps that's over complicated and all you need is PostMessage but I've struggled with a few of these in the past. 
Watch it when your controls are being destroyed that you don't leak allocations that havn't been used yet.


"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)

AnswerRe: User-defined objects in Windows message parameters Pin
Rajasekharan Vengalil21-Nov-08 5:31
Rajasekharan Vengalil21-Nov-08 5:31 
AnswerRe: User-defined objects in Windows message parameters Pin
Roger Stoltz21-Nov-08 5:56
Roger Stoltz21-Nov-08 5:56 
QuestionSimple CFileDialog Question Pin
sabdalla8021-Nov-08 2:59
sabdalla8021-Nov-08 2:59 
QuestionRe: Simple CFileDialog Question Pin
David Crow21-Nov-08 3:05
David Crow21-Nov-08 3:05 
AnswerRe: Simple CFileDialog Question Pin
sabdalla8021-Nov-08 3:32
sabdalla8021-Nov-08 3:32 
GeneralRe: Simple CFileDialog Question Pin
Rajasekharan Vengalil21-Nov-08 5:34
Rajasekharan Vengalil21-Nov-08 5:34 
GeneralRe: Simple CFileDialog Question Pin
sabdalla8021-Nov-08 6:01
sabdalla8021-Nov-08 6:01 
GeneralRe: Simple CFileDialog Question Pin
Rajasekharan Vengalil21-Nov-08 6:12
Rajasekharan Vengalil21-Nov-08 6:12 
QuestionDate greater than 2038 Pin
s@tish21-Nov-08 1:15
s@tish21-Nov-08 1:15 
AnswerRe: Date greater than 2038 Pin
Nibu babu thomas21-Nov-08 1:24
Nibu babu thomas21-Nov-08 1:24 
AnswerRe: Date greater than 2038 Pin
_AnsHUMAN_ 21-Nov-08 1:24
_AnsHUMAN_ 21-Nov-08 1:24 
QuestionLPBYTE to CString Pin
cpvc++21-Nov-08 1:12
cpvc++21-Nov-08 1:12 
AnswerRe: LPBYTE to CString Pin
Nibu babu thomas21-Nov-08 1:27
Nibu babu thomas21-Nov-08 1:27 
GeneralRe: LPBYTE to CString Pin
cpvc++21-Nov-08 1:29
cpvc++21-Nov-08 1:29 
GeneralRe: LPBYTE to CString Pin
David Crow21-Nov-08 3:02
David Crow21-Nov-08 3:02 
GeneralRe: LPBYTE to CString Pin
Rajasekharan Vengalil21-Nov-08 5:43
Rajasekharan Vengalil21-Nov-08 5:43 
QuestionIn a dll, exception handling works in Debug but not in Release Pin
sashoalm21-Nov-08 1:09
sashoalm21-Nov-08 1:09 

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.