Click here to Skip to main content
15,916,378 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalplease give me guidlines Pin
vgkotha26-Nov-02 2:39
vgkotha26-Nov-02 2:39 
GeneralRe: please give me guidlines Pin
Michael P Butler26-Nov-02 3:45
Michael P Butler26-Nov-02 3:45 
GeneralRe: please give me guidlines Pin
vgkotha26-Nov-02 4:04
vgkotha26-Nov-02 4:04 
Generaldll hell - pls help Pin
Chris Eatough26-Nov-02 2:06
Chris Eatough26-Nov-02 2:06 
GeneralRe: dll hell - pls help Pin
roel_26-Nov-02 4:08
roel_26-Nov-02 4:08 
GeneralDifference in size of MFC and ASNI C Pin
Tili26-Nov-02 1:58
Tili26-Nov-02 1:58 
GeneralRe: Difference in size of MFC and ASNI C Pin
roel_26-Nov-02 4:10
roel_26-Nov-02 4:10 
GeneralAbstract class as interface Pin
s o v a n n26-Nov-02 1:27
s o v a n n26-Nov-02 1:27 
Hi!

I am writing a custom window control in MFC: a tab control.

CWnd
 A     
 |    
 |   
MyTab


class MyTab : protected CWnd {
public:
   void add(const CString& title, CDialog* dlg);
   ...
protected:
   ...
private:
   ...
};


Everything goes well. Now I want to seperate interfaces from implementation theorically:

CWnd  ITab (abstract class as interface)
 A     A
 |    /
 |   /
MyTab


class ITab {
public:
   virtual void add(const CString& title, CDialog* dlg)=0;
};


class MyTab : public ITab, protected CWnd {
public:
   virtual void add(const CString& title, CDialog* dlg);
   ...
protected:
   ...
private:
   ...
};


This time, the problem exist: there is no HWND attached.

Does anyone know how to solve this? Or is there an alternative design?

Any reply would be appreciated.
sovann.


Why waste time learning while ignorence is instantaneous ? [Hobbes]
GeneralRe: Abstract class as interface Pin
Roman Fadeyev26-Nov-02 2:11
Roman Fadeyev26-Nov-02 2:11 
GeneralCreate/SetWaitableTimer Pin
BlackSmith26-Nov-02 1:18
BlackSmith26-Nov-02 1:18 
GeneralRe: Create/SetWaitableTimer Pin
Daniel Turini26-Nov-02 1:52
Daniel Turini26-Nov-02 1:52 
Generalexit Pin
Rage26-Nov-02 1:03
professionalRage26-Nov-02 1:03 
GeneralRe: exit Pin
Rickard Andersson2026-Nov-02 1:10
Rickard Andersson2026-Nov-02 1:10 
GeneralRe: exit Pin
Rage26-Nov-02 1:15
professionalRage26-Nov-02 1:15 
GeneralGot it !.. Pin
Rage26-Nov-02 1:17
professionalRage26-Nov-02 1:17 
GeneralRe: exit Pin
Rickard Andersson2026-Nov-02 1:28
Rickard Andersson2026-Nov-02 1:28 
Generalon winXP progress bar not getting refreshed Pin
shiben26-Nov-02 0:35
shiben26-Nov-02 0:35 
GeneralRe: on winXP progress bar not getting refreshed Pin
Rage26-Nov-02 1:07
professionalRage26-Nov-02 1:07 
GeneralRe: on winXP progress bar not getting refreshed Pin
shiben26-Nov-02 18:44
shiben26-Nov-02 18:44 
GeneralADO determine if a field is primary key Pin
devvvy26-Nov-02 0:32
devvvy26-Nov-02 0:32 
GeneralThis is basically what i need to do... Pin
devvvy26-Nov-02 15:12
devvvy26-Nov-02 15:12 
Generalweird UNICODE problem Pin
Arjan Schouten26-Nov-02 0:19
Arjan Schouten26-Nov-02 0:19 
GeneralRe: weird UNICODE problem Pin
Joaquín M López Muñoz26-Nov-02 0:40
Joaquín M López Muñoz26-Nov-02 0:40 
GeneralRe: weird UNICODE problem Pin
jan larsen26-Nov-02 0:46
jan larsen26-Nov-02 0:46 
GeneralRe: weird UNICODE problem Pin
Alexandru Savescu26-Nov-02 0:56
Alexandru Savescu26-Nov-02 0:56 

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.