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

How to handle dynamic menus in mfc? What happens when client calls cocreateinstance?

0 Answers  


Given two processes, how can they share memory?

2 Answers   Microsoft,


What function is called by a document class to notify views that the document has been changed?

2 Answers  


What MFC base classes provide support for ActiveX controls?

2 Answers   Wipro,


WHAT IS DIFFERENT BETWEN RELEASE MODE & DEBUGGING MODE

4 Answers   Google, Microsoft, TCS,






how do u identify RTTI in vc++

4 Answers   Siemens,


What is Thread ?(VC++)What is the difference between Cmutex and Csemaphone?

5 Answers   Atos Origin,


What is the difference between Synchronous sockets and asynchronous sockets?

2 Answers  


1) create ToolTip in MFC?

2 Answers   HCL,


I want recent paper pattern for HP company?

0 Answers   HP,


How can update edit control data of an executing application from other application?

3 Answers   HP,


Will there be any difference in the image buffer size if it is loaded in from CString to LPTSTR using GetBuffer()? lptstr = string.GetBuffer(0);

2 Answers  


Categories