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 |
Whats is DDX & DDV in MFC?
What is the difference between the SDI and MDI
What are the special requirements for dialog box resources used in a form view?
1)how to Display the File Dialog Box, in MFC ?
1)To Remove WS_MINIMIZEBOX in a Frame ?
What is userdefine Messages in MFC?
What is the difference between the Encapsulation and Abstraction
25 Answers HCL, Invensys, TCS, Wipro,
is it possible to display a window .without using windowclass
1) Enable or disable a Cancel button at run time?
I have 2 threads. One thread prints odd numbers and the second thread prints even numbers. Now, I have to execute the threads alternatively so that i can output 1,2,3,4,5,6,..... write code for this?
What is the difference between GetMessage and PeekMessage ?
What is the size of class