Click here to Skip to main content
15,922,007 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: pascal to c code converstion .. Pin
David Crow23-Nov-08 12:53
David Crow23-Nov-08 12:53 
QuestionDrag & drop between tree controls [modified] Pin
AnithaSubramani21-Nov-08 19:09
AnithaSubramani21-Nov-08 19:09 
AnswerRe: Drag & drop between tree controls Pin
Code-o-mat22-Nov-08 9:36
Code-o-mat22-Nov-08 9:36 
Questionno border for my form Pin
zon_cpp21-Nov-08 19:05
zon_cpp21-Nov-08 19:05 
AnswerRe: no border for my form Pin
zon_cpp22-Nov-08 1:45
zon_cpp22-Nov-08 1:45 
GeneralRe: no border for my form Pin
Randor 22-Nov-08 2:50
professional Randor 22-Nov-08 2:50 
QuestionContinuesPrinting not working please help me. Pin
Le@rner21-Nov-08 18:17
Le@rner21-Nov-08 18:17 
AnswerRe: ContinuesPrinting not working please help me. Pin
Rajesh Katalkar24-Nov-08 4:54
Rajesh Katalkar24-Nov-08 4:54 
QuestionProblem in debugging [modified] Pin
sen pao21-Nov-08 17:11
sen pao21-Nov-08 17:11 
AnswerRe: Problem in debugging Pin
David Crow21-Nov-08 18:04
David Crow21-Nov-08 18:04 
AnswerRe: Problem in debugging Pin
sen pao21-Nov-08 18:17
sen pao21-Nov-08 18:17 
AnswerNeed Help: How do I assign a Char* To System::String ^ Pin
niiAmoo21-Nov-08 12:35
niiAmoo21-Nov-08 12:35 
GeneralRe: Need Help: How do I assign a Char* To System::String ^ Pin
Saurabh.Garg21-Nov-08 16:43
Saurabh.Garg21-Nov-08 16:43 
GeneralRe: Need Help: How do I assign a Char* To System::String ^ Pin
niiAmoo21-Nov-08 20:47
niiAmoo21-Nov-08 20:47 
GeneralRe: Need Help: How do I assign a Char* To System::String ^ Pin
Saurabh.Garg22-Nov-08 3:16
Saurabh.Garg22-Nov-08 3:16 
QuestionApp depending on wrong DLL version Pin
KellyR21-Nov-08 10:45
KellyR21-Nov-08 10:45 
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 

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.