Hello,
I have a short Visual C++ program which creates a window. My program is
as follows :
#include "stdafx.h"
#include <afxwin>
class COurApp : public CWinApp
{
public:
virtual BOOL InitInstance();
};
class COurWnd : public CFrameWnd
{
public:
COurWnd()
{
Create(0, TEXT("My App"));
}
};
class myTab : public CTabCtrl
{
public:
myTab()
{
Create (TCS_TABS | TCS_FIXEDWIDTH | WS_CHILD | WS_VISIBLE,
CRect(20, 30, 180, 230), this, 0x1006);
}
};
BOOL COurApp::InitInstance(void)
{
m_pMainWnd = new COurWnd;
m_pMainWnd->ShowWindow(m_nCmdShow);
// At this point, I would like to create a tab and attach to the window.
// I tried :
//
// m_wndMyTabCtrl = new myTab;
//
// but got an "undeclared indentifier" compiler error message.
return TRUE;
}
COurApp AnApplication;
}
I wonder if someone could please show me how to create an object of type 'myTab' and attach it to the window? Your help is much appreciated!
Akino