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 |
What is the difference between the Encapsulation and Abstraction
25 Answers HCL, Invensys, TCS, Wipro,
What is the range of intensity of RGB
Types of DLL's
How to update windows title bar dynamically?
What are the differences between MFC Exception macros and C++ exception keywords?
what do you mean by psychic window?
How can i implement the dynamic menus in MFC plz give the code
What is the difference between ASSERT and VERIFY?
Which CPrintInfo member variable must be set for multiple page printouts?
What is model and modeless dialog box ? Give some examples?
How to access document object from view ?
visual Pogramming c++ coding for create a paint application.. (Please someone help me)