Click here to Skip to main content
15,890,690 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multithreading in C++ Pin
Diddy4-Feb-04 2:11
Diddy4-Feb-04 2:11 
GeneralRe: Multithreading in C++ Pin
TV4-Feb-04 3:58
TV4-Feb-04 3:58 
GeneralRe: Multithreading in C++ Pin
Diddy4-Feb-04 4:30
Diddy4-Feb-04 4:30 
QuestionHow do i get handle to window in IE Pin
User 2155973-Feb-04 23:41
User 2155973-Feb-04 23:41 
AnswerRe: How do i get handle to window in IE Pin
Amr Abdel-Mohsen4-Feb-04 9:20
Amr Abdel-Mohsen4-Feb-04 9:20 
Generalprinting a html file Pin
Member 5281553-Feb-04 22:53
Member 5281553-Feb-04 22:53 
GeneralRe: printing a html file Pin
Anonymous4-Feb-04 11:22
Anonymous4-Feb-04 11:22 
Generalsingleton problem Pin
yccheok3-Feb-04 22:19
yccheok3-Feb-04 22:19 
i came across the article at
http://www.codeproject.com/gen/design/singleton.asp#xx372166xx

i try to compile code:

class CMsgHndlr
{
public :
static CMsgHndlr * GetMsgHndlr();
protected :
CMsgHndlr(){}
virtual ~CMsgHndlr(){}
static CMsgHndlr m_MsgHndlr; // Static instance of Message handler // class.
};

CMsgHndlr CMsgHndlr::m_MsgHndlr;
CMsgHndlr * CMsgHndlr::GetMsgHndlr()
{
return & m_MsgHndlr;
}

however, there is a error saying that:

C:\Documents and Settings\ycheok\Desktop\test\test.cpp(11) : error C2248: 'CMsgHndlr::~CMsgHndlr' : cannot access protected member declared in class 'CMsgHndlr'
C:\Documents and Settings\ycheok\Desktop\test\test.cpp(7) : see declaration of 'CMsgHndlr::~CMsgHndlr'

is there any error on the code given by that article?

thank you.

regards
yan cheng
GeneralRe: singleton problem Pin
Cristian Teodorescu3-Feb-04 23:01
Cristian Teodorescu3-Feb-04 23:01 
QuestionWhy slower draws on Screen with HW Accel. set to FULL? Pin
uus993-Feb-04 21:46
uus993-Feb-04 21:46 
Generallib/dll file question Pin
bryce3-Feb-04 21:45
bryce3-Feb-04 21:45 
GeneralRe: lib/dll file question Pin
bryce3-Feb-04 22:15
bryce3-Feb-04 22:15 
GeneralRe: lib/dll file question Pin
goozmo3-Feb-04 22:37
goozmo3-Feb-04 22:37 
GeneralDatabase environment Pin
JensB3-Feb-04 21:38
JensB3-Feb-04 21:38 
GeneralRe: Database environment Pin
Roger Wright4-Feb-04 4:00
professionalRoger Wright4-Feb-04 4:00 
GeneralCan't not read string correctly from resource Pin
Paul.Huang3-Feb-04 20:26
Paul.Huang3-Feb-04 20:26 
GeneralRe: Can't not read string correctly from resource Pin
Diddy4-Feb-04 2:23
Diddy4-Feb-04 2:23 
GeneralRe: Can't not read string correctly from resource Pin
Paul.Huang4-Feb-04 14:52
Paul.Huang4-Feb-04 14:52 
GeneralRe: Can't not read string correctly from resource Pin
Diddy4-Feb-04 23:40
Diddy4-Feb-04 23:40 
Generalcpu info Pin
r i s h a b h s3-Feb-04 20:02
r i s h a b h s3-Feb-04 20:02 
GeneralRe: cpu info Pin
Jijo.Raj3-Feb-04 21:53
Jijo.Raj3-Feb-04 21:53 
GeneralRe: cpu info Pin
Alexander M.,4-Feb-04 3:11
Alexander M.,4-Feb-04 3:11 
GeneralDoubt ! TAB Messages from child dialog is not going to child dialogs message queue! Pin
Ilamparithi3-Feb-04 19:23
Ilamparithi3-Feb-04 19:23 
GeneralRe: Doubt ! TAB Messages from child dialog is not going to child dialogs message queue! Pin
Diddy4-Feb-04 2:26
Diddy4-Feb-04 2:26 
GeneralMultiple doc/view pairs Pin
flip3-Feb-04 19:23
flip3-Feb-04 19:23 

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.