Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why does my code does not work. I am unable to create a class

Status
Not open for further replies.

ArvindKumar17

Programmer
Jan 7, 2003
13
MU
hi friends,
I have created my own class and put the member vairables there. They are being intialised in the class contructor. But when I create an instance of the class in ONDraw() funtion of its view, I am having no response. Can anyone say why ? ? ?

Here goes the code

myClass
CText
in CText()
{
m_position = CRect(10,10,100,100);
}


void CHammyView::OnDraw(CDC* pDC)
{
CHammyDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here

CText *m = new CText();
CText->ShowWindow(SW_SHOW);

}
 
Let's see the full class definition and member functions.
tellis.gif

programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top