Click here to Skip to main content
15,902,299 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralWord wrap in Rich Edit and multiline edit Pin
insanely42019-Sep-03 9:07
insanely42019-Sep-03 9:07 
GeneralRe: Word wrap in Rich Edit and multiline edit Pin
David Pritchard1-Jun-04 14:21
David Pritchard1-Jun-04 14:21 
GeneralFinding the sum of all intergers between x & y Pin
pam128819-Sep-03 9:03
pam128819-Sep-03 9:03 
GeneralRe: Finding the sum of all intergers between x & y Pin
Tim Deveaux19-Sep-03 9:31
Tim Deveaux19-Sep-03 9:31 
GeneralRe: Finding the sum of all intergers between x & y Pin
Tim Smith19-Sep-03 9:34
Tim Smith19-Sep-03 9:34 
GeneralRe: Finding the sum of all intergers between x & y Pin
Tim Smith19-Sep-03 9:34
Tim Smith19-Sep-03 9:34 
GeneralRe: Finding the sum of all intergers between x & y Pin
Harco19-Sep-03 9:40
Harco19-Sep-03 9:40 
Generalinhereted static member referencing Pin
Harco19-Sep-03 8:58
Harco19-Sep-03 8:58 
I have the following class:
class BaseClass {<br />
  static char* wp;<br />
<br />
  void Dynamic(char* s) {<br />
    this->wp = s;<br />
  }<br />
}

and a derivative:
class Derived : public BaseClass {<br />
//  static char* wp; // have been trying this, not sure if needed<br />
}

Basically, what I want to accomplish is this: I want to reference the static member wp of the derived class in the inhereted function and reference the BaseClass member in the Baseclass function
so..
BaseClass *bc = new BaseClass();<br />
Derived *d = new Derived();<br />
<br />
bc->Dynamic("something");<br />
d->Dynamic("something else");

After this code, I want bc::wp != d::wp, but alas, bc::wp == d::wp == "something else". I would LIKE to have bc::wp == "something" and d::wp == "something else".

Anybody have any clues as to how I might realise this? And yes I do realise I could make them non-static, but I am interested in a way of doing this... if at all possible.
GeneralRe: inhereted static member referencing Pin
antlers19-Sep-03 12:07
antlers19-Sep-03 12:07 
GeneralExport CWnd* from DLL Pin
Mathias S.19-Sep-03 8:26
Mathias S.19-Sep-03 8:26 
GeneralMessages to derived CWnd object on CFormView Pin
Anonymous19-Sep-03 8:23
Anonymous19-Sep-03 8:23 
GeneralOnPaint() as opposed to OnDraw() Pin
ComboController19-Sep-03 8:14
ComboController19-Sep-03 8:14 
GeneralRe: OnPaint() as opposed to OnDraw() Pin
David Crow19-Sep-03 8:30
David Crow19-Sep-03 8:30 
GeneralDropDown Combo box background color issue Pin
sanjay zore19-Sep-03 6:49
sanjay zore19-Sep-03 6:49 
GeneralCString to LPCTSTR Pin
johnnyXP19-Sep-03 6:42
johnnyXP19-Sep-03 6:42 
GeneralRe: CString to LPCTSTR Pin
Dominik Reichl19-Sep-03 6:52
Dominik Reichl19-Sep-03 6:52 
GeneralRe: CString to LPCTSTR Pin
Alvaro Mendez19-Sep-03 12:01
Alvaro Mendez19-Sep-03 12:01 
GeneralRe: CString to LPCTSTR Pin
User 665819-Sep-03 6:52
User 665819-Sep-03 6:52 
GeneralRe: CString to LPCTSTR Pin
Binayak19-Sep-03 9:59
Binayak19-Sep-03 9:59 
GeneralRe: CString to LPCTSTR Pin
Michael Dunn19-Sep-03 11:15
sitebuilderMichael Dunn19-Sep-03 11:15 
GeneralRe: CString to LPCTSTR Pin
Binayak19-Sep-03 11:53
Binayak19-Sep-03 11:53 
GeneralRe: CString to LPCTSTR Pin
Tim Smith19-Sep-03 12:16
Tim Smith19-Sep-03 12:16 
GeneralRe: CString to LPCTSTR Pin
Alvaro Mendez19-Sep-03 11:59
Alvaro Mendez19-Sep-03 11:59 
GeneralRe: CString to LPCTSTR Pin
Gary R. Wheeler20-Sep-03 3:33
Gary R. Wheeler20-Sep-03 3:33 
GeneralReading/Writing XP registry files Pin
skaanji19-Sep-03 6:34
skaanji19-Sep-03 6:34 

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.