Click here to Skip to main content
15,885,895 members
Articles / Programming Languages / C++

Handling Mouse Events and Simulating Push Buttons and List Boxes in a Win32 Console

Rate me:
Please Sign up or sign in to vote.
4.21/5 (13 votes)
4 Jun 2010CPOL4 min read 51.5K   1.3K   28  
Handling mouse events and simulating push buttons and list boxes in a Win32 Console
  • cmichaeljanssonjokeconsole.zip
    • cMichaelJanssonJokeConsole
      • cMichaelJanssonJokeConsole.cpp
      • cMichaelJanssonJokeConsole.h
      • cMichaelJanssonJokeConsole_main.cpp
      • cMichaelJanssonJokeConsole_main.dsp
      • cMichaelJanssonJokeConsole_main.dsw
      • cMichaelJanssonJokeConsole_main.opt
      • cMichaelJanssonJokeConsole_main.plg
      • cMichaelJanssonTextMode.h
      • Debug
        • cMichaelJanssonJokeConsole_main.exe
        • jokes
          • ANNOY.TXT
          • BADDAY.TXT
          • BEER.TXT
          • BETATEST.TXT
          • BLNDDATE.TXT
          • BLUNDERS.TXT
          • BUBBA.TXT
          • CHINEESE.TXT
          • CONFUCUS.TXT
          • DATE.TXT
          • ELEVATOR.TXT
          • EMAILJNK.TXT
          • FEMALE.TXT
          • FEMCOMP.TXT
          • GOLF.TXT
          • HARDWARE.TXT
          • INSULTS.TXT
          • IS386.TXT
          • KEEPMIND.TXT
          • KLINGON.TXT
          • LIFEFACT.TXT
          • MATHJOKE.TXT
          • MEDICAL.TXT
          • MIXEDNUT.TXT
          • MTRCYCLE.TXT
          • NERD.TXT
          • OXYMORON.TXT
          • PARTFUN.TXT
          • PONDER.TXT
          • PROGQUOT.TXT
          • RULES.TXT
          • SAYNO.TXT
          • SICK.TXT
          • SIGNS.TXT
          • STRESS.TXT
          • UPGRADE.TXT
          • VirJokes.txt
          • WEBTERM.TXT
          • YOMAMA.TXT
          • YOMAMA2.TXT
          • ZADDICT.TXT
      • jokes
        • ANNOY.TXT
        • BADDAY.TXT
        • BEER.TXT
        • BETATEST.TXT
        • BLNDDATE.TXT
        • BLUNDERS.TXT
        • BUBBA.TXT
        • CHINEESE.TXT
        • CONFUCUS.TXT
        • DATE.TXT
        • ELEVATOR.TXT
        • EMAILJNK.TXT
        • FEMALE.TXT
        • FEMCOMP.TXT
        • GOLF.TXT
        • HARDWARE.TXT
        • INSULTS.TXT
        • IS386.TXT
        • KEEPMIND.TXT
        • KLINGON.TXT
        • LIFEFACT.TXT
        • MATHJOKE.TXT
        • MEDICAL.TXT
        • MIXEDNUT.TXT
        • MTRCYCLE.TXT
        • NERD.TXT
        • OXYMORON.TXT
        • PARTFUN.TXT
        • PONDER.TXT
        • PROGQUOT.TXT
        • RULES.TXT
        • SAYNO.TXT
        • SICK.TXT
        • SIGNS.TXT
        • STRESS.TXT
        • UPGRADE.TXT
        • VirJokes.txt
        • WEBTERM.TXT
        • YOMAMA.TXT
        • YOMAMA2.TXT
        • ZADDICT.TXT
