Click here to Skip to main content
15,888,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMouse out of dialog Pin
_Flaviu3-Nov-16 4:07
_Flaviu3-Nov-16 4:07 
AnswerRe: Mouse out of dialog Pin
leon de boer3-Nov-16 4:21
leon de boer3-Nov-16 4:21 
QuestionRe: Mouse out of dialog Pin
David Crow3-Nov-16 15:42
David Crow3-Nov-16 15:42 
AnswerRe: Mouse out of dialog Pin
_Flaviu3-Nov-16 21:44
_Flaviu3-Nov-16 21:44 
GeneralRe: Mouse out of dialog Pin
Richard MacCutchan3-Nov-16 22:04
mveRichard MacCutchan3-Nov-16 22:04 
GeneralRe: Mouse out of dialog Pin
leon de boer3-Nov-16 22:10
leon de boer3-Nov-16 22:10 
GeneralRe: Mouse out of dialog Pin
_Flaviu3-Nov-16 23:12
_Flaviu3-Nov-16 23:12 
QuestionSharing some humour Pin
leon de boer2-Nov-16 5:40
leon de boer2-Nov-16 5: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 17:34
professional Randor 2-Nov-16 17:34 
GeneralRe: Sharing some humour Pin
leon de boer2-Nov-16 18:57
leon de boer2-Nov-16 18:57 
AnswerRe: Sharing some humour Pin
Daniel Pfeffer2-Nov-16 22:23
professionalDaniel Pfeffer2-Nov-16 22:23 
GeneralRe: Sharing some humour Pin
leon de boer3-Nov-16 3:14
leon de boer3-Nov-16 3:14 
GeneralRe: Sharing some humour Pin
Daniel Pfeffer3-Nov-16 3:34
professionalDaniel Pfeffer3-Nov-16 3:34 
GeneralRe: Sharing some humour Pin
leon de boer3-Nov-16 4:41
leon de boer3-Nov-16 4:41 
GeneralRe: Sharing some humour Pin
Randor 13-Nov-16 5:43
professional Randor 13-Nov-16 5:43 
QuestionSendMessage for Interprocess communication stops working Pin
ForNow1-Nov-16 15:29
ForNow1-Nov-16 15:29 
AnswerRe: SendMessage for Interprocess communication stops working Pin
Midi_Mick1-Nov-16 16:16
professionalMidi_Mick1-Nov-16 16:16 
GeneralRe: SendMessage for Interprocess communication stops working Pin
ForNow1-Nov-16 16:22
ForNow1-Nov-16 16:22 
GeneralRe: SendMessage for Interprocess communication stops working Pin
Midi_Mick1-Nov-16 17:36
professionalMidi_Mick1-Nov-16 17:36 
AnswerRe: SendMessage for Interprocess communication stops working Pin
Randor 1-Nov-16 17:56
professional Randor 1-Nov-16 17:56 
GeneralRe: SendMessage for Interprocess communication stops working Pin
ForNow2-Nov-16 13:59
ForNow2-Nov-16 13:59 
GeneralRe: SendMessage for Interprocess communication stops working Pin
Randor 2-Nov-16 16:42
professional Randor 2-Nov-16 16:42 
AnswerRe: SendMessage for Interprocess communication stops working Pin
leon de boer2-Nov-16 3:10
leon de boer2-Nov-16 3:10 
GeneralRe: SendMessage for Interprocess communication stops working Pin
ForNow2-Nov-16 14:32
ForNow2-Nov-16 14:32 
GeneralRe: SendMessage for Interprocess communication stops working Pin
leon de boer2-Nov-16 16:57
leon de boer2-Nov-16 16: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.