void CMy4355View::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CView::OnLButtonDown(nFlags, point);
if(m_rectEllipse.PtInRect(point)){
if(m_nColor==DKGRAY_BRUSH){
m_nColor=WHITE_BRUSH;}
else{
m_nColor=DKGRAY_BRUSH;}
InvalidateRect(m_rectEllipse);}
}
为什么将DKGRAY_BRUSH改成YELLOW_BRUSH会出现'YWLLOW_BRUSH' : undeclared identifier的错误?
{
// TODO: Add your message handler code here and/or call default
CView::OnLButtonDown(nFlags, point);
if(m_rectEllipse.PtInRect(point)){
if(m_nColor==DKGRAY_BRUSH){
m_nColor=WHITE_BRUSH;}
else{
m_nColor=DKGRAY_BRUSH;}
InvalidateRect(m_rectEllipse);}
}
为什么将DKGRAY_BRUSH改成YELLOW_BRUSH会出现'YWLLOW_BRUSH' : undeclared identifier的错误?
/* Stock Logical Objects */
#define WHITE_BRUSH 0
#define LTGRAY_BRUSH 1
#define GRAY_BRUSH 2
#define DKGRAY_BRUSH 3
#define BLACK_BRUSH 4
#define NULL_BRUSH 5
#define HOLLOW_BRUSH NULL_BRUSH
#define WHITE_PEN 6
#define BLACK_PEN 7
#define NULL_PEN 8
#define OEM_FIXED_FONT 10
#define ANSI_FIXED_FONT 11
#define ANSI_VAR_FONT 12
#define SYSTEM_FONT 13
#define DEVICE_DEFAULT_FONT 14
#define DEFAULT_PALETTE 15
#define SYSTEM_FIXED_FONT 16并没有YELLOW_BRUSH,
也没有'YWLLOW_BRUSH'