Click here to Skip to main content
15,845,912 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMouse out of dialog Pin
_Flaviu3-Nov-16 5:07
_Flaviu3-Nov-16 5:07 
AnswerRe: Mouse out of dialog Pin
leon de boer3-Nov-16 5:21
leon de boer3-Nov-16 5:21 
QuestionRe: Mouse out of dialog Pin
David Crow3-Nov-16 16:42
David Crow3-Nov-16 16:42 
AnswerRe: Mouse out of dialog Pin
_Flaviu3-Nov-16 22:44
_Flaviu3-Nov-16 22:44 
GeneralRe: Mouse out of dialog Pin
Richard MacCutchan3-Nov-16 23:04
mveRichard MacCutchan3-Nov-16 23:04 
GeneralRe: Mouse out of dialog Pin
leon de boer3-Nov-16 23:10
leon de boer3-Nov-16 23:10 
GeneralRe: Mouse out of dialog Pin
_Flaviu4-Nov-16 0:12
_Flaviu4-Nov-16 0:12 
QuestionSharing some humour Pin
leon de boer2-Nov-16 6:40
leon de boer2-Nov-16 6:40 
I was doing a job for a company and they don't allow memory allocations to be used you have to request a static block at program start from the memory management unit and then recycle that in your code. You want more there is a whole song and dance you must do. It was a complete pain and then they made the mistake of telling me I could use threads and you could request space for the thread ... so I did apply for 1 thread and got given it.

I offer perhaps the funniest use of a thread ever ... in windows the code would look like this
static BOOL ReleaseThread = FALSE;
 
DWORD WINAPI MyThread (LPVOID lpParam){ 
   char buffer[4096];
   *(void**)lpParam = &buffer[0];
   do {} while (!ReleaseThread);
   return (0);
} 

If you haven't worked it out here would be the equivalent windows use of the thread.
char* buf = NULL;
HANDLE myThread = CreateThread(0, 0, MyThread, &buf, 0, NULL);
while (!buf) {};
strcpy_s(buf, 4096, "Hello there stack buffer\r\n");
printf("%s", buf);
ReleaseThread = TRUE;

But the best bit was it passed thru without anyone noticing.
In vino veritas

JokeRe: Sharing some humour Pin
Randor 2-Nov-16 18:34
professional Randor 2-Nov-16 18:34 
GeneralRe: Sharing some humour Pin
leon de boer2-Nov-16 19:57
leon de boer2-Nov-16 19:57 
AnswerRe: Sharing some humour Pin
Daniel Pfeffer2-Nov-16 23:23
professionalDaniel Pfeffer2-Nov-16 23:23 
GeneralRe: Sharing some humour Pin
leon de boer3-Nov-16 4:14
leon de boer3-Nov-16 4:14 
GeneralRe: Sharing some humour Pin
Daniel Pfeffer3-Nov-16 4:34
professionalDaniel Pfeffer3-Nov-16 4:34 
GeneralRe: Sharing some humour Pin
leon de boer3-Nov-16 5:41
leon de boer3-Nov-16 5:41 
GeneralRe: Sharing some humour Pin
Randor 13-Nov-16 6:43
professional Randor 13-Nov-16 6:43 
QuestionSendMessage for Interprocess communication stops working Pin
ForNow1-Nov-16 16:29
ForNow1-Nov-16 16:29 
AnswerRe: SendMessage for Interprocess communication stops working Pin
Midi_Mick1-Nov-16 17:16
professionalMidi_Mick1-Nov-16 17:16 
GeneralRe: SendMessage for Interprocess communication stops working Pin
ForNow1-Nov-16 17:22
ForNow1-Nov-16 17:22 
GeneralRe: SendMessage for Interprocess communication stops working Pin
Midi_Mick1-Nov-16 18:36
professionalMidi_Mick1-Nov-16 18:36 
AnswerRe: SendMessage for Interprocess communication stops working Pin
Randor 1-Nov-16 18:56
professional Randor 1-Nov-16 18:56 
GeneralRe: SendMessage for Interprocess communication stops working Pin
ForNow2-Nov-16 14:59
ForNow2-Nov-16 14:59 
GeneralRe: SendMessage for Interprocess communication stops working Pin
Randor 2-Nov-16 17:42
professional Randor 2-Nov-16 17:42 
AnswerRe: SendMessage for Interprocess communication stops working Pin
leon de boer2-Nov-16 4:10
leon de boer2-Nov-16 4:10 
GeneralRe: SendMessage for Interprocess communication stops working Pin
ForNow2-Nov-16 15:32
ForNow2-Nov-16 15:32 
GeneralRe: SendMessage for Interprocess communication stops working Pin
leon de boer2-Nov-16 17:57
leon de boer2-Nov-16 17:57 

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.