A Programming Dilemma
-
So this guy I know.... ....decided to chuck out his old GDI drawing code in favor of GDI+. He expected a bit of a threshold but felt confident it would pay off. Off he goes and happily types: #include <gdiplus.h> Just to make sure, he unsuspectingly hits F7. KAZANGO! (a lovely sound effect (from the B.C. cartoons) I haven't used for decades) The compiler explodes with 77 bizare errors. Mostly syntax errors and such. So he [this guy] tries to move that include around (into and out of stdafx.h etc) to make the include work. Different bizare errors but same nightmare. Then begins messing around with the pch [precompiled header] settings. No progress. So he consults his trused old friend, Mr. Google. Mr. Google tells him that many other guys just like him have had similar problems. But none of the solutions Mr. G. suggests makes this guys code compile. So gripping for straws he more or less randomly eyes his stdafx.h. He feels like buying a lottery ticket when he removes the [auto-generated] line:
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
But after two hours of constant pain, he is becoming rather discouraged. And rather apprehensively he presses F7. And it all compiles perfectly fine. He shakes his head in disbelief: "How the :wtf: was I supposed to know that ???"........................ Life is too shor
megaadam wrote:
#define WIN32_LEAN_AND_MEAN
You mean this guy doesn't know the content of
windows.h
by heart? -
So this guy I know.... ....decided to chuck out his old GDI drawing code in favor of GDI+. He expected a bit of a threshold but felt confident it would pay off. Off he goes and happily types: #include <gdiplus.h> Just to make sure, he unsuspectingly hits F7. KAZANGO! (a lovely sound effect (from the B.C. cartoons) I haven't used for decades) The compiler explodes with 77 bizare errors. Mostly syntax errors and such. So he [this guy] tries to move that include around (into and out of stdafx.h etc) to make the include work. Different bizare errors but same nightmare. Then begins messing around with the pch [precompiled header] settings. No progress. So he consults his trused old friend, Mr. Google. Mr. Google tells him that many other guys just like him have had similar problems. But none of the solutions Mr. G. suggests makes this guys code compile. So gripping for straws he more or less randomly eyes his stdafx.h. He feels like buying a lottery ticket when he removes the [auto-generated] line:
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
But after two hours of constant pain, he is becoming rather discouraged. And rather apprehensively he presses F7. And it all compiles perfectly fine. He shakes his head in disbelief: "How the :wtf: was I supposed to know that ???"........................ Life is too shor
I feel your pain. The
WIN32_LEAN_AND_MEAN
&GDI+
thingie hurt me some years ago. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
So this guy I know.... ....decided to chuck out his old GDI drawing code in favor of GDI+. He expected a bit of a threshold but felt confident it would pay off. Off he goes and happily types: #include <gdiplus.h> Just to make sure, he unsuspectingly hits F7. KAZANGO! (a lovely sound effect (from the B.C. cartoons) I haven't used for decades) The compiler explodes with 77 bizare errors. Mostly syntax errors and such. So he [this guy] tries to move that include around (into and out of stdafx.h etc) to make the include work. Different bizare errors but same nightmare. Then begins messing around with the pch [precompiled header] settings. No progress. So he consults his trused old friend, Mr. Google. Mr. Google tells him that many other guys just like him have had similar problems. But none of the solutions Mr. G. suggests makes this guys code compile. So gripping for straws he more or less randomly eyes his stdafx.h. He feels like buying a lottery ticket when he removes the [auto-generated] line:
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
But after two hours of constant pain, he is becoming rather discouraged. And rather apprehensively he presses F7. And it all compiles perfectly fine. He shakes his head in disbelief: "How the :wtf: was I supposed to know that ???"........................ Life is too shor
-
So this guy I know.... ....decided to chuck out his old GDI drawing code in favor of GDI+. He expected a bit of a threshold but felt confident it would pay off. Off he goes and happily types: #include <gdiplus.h> Just to make sure, he unsuspectingly hits F7. KAZANGO! (a lovely sound effect (from the B.C. cartoons) I haven't used for decades) The compiler explodes with 77 bizare errors. Mostly syntax errors and such. So he [this guy] tries to move that include around (into and out of stdafx.h etc) to make the include work. Different bizare errors but same nightmare. Then begins messing around with the pch [precompiled header] settings. No progress. So he consults his trused old friend, Mr. Google. Mr. Google tells him that many other guys just like him have had similar problems. But none of the solutions Mr. G. suggests makes this guys code compile. So gripping for straws he more or less randomly eyes his stdafx.h. He feels like buying a lottery ticket when he removes the [auto-generated] line:
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
But after two hours of constant pain, he is becoming rather discouraged. And rather apprehensively he presses F7. And it all compiles perfectly fine. He shakes his head in disbelief: "How the :wtf: was I supposed to know that ???"........................ Life is too shor
megaadam wrote:
WIN32_LEAN_AND_MEAN
Sorry, did I miss something. WIN32 is LEAN_AND_MEAN? ;)
Simon
-
So this guy I know.... ....decided to chuck out his old GDI drawing code in favor of GDI+. He expected a bit of a threshold but felt confident it would pay off. Off he goes and happily types: #include <gdiplus.h> Just to make sure, he unsuspectingly hits F7. KAZANGO! (a lovely sound effect (from the B.C. cartoons) I haven't used for decades) The compiler explodes with 77 bizare errors. Mostly syntax errors and such. So he [this guy] tries to move that include around (into and out of stdafx.h etc) to make the include work. Different bizare errors but same nightmare. Then begins messing around with the pch [precompiled header] settings. No progress. So he consults his trused old friend, Mr. Google. Mr. Google tells him that many other guys just like him have had similar problems. But none of the solutions Mr. G. suggests makes this guys code compile. So gripping for straws he more or less randomly eyes his stdafx.h. He feels like buying a lottery ticket when he removes the [auto-generated] line:
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
But after two hours of constant pain, he is becoming rather discouraged. And rather apprehensively he presses F7. And it all compiles perfectly fine. He shakes his head in disbelief: "How the :wtf: was I supposed to know that ???"........................ Life is too shor
Nothing LEAN_AND_MEAN about Win32... MFC can be such a pain in the arse.
-
Good old MFC. :) Next, try adding a message handler for a really uncommon WM_xxx thats NOT in the Class Wizard!
Morality is indistinguishable from social proscription
Ah message cracking, you just roll your own.
-
Good old MFC. :) Next, try adding a message handler for a really uncommon WM_xxx thats NOT in the Class Wizard!
Morality is indistinguishable from social proscription
-
I feel your pain. The
WIN32_LEAN_AND_MEAN
&GDI+
thingie hurt me some years ago. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
So this guy I know.... ....decided to chuck out his old GDI drawing code in favor of GDI+. He expected a bit of a threshold but felt confident it would pay off. Off he goes and happily types: #include <gdiplus.h> Just to make sure, he unsuspectingly hits F7. KAZANGO! (a lovely sound effect (from the B.C. cartoons) I haven't used for decades) The compiler explodes with 77 bizare errors. Mostly syntax errors and such. So he [this guy] tries to move that include around (into and out of stdafx.h etc) to make the include work. Different bizare errors but same nightmare. Then begins messing around with the pch [precompiled header] settings. No progress. So he consults his trused old friend, Mr. Google. Mr. Google tells him that many other guys just like him have had similar problems. But none of the solutions Mr. G. suggests makes this guys code compile. So gripping for straws he more or less randomly eyes his stdafx.h. He feels like buying a lottery ticket when he removes the [auto-generated] line:
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
But after two hours of constant pain, he is becoming rather discouraged. And rather apprehensively he presses F7. And it all compiles perfectly fine. He shakes his head in disbelief: "How the :wtf: was I supposed to know that ???"........................ Life is too shor
Any chance that this guy is You.
-
Any chance that this guy is You.
-
What a clever little question! [EDIT] (And no I did not univote you!)
........................ Life is too shor
Me too. Someone is univoting everyone that I reply too to make them think that I'm the one who is univoting them :sigh:
-
Me too. Someone is univoting everyone that I reply too to make them think that I'm the one who is univoting them :sigh:
Cpianism wrote:
Someone is univoting everyone that I reply too to make them think that I'm the one who is univoting them
You should seek help. You're showing classic symtoms of projection -> http://en.wikipedia.org/wiki/Projection_%28psychology%29[^]
-
Me too. Someone is univoting everyone that I reply too to make them think that I'm the one who is univoting them :sigh:
You are not 'univoted'; that is when a troll just clicks 'vote 1' without reading [probably] You deserve every 1 you get.
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
-
Me too. Someone is univoting everyone that I reply too to make them think that I'm the one who is univoting them :sigh:
Cpianism wrote:
Me too. Someone is univoting everyone that I reply too to make them think that I'm the one who is univoting them Sigh
Just a thought: What makes you think that anyone in this known world will give you that much importance?
“Follow your bliss.” – Joseph Campbell
-
You are not 'univoted'; that is when a troll just clicks 'vote 1' without reading [probably] You deserve every 1 you get.
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
Nagy Vilmos wrote:
You deserve every 1 you get.
I fail to see why his original reply deserves a 1. Sure he stated the obvious but that doesn't really deserves to be down voted now does it. And yes he has made mistakes (I use the word loosely ) in the past but voting him 1 for that reason only would also be univoting (in my opinion).
-
Nagy Vilmos wrote:
You deserve every 1 you get.
I fail to see why his original reply deserves a 1. Sure he stated the obvious but that doesn't really deserves to be down voted now does it. And yes he has made mistakes (I use the word loosely ) in the past but voting him 1 for that reason only would also be univoting (in my opinion).
cplop deserves the e-wedgies for his constant and banal whinging about being down voted when he complains about all the down votes he gets. FFS, if he went to Oz, they'd think he was a Brit!
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
-
So this guy I know.... ....decided to chuck out his old GDI drawing code in favor of GDI+. He expected a bit of a threshold but felt confident it would pay off. Off he goes and happily types: #include <gdiplus.h> Just to make sure, he unsuspectingly hits F7. KAZANGO! (a lovely sound effect (from the B.C. cartoons) I haven't used for decades) The compiler explodes with 77 bizare errors. Mostly syntax errors and such. So he [this guy] tries to move that include around (into and out of stdafx.h etc) to make the include work. Different bizare errors but same nightmare. Then begins messing around with the pch [precompiled header] settings. No progress. So he consults his trused old friend, Mr. Google. Mr. Google tells him that many other guys just like him have had similar problems. But none of the solutions Mr. G. suggests makes this guys code compile. So gripping for straws he more or less randomly eyes his stdafx.h. He feels like buying a lottery ticket when he removes the [auto-generated] line:
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
But after two hours of constant pain, he is becoming rather discouraged. And rather apprehensively he presses F7. And it all compiles perfectly fine. He shakes his head in disbelief: "How the :wtf: was I supposed to know that ???"........................ Life is too shor
Because pretty much anyone worth their salt knows that you put WIN32_LEAN_AND_MEAN at the top of your header before the windows.h include? That's just standard Microsoft Win32 programming, and has been for about 10+ years. I don't know if it's a requirement for other compiler tool chains.
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
Nothing LEAN_AND_MEAN about Win32... MFC can be such a pain in the arse.
This has nothing to do with MFC. It's related to Win32 programming. You'd still use it even if you're project isn't using MFC.
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
Because pretty much anyone worth their salt knows that you put WIN32_LEAN_AND_MEAN at the top of your header before the windows.h include? That's just standard Microsoft Win32 programming, and has been for about 10+ years. I don't know if it's a requirement for other compiler tool chains.
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
This has nothing to do with MFC. It's related to Win32 programming. You'd still use it even if you're project isn't using MFC.
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
My bad. :-O Truth is that I've done a fair bit of C++ but it's all been using MFC, and I don't really know much about using C++ outside of the MFC arena. I'm a more of a C# .net boy really. You know what they say about ASSumptions...