"Math Jokes"
"Salary Theorem -- The less you know, the more you make. Proof: Postulate 1: Knowledge is Power.  Postulate 2: Time is Money. As every engineer knows: Power = Work / Time  And since Knowledge = Power and Time = Money  It is therefore true that Knowledge = Work / Money .  Solving for Money, we get:  Money = Work / Knowledge Thus, as Knowledge approaches zero, Money approaches infinity, regardless of the amount of Work done.  "
"Life is complex. It has real and imaginary components.  "
"Mathematics is made of 50 percent formulas, 50 percent proofs, and 50 percent imagination. "
"A mathematician is a device for turning coffee into theorems (P. Erdos)"
"Addendum: American coffee is good for lemmas. "
"An engineer thinks that his equations are an approximation to reality. A physicist thinks reality is an approximation to his equations. A mathematician doesn't care. "
"Old mathematicians never die; they just lose some of their functions. "
"Mathematicians are like Frenchmen: whatever you say to them, they translate it into their own language, and forthwith it means something entirely different. -- Goethe "
"What is a rigorous definition of rigor? "
"There is no logical foundation of mathematics, and G�del has proved it! "
"I do not think -- therefore I am not. Here is the illustration of this principle: One evening Rene Descartes went to relax at a local tavern. The tender approached and said, Ah, good evening Monsieur Descartes! Shall I serve you the usual drink?. Descartes replied, I think not., and promptly vanished. "
"A topologist is a person who doesn't know the difference between a coffee cup and a doughnut. "
"Classification of mathematical problems as linear and nonlinear is like classification of the Universe as bananas and non-bananas. "
"A law of conservation of difficulties: there is no easy way to prove a deep result. "
"A tragedy of mathematics is a beautiful conjecture ruined by an ugly fact."
"Algebraic symbols are used when you do not know what you are talking about. "
"Philosophy is a game with objectives and no rules. Mathematics is a game with rules and no objectives. "
"The actual quote from the Webster dictionary: trillion n syn SCAD, gob(s), heap, jillion, load(s), million, oodles, quantities, thousand, wad(s) "
"Mathematics is like checkers in being suitable for the young, not too difficult, amusing, and without peril to the state. (Plato) "
"A bit of theology.  Math is the language God used to write the universe. "
"Asked if he believes in one God, a mathematician answered:  Yes, up to isomorphism." 
"Medicine makes people ill, mathematics make them sad and theology makes them sinful. (Martin Luther) "
"The good Christian should beware of mathematicians and all those who make empty prophecies. The danger already exists that mathematicians have made a covenant with the devil to darken the spirit and confine man in the bonds of Hell. (St. Augustine) "
"He who can properly define and divide is to be considered a god. (Plato) "
"God geometrizes says Plato. and here is the analytical continuation of this saying: Biologists think they are biochemists, Biochemists think they are Physical Chemists, Physical Chemists think they are Physicists, Physicists think they are Gods, And God thinks he is a Mathematician."
"Physicists defer only to mathematicians, mathematicians defer only to God."
"An engineer, a physicist and a mathematician are staying in a hotel. The engineer wakes up and smells smoke. He goes out into the hallway and sees a fire, so he fills a trash can from his room with water and douses the fire. He goes back to bed. Later, the physicist wakes up and smells smoke. He opens his door and sees a fire in the hallway. He walks down the hall to a fire hose and after calculating the flame velocity, distance, water pressure, trajectory, etc. extinguishes the fire with the minimum amount of water and energy needed. Later, the mathematician wakes up and smells smoke. He goes to the hall, sees the fire and then the fire hose. He thinks for a moment and then exclaims, Ah, a solution exists! and then goes back to bed."
"A physicist and a mathematician are sitting in a faculty lounge. Suddenly, the coffee machine catches on fire. The physicist grabs a bucket and leap towards the sink, filled the bucket with water and puts out the fire. Second day, the same two sit in the same lounge. Again, the coffee machine catches on fire. This time, the mathematician stands up, got a bucket, hands the bucket to the physicist, thus reducing the problem to a previously solved one."
"A mathematician and an engineer are on desert island. They find two palm trees with one coconut each. The engineer shins up one tree, gets the coconut, eats. The mathematician shins up the other tree, gets the coconut, climbs the other tree and puts it there. Now we've reduced it to a problem we know how to solve."
"A biologist, a physicist and a mathematician were sitting in a street cafe watching the crowd. Across the street they saw a man and a woman entering a building. Ten minutes they reappeared together with a third person. - They have multiplied, said the biologist. - Oh no, an error in measurement, the physicist sighed. - If exactly one person enters the building now, it will be empty again, the mathematician concluded."
"An chemist, a physicist, and a mathematician are stranded on an island when a can of food rools ashore. The chemist and the physicist comes up with many ingenious ways to open the can. Then suddenly the mathematician gets a bright idea: Assume we have a can opener ..."
"A mathematician is asked to design a table. He first designs a table with no legs. Then he designs a table with infinitely many legs. He spend the rest of his life generalizing the results for the table with N legs (where N is not necessarily a natural number)."
"Several scientists were all posed the following question: What is pi ?,  The engineer said: It is approximately 3 and 1/7  The physicist said: It is 3.14159, The mathematician thought a bit, and replied It is equal to pi."
"A mathematician, a physicist, and an engineer were traveling through Scotland when they saw a black sheep through the window of the train.  Aha, says the engineer, I see that Scottish sheep are black. Hmm, says the physicist, You mean that some Scottish sheep are black.  No, says the mathematician, All we know is that there is at least one sheep in Scotland, and that at least one side of that one sheep is black!"
"A Mathematician (M) and an Engineer (E) attend a lecture by a Physicist. The topic concerns Kulza-Klein theories involving physical processes that occur in spaces with dimensions of 9, 12 and even higher. The M is sitting, clearly enjoying the lecture, while the E is frowning and looking generally confused and puzzled. By the end the E has a terrible headache. At the end, the M comments about the wonderful lecture. E: How do you understand this stuff?, M: I just visualize the process E: How can you POSSIBLY visualize something that occurs in 9-dimensional space?, M: Easy, first visualize it in N-dimensional space, then let N go to 9"
"The physicist and the engineer are in a hot-air balloon. Soon, they find themselves lost in a canyon somewhere. They yell out for help: Helllloooooo! Where are we? 15 minutes later, they hear an echoing voice: Helllloooooo! You're in a hot-air balloon!! The physicist says, That must have been a mathematician. The engineer asks, Why do you say that? The physicist replied: The answer was absolutely correct, and it was utterly useless."
"Dean, to the physics department. Why do I always have to give you guys so much money, for laboratories and expensive equipment and stuff. Why couldn't you be like the math. department - all they need is money for pencils, paper and waste-paper baskets. Or even better, like the philosophy department. All they need are pencils and paper."
"A mathematician, an engineer, and a chemist were walking down the road when they saw a pile of cans of beer. Unfortunately, they were the old-fashioned cans that do not have the tab at the top. One of them proposed that they split up and find can openers. The chemist went to his lab and concocted a magical chemical that dissolves the can top in an instant and evaporates the next instant so that the beer inside is not affected. The engineer went to his workshop and created a new HyperOpener that can open 25 cans per second. They went back to the pile with their inventions and found the mathematician finishing the last can of beer. How did you manage that? they asked in astonishment. The mathematician answered, Oh, well, I assumed they were open and went from there."
"Golden rule for math teachers: You must tell the truth, and nothing but the truth, but not the whole truth."
"The highest moments in the life of a mathematician are the first few moments after one has proved the result, but before one finds the mistake."
"Golden rule of deriving: never trust any result that was proved after 11 pm."
"Relations between pure and applied mathematicians are based on trust and understanding. Namely, pure mathematicians do not trust applied mathematicians, and applied mathematicians do not understand pure mathematicians."
"How dare of you to think that I am an analyst!"
"Some mathematicians become so tense these days that they that they do not go to sleep during seminars."
"Isaac Newton proclaimed: If I have seen further than others, it is because I was standing on the shoulders of giants. Isn't that true, than, that if I have not seen as far as others, it is because giants were standing on my shoulders?"
"Discovery: Mathematicians have announced the existence of a new whole number which lies between 27 and 28. We don't know why it's there or what it does, says Cambridge mathematician, Dr. Hilliard Haliard, we only know that it doesn't behave properly when put into equations, and that it is divisible by six, though only once."
"Theorem: There are two groups of people in the world; those who believe that the world can be divided into two groups of people, and those who don't."
"An insane mathematician gets on a bus and starts threatening everybody: I'll integrate you! I'll differentiate you!!! Everybody gets scared and runs away. Only one lady stays. The guy comes up to her and says: Aren't you scared, I'll integrate you, I'll differentiate you!!! The lady calmly answers: No, I am not scared, I am e^x ."
"The number you have dialed is imaginary. Please rotate your phone 90 degrees and try again."
"The shortest math joke: let epsilon be < 0"
"Q: how many times can you subtract 7 from 83, and what is left afterwards? A: I can subtract it as many times as I want, and it leaves 76 every time."
"Q: Did you hear the one about the statistician? A: Probably...."
"How many professors does it take to replace a lightbulb?? One: With eight research students, two programmers, three post-docs and a secretary to help him."
"How many university lecturers does it take to replace a lightbulb?? Four: One to do it and three to co-author the paper."
"How many graduate students does it take to replace a lightbulb?? Only one: But it takes nine years"
"The difference between an introvert and extrovert mathematicians is: An introvert mathematician looks at his shoes while talking to you. An extrovert mathematician looks at your shoes"
"A mathematician, a physicist, an engineer went again to the races and laid their money down. Commiserating in the bar after the race, the engineer says, I don't understand why I lost all my money. I measured all the horses and calculated their strength and mechanical advantage and figured out how fast they could run... The physicist interrupted him: ...but you didn't take individual variations into account. I did a statistical analysis of their previous performances and bet on the horses with the highest probability of winning... ...so if you're so hot why are you broke? asked the engineer. But before the argument can grow, the mathematician takes out his pipe and they get a glimpse of his well-fattened wallet. Obviously here was a man who knows something about horses. They both demanded to know his secret.  Well, he says, first I assumed all the horses were identical and spherical..." 
"A team of engineers were required to measure the height of a flag pole. They only had a measuring tape, and were getting quite frustrated trying to keep the tape along the pole. It kept falling down, etc. A mathematician comes along, finds out their problem, and proceeds to remove the pole from the ground and measure it easily. When he leaves, one engineer says to the other: Just like a mathematician! We need to know the height, and he gives us the length!"  
"One day a farmer called up an engineer, a physicist, and a mathematician and asked them to fence of the largest possible area with the least amount of fence. The engineer made the fence in a circle and proclaimed that he had the most efficient design.  The physicist made a long, straight line and proclaimed We can assume the length is infinite... and pointed out that fencing off half of the Earth was certainly a more efficient way to do it. The Mathematician just laughed at them. He built a tiny fence around himself and said I declare myself to be on the outside."  
"A mathematician and a physicist agree to a psychological experiment. The (hungry) mathematician is put in a chair in a large empty room and his favorite meal, perfectly prepared, is placed at the other end of the room. The psychologist explains, You are to remain in your chair. Every minute, I will move your chair to a position halfway between its current location and the meal. The mathematician looks at the psychologist in disgust. What? I'm not going to go through this. You know I'll never reach the food! And he gets up and storms out. The psychologist ushers the physicist in. He explains the situation, and the physicist's eyes light up and he starts drooling. The psychologist is a bit confused. Don't you realize that you'll never reach the food? T he physicist smiles and replies: Of course! But I'll get close enough for all practical purposes!"  
"Several scientists were asked to prove that all odd integers higher than 2 are prime.  Mathematician: 3 is a prime, 5 is a prime, 7 is a prime, and by induction - every odd integer higher than 2 is a prime.  Physicist: 3 is a prime, 5 is a prime, 7 is a prime, 9 is an experimental error, 11 is a prime. Just to be sure, try several randomly chosen numbers: 17 is a prime, 23 is a prime...  Engineer: 3 is a prime, 5 is a prime, 7 is a prime, 9 is an approximation to a prime, 11 is a prime,...  Programmer (reading the output on the screen): 3 is a prime, 3 is a prime, 3 a is prime, 3 is a prime....  Biologist: 3 is a prime, 5 is a prime, 7 is a prime, 9 -- results have not arrived yet,...  Psychologist: 3 is a prime, 5 is a prime, 7 is a prime, 9 is a prime but tries to suppress it,...  Chemist (or Dan Quayle): What's a prime?  Politician: Some numbers are prime.. but the goal is to create a kinder, gentler society where all numbers are prime...  Programmer: Wait a minute, I think I have an algorithm from Knuth on finding prime numbers... just a little bit longer, I've found the last bug... no, that's not it... ya know, I think there may be a compiler bug here - oh, did you want IEEE-998.0334 rounding or not? - was that in the spec? - hold on, I've almost got it - I was up all night working on this program, ya know... now if management would just get me that new workstation tha just came out, I'd be done by now... etc., etc. ..."  
"Top ten excuses for not doing homework: 1. I accidentally divided by zero and my paper burst into flames. 2. Isaac Newton's birthday. 3. I could only get arbitrarily close to my textbook. I couldn't actually reach it. 4. I have the proof, but there isn't room to write it in this margin. 5. I was watching the World Series and got tied up trying to prove that it converged. 6. I have a solar powered calculator and it was cloudy. 7. I locked the paper in my trunk but a four-dimensional dog got in and ate it. 8. I couldn't figure out whether i am the square of negative one or i is the square root of negative one. 9. I took time out to snack on a doughnut and a cup of coffee.   I spent the rest of the night trying to figure which one to dunk. 10. I could have sworn I put the homework inside a Klein bottle, but this morning I couldn't find it. "
"(Quotes from math students and lecturers): This is a one line proof...if we start sufficiently far to the left."  
"(Quotes from math students and lecturers):  The problems for the exam will be similar to the discussed in the class. Of course, the numbers will be different. But not all of them. Pi will still be 3.14159... "  
"Mathematicians stand on each other's shoulders. -- Gauss"
"Mathemeticians stand on each other's shoulders while computer scientists stand on each other's toes. -- Richard Hamming"
"These days, even the most pure and abstract mathematics is in danger to be applied."
"A constant function and e^x are walking on Broadway. Then suddenly the constant function sees a differential operator approaching and runs away. So e^x follows him and asks why the hurry. Well, you see, there's this differential operator coming this way, and when we meet, he'll differentiate me and nothing will be left of me...! Ah, says e^x, he won't bother ME, I'm e to the x! and he walks on. Of course he meets the differential operator after a short distance. e^x: Hi, I'm e^x  diff.op.: Hi, I'm d/dy"     
"Examples of inverse problems: Q: To what question is the answer 9W. A: Dr. Wiener, do you spell your name with a V? Q: To what question is the answer Dr. Livingstone, I presume.  A: What is your full name, Dr. Presume?  "
"A circle is a round straight line with a hole in the middle."
"In the topologic hell the beer is packed in Klein's bottles. "
"He thinks he's really smooth, but he's only C^1. "
"Q: Why do Computer Scientists get Halloween and Christmas mixed up? A: Because Oct. 31 = Dec. 25.  "
"Q: Why did the mathematician name his dog Cauchy? A: Because he left a residue at every pole.  "
"Q: What do you get when you cross an elephant and a banana? A: | elephant | * | banana | * sin(theta) "
"Q: What do you get if you cross a mosquito with a mountain climber.   A: You can't cross a vector with a scalar. "
"Q: What is a compact city? A: It's a city that can be guarded by finitely many near-sighted policemen. "
"A statistician can have his head in an oven and his feet in ice, and he will say that on the average he feels fine"
"How many mathematical logicians does it take to replace a lightbulb?? None: They can't do it, but they can prove that it can be done."
"How many classical geometers does it take to replace a lightbulb?? None: You can't do it with a straight edge and a compass."
"How many constructivist mathematicians does it take to replace a lightbulb?? None: They do not believe in infinitesimal rotations. "
"How many simulationists does it take to replace a lightbulb?? Infinity: Each one builds a fully validated model, but the light actually never goes on. "
"How many analysts does it take to screw in a lightbulb?? Three: One to prove existence, one to prove uniqueness and one to derive a nonconstructive algorithm to do it. "
"Math and Alcohol don't mix, so... PLEASE DON'T DRINK AND DERIVE "
"Q: What is the area of a circle? A: pi R^2?  R: Pie are not square. Pie are round. Cornbread are square.  "
"Q:What is a dilemma? A: A lemma that proves two results.  "
"Q: What's a polar bear? A: A rectangular bear after a coordinate transform.  "
"Q: How many light bulbs does it take to change a light bulb? A: One, if it knows its own Goedel number"
"Noah's Ark lands after The Flood and Noah releases all the animals, saying, Go forth and multiply. Several months pass and Noah decides to check up on the animals. All are doing fine except a pair of snakes. What's the problem? asks Noah. Cut down some trees and let us live there, say the snakes. Noah follows their advice. Several more weeks pass and Noah checks up on the snakes again. He sees lots of little snakes; everybody is happy. Noah says, So tell me how the trees helped. Certainly, reply the snakes. We're adders, and we need logs to multiply."  
"A geometer went to the beach to catch the rays and became a TanGent.  "

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Sweden Sweden
About me:
I attended programming college and I have a degree in three most famous and successful programming languages. C/C++, Visual Basic and Java. So i know i can code. And there is a diploma hanging on my wall to prove it.
.
I am a professional, I am paid tons of cash to teach or do software development. I am roughly 30 years old .

I hold lectures in programming. I have also coached students in C++, Java and Visual basic.

In my spare time i do enjoy developing computer games, and i am developing a rather simple flight simulator game
in the c++ programming language using the openGL graphics libray.

I've written hundreds of thousands of code syntax lines for small simple applications and games.

Comments and Discussions