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 |
Does the application have more than one object? If no, then what is the reason?
What are the types of button controls?
how many types of classes are ther,what are that
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);
How we call a dialog in another dialog?
How to handle dynamic menus in mfc? What happens when client calls cocreateinstance?
In SDI how many view's are attached to document object and in MDI how many view's are attached to Document object?
what is the meaning of constant FILE EXCEEDS LENGTH LIMIT while loading from ps file to vsam in the jcl?
What is a critical section and how is it implemented?
what is the updated verssion in vc++
How do you change the properties for a tree view control that is part of the CTreeView class?
Can you explaing the relashionship between document,frame and view ?