visual Pogramming c++ coding for create a paint application..
(Please someone help me)

Answers were Sorted based on User's Feedback



visual Pogramming c++ coding for create a paint application.. (Please someone help me)..

Answer / jack

class myframe:public CFrameWnd
{
public:
myframe()
{
Create(NULL,"My Paint application");
}
void OnPaint()
{
CPaintDC d(this);
CBrush mybrush(RGB(0,255,0));
d.SelectObject(&mybrush);
d.Rectangle(50,150,150,50);
}
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(myframe,CFrameWnd)
ON_WM_PAINT()
END_MESSAGE_MAP()
class myapp:public CWinApp
{
public:
int InitInstance()
{
myframe *p=new myframe;
p->ShowWindow(1);
m_pMainWnd=p;
return 1;
}
};
myapp a;

Is This Answer Correct ?    7 Yes 0 No

visual Pogramming c++ coding for create a paint application.. (Please someone help me)..

Answer / deepa

class myframe:public CFrameWnd
{
public:
myframe()
{
Create(NULL,"My Paint application");
}
void OnPaint()
{
CPaintDC d(this);
CBrush mybrush(RGB(0,255,0));
d.SelectObject(&mybrush);
d.Rectangle(50,150,150,50);
}
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(myframe,CFrameWnd)
ON_WM_PAINT()
END_MESSAGE_MAP()
class myapp:public CWinApp
{
public:
int InitInstance()
{
myframe *p=new myframe;
p->ShowWindow(1);
m_pMainWnd=p;
return 1;
}
};
myapp a;

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More MFC Interview Questions

what is the meaning of constant FILE EXCEEDS LENGTH LIMIT while loading from ps file to vsam in the jcl?

0 Answers  


Tell me about different kinds of synchranization objects ?

6 Answers  


1)why we cant create more than one instance of the class Derived from CWinApp

5 Answers   Alstom,


visual Pogramming c++ coding for create a paint application.. (Please someone help me)

2 Answers  


How to convert a CString variable to char* or LPTSTR?

5 Answers   Dover,






how can u change button shape at run time

3 Answers   Samsung,


What is the base class for MFC Framework ?

4 Answers  


What is CArchive class dowes?

4 Answers  


How many types of combo box are their

2 Answers   Aaditya Info Solutions, E Logic,


What four types of properties are supported by an ActiveX control?

1 Answers  


What is LPCTSTR? What does LP denote it?

4 Answers  


Psychic Window Technique

2 Answers   E Logic, Wild Net,


Categories