Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. A Programming Dilemma

A Programming Dilemma

Scheduled Pinned Locked Moved The Lounge
graphicscsswinformsquestion
37 Posts 17 Posters 8 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lost User

    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

    N Offline
    N Offline
    NormDroid
    wrote on last edited by
    #7

    Ah message cracking, you just roll your own.

    All right, you guys, I got eight crates of Ipecac from Mort. All on my tab. Now, whoever goes the longest without puking gets the last piece of pie in the fridge.

    1 Reply Last reply
    0
    • M megaadam

      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

      T Offline
      T Offline
      TheIdleProgrammer
      wrote on last edited by
      #8

      Nothing LEAN_AND_MEAN about Win32... MFC can be such a pain in the arse.

      J 1 Reply Last reply
      0
      • L Lost User

        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

        M Offline
        M Offline
        megaadam
        wrote on last edited by
        #9

        Actually not MFC at all. "This guy's" project is pure Win32.

        ........................ Life is too shor

        L 1 Reply Last reply
        0
        • CPalliniC CPallini

          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]

          M Offline
          M Offline
          megaadam
          wrote on last edited by
          #10

          My friend thanks you very much. He feels much better now.

          ........................ Life is too shor

          1 Reply Last reply
          0
          • M megaadam

            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

            J Offline
            J Offline
            JustWorking
            wrote on last edited by
            #11

            Any chance that this guy is You.

            M 1 Reply Last reply
            0
            • J JustWorking

              Any chance that this guy is You.

              M Offline
              M Offline
              megaadam
              wrote on last edited by
              #12

              What a clever little question! [EDIT] (And no I did not univote you!)

              ........................ Life is too shor

              J 1 Reply Last reply
              0
              • M megaadam

                What a clever little question! [EDIT] (And no I did not univote you!)

                ........................ Life is too shor

                J Offline
                J Offline
                JustWorking
                wrote on last edited by
                #13

                Me too. Someone is univoting everyone that I reply too to make them think that I'm the one who is univoting them :sigh:

                N M R J 4 Replies Last reply
                0
                • J JustWorking

                  Me too. Someone is univoting everyone that I reply too to make them think that I'm the one who is univoting them :sigh:

                  N Offline
                  N Offline
                  Nagy Vilmos
                  wrote on last edited by
                  #14

                  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

                  T 1 Reply Last reply
                  0
                  • J JustWorking

                    Me too. Someone is univoting everyone that I reply too to make them think that I'm the one who is univoting them :sigh:

                    M Offline
                    M Offline
                    Michael Schubert
                    wrote on last edited by
                    #15

                    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[^]

                    1 Reply Last reply
                    0
                    • J JustWorking

                      Me too. Someone is univoting everyone that I reply too to make them think that I'm the one who is univoting them :sigh:

                      R Offline
                      R Offline
                      Rajesh R Subramanian
                      wrote on last edited by
                      #16

                      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

                      B 1 Reply Last reply
                      0
                      • N Nagy Vilmos

                        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

                        T Offline
                        T Offline
                        Tom Deketelaere
                        wrote on last edited by
                        #17

                        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).

                        N 1 Reply Last reply
                        0
                        • T Tom Deketelaere

                          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).

                          N Offline
                          N Offline
                          Nagy Vilmos
                          wrote on last edited by
                          #18

                          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

                          M T 2 Replies Last reply
                          0
                          • M megaadam

                            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

                            J Offline
                            J Offline
                            Jim Crafton
                            wrote on last edited by
                            #19

                            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

                            M 1 Reply Last reply
                            0
                            • T TheIdleProgrammer

                              Nothing LEAN_AND_MEAN about Win32... MFC can be such a pain in the arse.

                              J Offline
                              J Offline
                              Jim Crafton
                              wrote on last edited by
                              #20

                              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

                              T 1 Reply Last reply
                              0
                              • J Jim Crafton

                                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

                                T Offline
                                T Offline
                                TheIdleProgrammer
                                wrote on last edited by
                                #21

                                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...

                                1 Reply Last reply
                                0
                                • J Jim Crafton

                                  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

                                  M Offline
                                  M Offline
                                  megaadam
                                  wrote on last edited by
                                  #22

                                  Dude, that is exactly where the WIN32_LEAN_AND_MEAN was. But I had to remove it for GDI+.

                                  ........................ Life is too shor

                                  J D 2 Replies Last reply
                                  0
                                  • N Nagy Vilmos

                                    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

                                    M Offline
                                    M Offline
                                    Michael Schubert
                                    wrote on last edited by
                                    #23

                                    Nagy Vilmos wrote:

                                    e-wedgies

                                    :laugh: :laugh: :laugh: :laugh: :laugh:

                                    1 Reply Last reply
                                    0
                                    • M megaadam

                                      Dude, that is exactly where the WIN32_LEAN_AND_MEAN was. But I had to remove it for GDI+.

                                      ........................ Life is too shor

                                      J Offline
                                      J Offline
                                      Jim Crafton
                                      wrote on last edited by
                                      #24

                                      Ahh, sorry, I missed that :) Yeah that's pretty wacked. Was that actually the final solution, or was it just kind of blind luck that it worked for you?

                                      ¡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

                                      M 1 Reply Last reply
                                      0
                                      • N Nagy Vilmos

                                        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

                                        T Offline
                                        T Offline
                                        Tom Deketelaere
                                        wrote on last edited by
                                        #25

                                        Nagy Vilmos wrote:

                                        FFS, if he went to Oz, they'd think he was a Brit!

                                        :laugh:

                                        Nagy Vilmos wrote:

                                        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.

                                        Well to each his own. I barely vote but when I do I do it on the content of the post I'm voting on not on the poster.

                                        N 1 Reply Last reply
                                        0
                                        • J Jim Crafton

                                          Ahh, sorry, I missed that :) Yeah that's pretty wacked. Was that actually the final solution, or was it just kind of blind luck that it worked for you?

                                          ¡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

                                          M Offline
                                          M Offline
                                          megaadam
                                          wrote on last edited by
                                          #26

                                          Jim Crafton wrote:

                                          Was that actually the final solution, or was it just kind of blind luck that it worked for you?

                                          Well both of the above actually :)

                                          ........................ Life is too shor

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups