📄 ceditexandcstaticex.shtml.htm
字号:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="author" content="zafir anjum">
<title>edit controls - table of contents</title>
<meta name="description" content="source code for various windows controls">
<meta name="keywords" content="mfc source code edit controls">
</head>
<body background="../di2001.jpg"
tppabs="http://www.codeguru.com/fancyhome/back.gif" bgcolor="#ffffff">
<h3 align="center"><font color="#aoao99">ceditex and cstaticex - classes that extend the
functionality of the cedit and cstatic </font></h3>
<hr>
<!-- author and contact details -->
<p>this article was contributed by <a href="mailto:bberry@javanet.com">bill berry</a>. <!-- sample image - gif or jpg
<!-- tma: no image provided --> <!-- text / source code --> <!-- the 'p' starts a paragraph of normal text --> </p>
<p><b>description:</b><br>
both ceditex and cstaticex allow for easy customization of text, background../di2001.jpg and font
attributes. <!-- create more blocks of article text as needed --> </p>
<p><b>using these classes:</b><br>
see example code provided. <!-- start a block of source code --> </p>
<pre><tt><font color="#990000">
<b>attributes:</b>
1. colorref bkcolor( colorref crcolor )
colorref bkcolor() const
2. colorref textcolor( colorref crcolor )
colorref textcolor() const
3. (cedit only) void setcustommask( ceditmask* editmask = 0 /* null == default */ ) - note i have tried using this feature yet.
4. (cedit only) void definepopupmenu( uint uresourceid = 0 /* null == default */ ) - overide default context menu with new menu resource.
5. void setfont( const logfont* lplogfont ); - note: see clogfont included in the ceditex headers and cstaticex headers
void setfont( long fontheight = -8,
long fontweight = fw_normal,
uchar pitchandfamily = default_pitch | ff_dontcare,
lpcstr facename = _t("ms sans serif" );
6. (cstaticex only) the following idea came from paul dilascia in the december 1997 issue of msj.
void onclickdoshellcommand( const cstring& linkname ) - use control as a link to open a link or exe
colorref setlinkcolorvisited( colorref crcolor ) - sets the visit color, returns previous setting
colorref setlinkcolorunvisited( colorref crcolor ) - sets the unvisited color, returns previous setting
bool docustomcursor( bool custom = true ) - show a custom cursor over the control
<!-- end the block of source code -->
</font></tt></pre>
<!-- create more blocks of source code as needed -->
<!-- demo project -->
<p><a href="ceditexandcstaticex.zip"
tppabs="http://www.codeguru.com/editctrl/ceditexandcstaticex.zip">download source code and
demo project - 23 kb</a> <!--comments--> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -