MFC常用绘图函数

更新时间:2023-07-14 08:19:50 阅读: 评论:0

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;

本文发布于:2023-07-14 08:19:50,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/1095815.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:函数   指定   位置   原型   背景   返回   矩形   模式
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图