Click here to Skip to main content
16,010,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: FindWindow is hanging.... help? Pin
Neville Franks11-Jun-04 15:17
Neville Franks11-Jun-04 15:17 
GeneralMicrosoft !!! Q's Pin
suiram4011-Jun-04 6:49
suiram4011-Jun-04 6:49 
GeneralRe: Microsoft !!! Q's Pin
Maximilien11-Jun-04 6:55
Maximilien11-Jun-04 6:55 
GeneralRe: Microsoft !!! Q's Pin
David Crow11-Jun-04 7:28
David Crow11-Jun-04 7:28 
GeneralRe: Microsoft !!! Q's Pin
Maximilien11-Jun-04 7:29
Maximilien11-Jun-04 7:29 
GeneralRe: Microsoft !!! Q's Pin
suiram4011-Jun-04 7:39
suiram4011-Jun-04 7:39 
GeneralRe: Microsoft !!! Q's Pin
David Crow11-Jun-04 8:06
David Crow11-Jun-04 8:06 
GeneralRe: Microsoft !!! Q's Pin
Henry miller11-Jun-04 8:03
Henry miller11-Jun-04 8:03 
For point two:

Imagine a simple circle class. You have setters and getters for Area, Radius, and Diameter. Simple grade school math gives the relation between them. Now which are you going to store in your class? If you use setters and getters it doesn't matter because you can change it at anytime without anyone else being affected. (and a good compiler will inline them so there isn't overhead)

Think it doesn't matter? Say you pick area. Well I'm going to use your class, but after a profiler I've discovered that getting the diameter is taking a large part of the CPU time, and the system is too slow. A simple change to the class to store diameter will speed things dramaticly. Of course if you anticipated area being most needed, then area would be right. (even though square roots are slower than powers in general)

Of course the example I gave is contrived. You should get the idea though. In the real world it often turns out that you don't know in advance what you will need to change latter so you use getters and setters everywhere just in case. 95% or more of the time you will never change it, but overall you have saved yourself a lot of work with the getters and setters.

GeneralRe: Microsoft !!! Q's Pin
jj3pa11-Jun-04 14:21
jj3pa11-Jun-04 14:21 
GeneralRe: Microsoft !!! Q's Pin
toxcct13-Jun-04 3:28
toxcct13-Jun-04 3:28 
Generalreading and writing to a file outside of my programming Pin
kyleiscool200411-Jun-04 6:40
kyleiscool200411-Jun-04 6:40 
GeneralRe: reading and writing to a file outside of my programming Pin
jmkhael11-Jun-04 6:47
jmkhael11-Jun-04 6:47 
GeneralRe: reading and writing to a file outside of my programming Pin
Navin11-Jun-04 8:02
Navin11-Jun-04 8:02 
Generalsending messages within an application. Pin
Anonymous11-Jun-04 5:39
Anonymous11-Jun-04 5:39 
GeneralRe: sending messages within an application. Pin
David Crow11-Jun-04 6:31
David Crow11-Jun-04 6:31 
GeneralRe: sending messages within an application. Pin
Anonymous11-Jun-04 7:20
Anonymous11-Jun-04 7:20 
GeneralRe: sending messages within an application. Pin
Anonymous11-Jun-04 7:30
Anonymous11-Jun-04 7:30 
GeneralRe: sending messages within an application. Pin
Anonymous11-Jun-04 7:48
Anonymous11-Jun-04 7:48 
GeneralRe: sending messages within an application. Pin
David Crow11-Jun-04 8:00
David Crow11-Jun-04 8:00 
GeneralRe: sending messages within an application. Pin
Anonymous11-Jun-04 8:32
Anonymous11-Jun-04 8:32 
GeneralRe: sending messages within an application. Pin
David Crow11-Jun-04 8:40
David Crow11-Jun-04 8:40 
GeneralRe: sending messages within an application. Pin
Anonymous11-Jun-04 8:57
Anonymous11-Jun-04 8:57 
GeneralRe: sending messages within an application. Pin
David Crow11-Jun-04 9:36
David Crow11-Jun-04 9:36 
GeneralRe: sending messages within an application. Pin
Anonymous14-Jun-04 3:51
Anonymous14-Jun-04 3:51 
GeneralPassing cdc across threads Pin
Member 51425211-Jun-04 5:35
Member 51425211-Jun-04 5:35 

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.