CDC帮助为对象着色
嗨
C ++ Visual Studio CDC :: ExtFloodFill中有一个函数(int x,int y,COLORREF crColor,UINT nFillType);
我的问题是我们想要代替的
int x,int y,COLORREF crColor,UINT nFillType
就像我有一个我想要颜色的对象如何做到这一点
enter code here
#include "afxwin.h"
class fr : public CFrameWnd
{
public:
CPoint st;
CPoint en;
fr()
{
Create(0,"First Frame");
}
//////////////////////
void OnLButtonDown(UINT fl,CPoint p )
{
st.x=p.x;
st.y=p.y;
}
//////////////////////
void OnLButtonUp(UINT fl,CPoint r)
{
en.x=r.x;
en.y=r.y;
CClientDC d(this);
d.Ellipse(st.x,st.y,en.x,en.y);
}
void OnRButtonDown(UINT fl,CPoint q)
{
CClientDC e(this);
e.ExtFloodFill(............);
}
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(fr,CFrameWnd)
ON_WM_LBUTTONDOWN()
ON_WM_RBUTTONDOWN()
END_MESSAGE_MAP()
class app : public CWinApp
{
public:
int InitInstance()
{
fr*sal;
sal=new fr;
m_pMainWnd=sal;
sal->ShowWindow(1);
return true;
}
};
app a;
没有找到相关结果
已邀请:
1 个回复
凄挡
编辑:好的,如果你真的坚持它必须是洪水填充,而你是在响应按钮点击它,你可能会做这样的事情: