visual Pogramming c++ coding for create a paint application..
(Please someone help me)
Answers were Sorted based on User's Feedback
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 |
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 |
How to handle dynamic menus in mfc? What happens when client calls cocreateinstance?
Given two processes, how can they share memory?
What function is called by a document class to notify views that the document has been changed?
What MFC base classes provide support for ActiveX controls?
WHAT IS DIFFERENT BETWEN RELEASE MODE & DEBUGGING MODE
4 Answers Google, Microsoft, TCS,
how do u identify RTTI in vc++
What is Thread ?(VC++)What is the difference between Cmutex and Csemaphone?
What is the difference between Synchronous sockets and asynchronous sockets?
1) create ToolTip in MFC?
I want recent paper pattern for HP company?
How can update edit control data of an executing application from other application?
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);