Click here to Skip to main content
15,919,121 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralUDP client implementation Pin
NewHSKid8-Sep-03 6:39
NewHSKid8-Sep-03 6:39 
GeneralRe: UDP client implementation Pin
geo_m9-Sep-03 7:40
geo_m9-Sep-03 7:40 
GeneralDocument/view stops working with CSplitterWnd... Pin
iNsAn1tY8-Sep-03 6:05
iNsAn1tY8-Sep-03 6:05 
GeneralRe: Document/view stops working with CSplitterWnd... Pin
iNsAn1tY8-Sep-03 23:20
iNsAn1tY8-Sep-03 23:20 
GeneralCD ROM detection Pin
Nigel Gooch8-Sep-03 5:54
Nigel Gooch8-Sep-03 5:54 
GeneralRe: CD ROM detection Pin
David Crow8-Sep-03 8:03
David Crow8-Sep-03 8:03 
GeneralRe: CD ROM detection Pin
Nigel Gooch8-Sep-03 21:39
Nigel Gooch8-Sep-03 21:39 
Generalattach the dialog to the tab Pin
Jeef8-Sep-03 5:33
Jeef8-Sep-03 5:33 
I derived the tab control and attached two dialogs.a piece of code
and see the attached pic,where two dialog attached to the tab.
class CBaseTabCtrl : public CTabCtrl
{
// Construction
public:
CBaseTabCtrl(int nType = BTC_NONE);
CDialog *m_tabPages[2];
int m_tabCurrent;
int m_nNumberOfPages;
//Operation
public:
//tab
void Init();
void SetRectangle();
....


CBaseTabCtrl::CBaseTabCtrl(int nType)
{
m_tabPages[0]=new CCamera1CtrlDlg;//CCamera1CtrlDlg is the dialog (IDD_CAMERA1)'s wrapper class.
m_tabPages[1]=new CCamera2CtrlDlg;//CCamera2CtrlDlg is the dialog (IDD_CAMERA2)'s wrapper class.


}

CBaseTabCtrl::~CBaseTabCtrl()
{
delete m_tabPages[nCount];

}


void CBaseTabCtrl::Init()
{
m_tabCurrent=0;

m_tabPages[0]->Create(IDD_CAMERA1, this);

m_tabPages[1]->Create(IDD_CAMERA2, this);

m_tabPages[0]->ShowWindow(SW_SHOW);
m_tabPages[1]->ShowWindow(SW_HIDE);


SetRectangle();
}



in the parent dialog's Oninitdialog()
BOOL CTestDlg::OnInitDialog()
{
...
m_tabCtrl.InsertItem(0, "ÉãÏñ»ú1", 0);
m_tabCtrl.InsertItem(1, "ÉãÏñ»ú2", 1);


m_tabCtrl.Init();
...
}

so when I handle the clicked button 's message in test dialog(parent dialog),I want to send message to the the IDD_CAMERA1 dialog.so I can handle the defined my message in IDD_CAMERA1 dialog .
above,how to send user defined the message to the IDD_CAMERA1 dialog .

attached IMG (there is a link)
GeneralRe: attach the dialog to the tab Pin
Jeef8-Sep-03 16:06
Jeef8-Sep-03 16:06 
Generalerror in executing c++ code Pin
ranjjj8-Sep-03 4:58
ranjjj8-Sep-03 4:58 
GeneralRe: error in executing c++ code Pin
David Crow8-Sep-03 5:43
David Crow8-Sep-03 5:43 
GeneralRe: error in executing c++ code Pin
Michael P Butler8-Sep-03 6:07
Michael P Butler8-Sep-03 6:07 
GeneralRe: error in executing c++ code Pin
ranjjj8-Sep-03 18:09
ranjjj8-Sep-03 18:09 
GeneralRe: error in executing c++ code Pin
Michael P Butler9-Sep-03 9:34
Michael P Butler9-Sep-03 9:34 
GeneralChange color group box border Pin
JensB8-Sep-03 4:33
JensB8-Sep-03 4:33 
GeneralRe: Change color group box border Pin
valikac8-Sep-03 9:57
valikac8-Sep-03 9:57 
GeneralRe: Change color group box border Pin
JensB9-Sep-03 2:24
JensB9-Sep-03 2:24 
GeneralRe: Change color group box border Pin
valikac9-Sep-03 20:04
valikac9-Sep-03 20:04 
GeneralCPen with thick dotted lines Pin
BadJerry8-Sep-03 3:31
BadJerry8-Sep-03 3:31 
GeneralRe: CPen with thick dotted lines Pin
David Crow8-Sep-03 4:15
David Crow8-Sep-03 4:15 
GeneralRe: CPen with thick dotted lines Pin
BadJerry8-Sep-03 4:32
BadJerry8-Sep-03 4:32 
Generaldatabase with SDI Pin
coda_x8-Sep-03 3:19
coda_x8-Sep-03 3:19 
GeneralRe: database with SDI Pin
imsniper8-Sep-03 3:29
imsniper8-Sep-03 3:29 
GeneralRe: database with SDI Pin
coda_x9-Sep-03 4:03
coda_x9-Sep-03 4:03 
GeneralWIndows Device Driver Books Pin
louis8-Sep-03 3:16
louis8-Sep-03 3:16 

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.