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

C / C++ / MFC

 
QuestionVagarities of Multiple threads in Windows Pin
Bram van Kampen16-Mar-16 14:36
Bram van Kampen16-Mar-16 14:36 
AnswerRe: Vagarities of Multiple threads in Windows Pin
Jochen Arndt16-Mar-16 21:59
professionalJochen Arndt16-Mar-16 21:59 
AnswerRe: Vagarities of Multiple threads in Windows Pin
Richard MacCutchan16-Mar-16 23:05
mveRichard MacCutchan16-Mar-16 23:05 
GeneralRe: Vagarities of Multiple threads in Windows Pin
Bram van Kampen17-Mar-16 16:30
Bram van Kampen17-Mar-16 16:30 
GeneralRe: Vagarities of Multiple threads in Windows Pin
Richard MacCutchan17-Mar-16 22:51
mveRichard MacCutchan17-Mar-16 22:51 
GeneralRe: Vagarities of Multiple threads in Windows Pin
Bram van Kampen18-Mar-16 17:57
Bram van Kampen18-Mar-16 17:57 
GeneralRe: Vagarities of Multiple threads in Windows Pin
Richard MacCutchan18-Mar-16 22:57
mveRichard MacCutchan18-Mar-16 22:57 
GeneralRe: Vagarities of Multiple threads in Windows Pin
Bram van Kampen19-Mar-16 13:41
Bram van Kampen19-Mar-16 13:41 
Language Problems again indeed.

Sorry for getting the Wrong end of the stick. I call those things 'Stupid'. That reflects my feeling when, after two days stepping trough code into ever deeper levels, I find in the code I wrote a few years ago, deep inside the bowels of working code something like:
C++
if(abc=PQR){ do this }else{ do something else}

Worked fine for three years, Changed something, which (Although I long forgot the details of the How and should call the else,(which of course never happens), and the program breaks at run time.)

You know the run yourself! Working Code, Go tru the documentation, and even when you look at the offending line, you can still overlook it. It Must be There you say. Let's look at the Assembler Code! Hey, the Whole 'if' and 'else' statement have no Code.
At the same time, it worked for years.

You Doubt Compiler Settings, did I have a bad #define somewhere that caused this. Then it dawns! '=' in stead of '=='. (Or some error of that kind)
Then is my bodily reaction to feel Stupid. First of all for not properly testing years ago, but then again, I'm on my own, and there is often pressure of time. One needs to produce something that works, and Our own shop, the main user of the software is often gagging for it. Secondly, for making the typo in the first place. It was not the fact that I did not know the difference between, in this case '=' and '==', but there are other typo's.
Thirdly for not believing that the Compiler compiled correctly. Yes, the beast is near coming of age at 19, but, it is trusty,
and I am aware of it's vagarities.

The Other option is always that I have a Concept Wrong. Something that worked, in the past, but the strict rules were not followed, and the failure to follow the rules comes home to roost. This can ultimately mean re-starting from the beginning, and flushing existing code.

What's new for me is multithreaded programming. I've read quite a few articles on it, and the do's and dont's are so scary and forbidding, one would conclude that multithreading in MFC is all but impossible. At the same time MsOffice95 uses it liberally.

The point is, that I'm fledgling to write stuff like that, and when things go wrong is: Was it a Typo, or, did I fall in One of the Pitfalls. Then there is lack of Information.
Does the Windows Timer Stuff start a New Thread, (if so, of what kind, GUI or Worker), or is it a kludge in the Message System.

At least Peace between us has broken out again. Sorry again that I ever thought different.
BTW always feel free to email me. We may have things in common and experiences in life to share.

Regards Smile | :) Smile | :)
Bram van Kampen

GeneralRe: Vagarities of Multiple threads in Windows Pin
Richard MacCutchan19-Mar-16 22:09
mveRichard MacCutchan19-Mar-16 22:09 
GeneralRe: Vagarities of Multiple threads in Windows Pin
Bram van Kampen22-Mar-16 13:34
Bram van Kampen22-Mar-16 13:34 
AnswerRe: Vagarities of Multiple threads in Windows Pin
leon de boer19-Mar-16 21:35
leon de boer19-Mar-16 21:35 
GeneralRe: Vagarities of Multiple threads in Windows Pin
Bram van Kampen22-Mar-16 13:33
Bram van Kampen22-Mar-16 13:33 
GeneralRe: Vagarities of Multiple threads in Windows Pin
leon de boer25-Mar-16 23:57
leon de boer25-Mar-16 23:57 
QuestionOpenGL control on split MFC form Pin
Member 1228273814-Mar-16 10:08
Member 1228273814-Mar-16 10:08 
AnswerRe: OpenGL control on split MFC form Pin
Richard MacCutchan14-Mar-16 23:48
mveRichard MacCutchan14-Mar-16 23:48 
QuestionDefault argument for DISP_FUNCTION_ID Pin
Member 1214953910-Mar-16 16:44
Member 1214953910-Mar-16 16:44 
AnswerRe: Default argument for DISP_FUNCTION_ID Pin
Bram van Kampen16-Mar-16 15:45
Bram van Kampen16-Mar-16 15:45 
QuestionBoth EnumchildWindows and GetWindow return NULL for a ChildWindow modeless dialogbox Pin
ForNow10-Mar-16 10:19
ForNow10-Mar-16 10:19 
AnswerRe: Both EnumchildWindows and GetWindow return NULL for a ChildWindow modeless dialogbox Pin
Bram van Kampen10-Mar-16 14:39
Bram van Kampen10-Mar-16 14:39 
GeneralRe: Both EnumchildWindows and GetWindow return NULL for a ChildWindow modeless dialogbox Pin
ForNow10-Mar-16 15:20
ForNow10-Mar-16 15:20 
GeneralRe: Both EnumchildWindows and GetWindow return NULL for a ChildWindow modeless dialogbox Pin
Richard MacCutchan11-Mar-16 3:52
mveRichard MacCutchan11-Mar-16 3:52 
AnswerRe: Both EnumchildWindows and GetWindow return NULL for a ChildWindow modeless dialogbox Pin
Richard MacCutchan10-Mar-16 21:21
mveRichard MacCutchan10-Mar-16 21:21 
AnswerRe: Both EnumchildWindows and GetWindow return NULL for a ChildWindow modeless dialogbox Pin
leon de boer19-Mar-16 21:50
leon de boer19-Mar-16 21:50 
GeneralRe: Both EnumchildWindows and GetWindow return NULL for a ChildWindow modeless dialogbox Pin
ForNow20-Mar-16 12:45
ForNow20-Mar-16 12:45 
QuestionHow Much of WM_USER+X is used by MFC Pin
Bram van Kampen9-Mar-16 14:14
Bram van Kampen9-Mar-16 14:14 

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.