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

C / C++ / MFC

 
AnswerRe: Set window position Pin
Richard Andrew x644-Feb-12 10:57
professionalRichard Andrew x644-Feb-12 10:57 
GeneralRe: Set window position Pin
_Flaviu4-Feb-12 21:33
_Flaviu4-Feb-12 21:33 
AnswerRe: Set window position Pin
Chuck O'Toole5-Feb-12 4:57
Chuck O'Toole5-Feb-12 4:57 
GeneralRe: Set window position Pin
_Flaviu5-Feb-12 20:30
_Flaviu5-Feb-12 20:30 
QuestionGetter and setter style class implementation in VC++ Pin
Member 78851053-Feb-12 19:23
Member 78851053-Feb-12 19:23 
AnswerRe: Getter and setter style class implementation in VC++ Pin
Albert Holguin3-Feb-12 21:17
professionalAlbert Holguin3-Feb-12 21:17 
GeneralRe: Getter and setter style class implementation in VC++ Pin
Member 78851053-Feb-12 22:19
Member 78851053-Feb-12 22:19 
AnswerRe: Getter and setter style class implementation in VC++ Pin
Albert Holguin4-Feb-12 8:08
professionalAlbert Holguin4-Feb-12 8:08 
Just to give you some follow-up advice, by declaring your static outside of your class, you've just made him a global variable. Now anyone can access him and he's polluting your global namespace.

If you want to keep him both private and keep him contained within SaveClass. Declare it inside of SaveClass and instantiate him in the cpp file.
//in the header
class SaveClass
{
public:
 SaveClass(void);
 ~SaveClass(void);
 int Get() const;
 int Set(int var);

private:
 static int m_testVariable;
};
//in your cpp, instantiate your static member
// outside of SaveClass method
int SaveClass::m_testVariable = 1;

QuestionMessage for CASynsocket::OnConnect Pin
ForNow3-Feb-12 10:55
ForNow3-Feb-12 10:55 
AnswerRe: Message for CASynsocket::OnConnect Pin
Albert Holguin3-Feb-12 11:20
professionalAlbert Holguin3-Feb-12 11:20 
QuestionUpdating the color of child Window Pin
cpp_prgmer3-Feb-12 9:39
cpp_prgmer3-Feb-12 9:39 
AnswerRe: Updating the color of child Window Pin
Albert Holguin3-Feb-12 10:41
professionalAlbert Holguin3-Feb-12 10:41 
AnswerRe: Updating the color of child Window Pin
«_Superman_»3-Feb-12 15:32
professional«_Superman_»3-Feb-12 15:32 
QuestionHow to use DeviceIoControl to access an external USB device from MFC Pin
StefanKittel3-Feb-12 5:37
StefanKittel3-Feb-12 5:37 
AnswerRe: How to use DeviceIoControl to access an external USB device from MFC Pin
Erudite_Eric3-Feb-12 6:29
Erudite_Eric3-Feb-12 6:29 
GeneralRe: How to use DeviceIoControl to access an external USB device from MFC Pin
StefanKittel3-Feb-12 6:46
StefanKittel3-Feb-12 6:46 
GeneralRe: How to use DeviceIoControl to access an external USB device from MFC Pin
Erudite_Eric4-Feb-12 4:32
Erudite_Eric4-Feb-12 4:32 
GeneralRe: How to use DeviceIoControl to access an external USB device from MFC Pin
StefanKittel4-Feb-12 4:49
StefanKittel4-Feb-12 4:49 
GeneralRe: How to use DeviceIoControl to access an external USB device from MFC Pin
Erudite_Eric4-Feb-12 22:42
Erudite_Eric4-Feb-12 22:42 
GeneralRe: How to use DeviceIoControl to access an external USB device from MFC Pin
StefanKittel5-Feb-12 10:20
StefanKittel5-Feb-12 10:20 
SuggestionRe: How to use DeviceIoControl to access an external USB device from MFC Pin
David Crow5-Feb-12 17:02
David Crow5-Feb-12 17:02 
Question"InvalidateRect" leaves dirty on screen Pin
transoft3-Feb-12 3:59
transoft3-Feb-12 3:59 
AnswerRe: "InvalidateRect" leaves dirty on screen Pin
Richard MacCutchan3-Feb-12 4:02
mveRichard MacCutchan3-Feb-12 4:02 
GeneralRe: "InvalidateRect" leaves dirty on screen Pin
transoft3-Feb-12 4:11
transoft3-Feb-12 4:11 
GeneralRe: "InvalidateRect" leaves dirty on screen Pin
Richard MacCutchan3-Feb-12 4:39
mveRichard MacCutchan3-Feb-12 4:39 

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.