MFC常⽤绘图函数
(1)、常⽤的绘画成员函数:
SetPixel():⽤指定的颜⾊在指定的坐标画⼀个点,返回值为RGB颜⾊值;
宝石吉丁虫函数原型 COLORREF SetPixel( int x , int y , COLORREF crColor );
COLORREF SetPixel( POINT point , COLORREF crColor );
MoveTo():移动当前位置到指定的坐标,返回值为以前位置的坐标;
函数原型 CPoint MoveTo( int x , int y );
CPoint MoveTo( POINT point );
LineTo():从当前位置到指定位置画⼀条直线,成功返回⾮0;先求婚还是先订婚
函数原型 BOOL LineTo( int x , int y );
BOOL LineTo( POINT point );
Polyline():从当前位置,绘画多条曲线,成功返回⾮0;
函数原型 BOOL Polyline( LPPOINT lpPoints , int nCount/*数⽬*/ );
Rectangle():根据指定参数绘制⼀个矩形,成功返回⾮0;
函数原型 BOOL Rectangle( int x1 , int y1 , int x2 , int y2 );
BOOL Rectangle( LPCRECT lpRect );
Ellip(): 根据指定的矩形绘制⼀个内切椭圆,成功返回⾮0;
函数原型 BOOL Ellip( int x1 , int y1 , int x2 , int y2 );
BOOL Ellip( LPCRECT lpRect );
DrawIcon():在指定位置画⼀个图标,成功返回⾮0;
函数原型 BOOL DrawIcon( int x , int y , HICON hIcon );
关于孙悟空的故事BOOL DrawIcon( POINT point , HICON hIcon );
(2)、有关⽂本处理的常⽤函数:
TextOut():在函数参数指定的位置显⽰⽂本串。
函数原型 virtual BOOL TextOut( int x , int y , LPCTSTR lpszString , int nCount );
BOOL TextOut( int x, int y, const CString& str );
DrawText():在函数参数指定的矩形区域内显⽰⽂本串。
函数原型 virtual int DrawText( LPCTSTR lpszString , int nCount , LPRECT lpRect , UINT nFormat /*类型*/ ); int DrawText( const CString& str , LPRECT lpRect , UINT nFormat );
法利赛人下载
罗字组词SetTextColor():设置显⽰⽂本的颜⾊,返回当前⽂本RGB颜⾊值;
函数原型 virtual COLORREF SetTextColor( COLORREF crColor );
GetTextColor():获得当前⽂本颜⾊; 函数原型 COLORREF GetTextColor( ) const;
SetBkColor():设置显⽰⽂本的背景颜⾊,返回当前⽂本背景RGB颜⾊值;
历史题材电视剧
函数原型 virtual COLORREF SetBkColor( COLORREF crColor );
GetBkColor():获得当前⽂本背景颜⾊; 函数原型 COLORREF GetBkColor( ) const;
SetBkMode():设置⽂本的背景模式,返回当前背景模式值;
函数原型 int SetBkMode( int nBkMode /*模式*/ ); TRANSPARENT透明, OPAQUE 不透明生活更好
索隆壁纸
GetBkMode():获得当前⽂本背景模式; 函数原型 int GetBkMode( ) const;
SetTextAlign():设置显⽰⽂本的对齐⽅式,成功返回⾮0;
函数原型 UINT SetTextAlign( UINT nFlags );
GetTextAlign():获得⽂本的对齐⽅式,函数原型 UINT GetTextAlign( ) const;