⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ceditexandcstaticex.shtml.htm

📁 一套比较全的编辑框控制教程。。。附源代码。
💻 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>


&nbsp;&nbsp;&nbsp; 1. colorref bkcolor( colorref crcolor )
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; colorref bkcolor() const

&nbsp;&nbsp;&nbsp; 2. colorref textcolor( colorref crcolor )
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; colorref textcolor() const

&nbsp;&nbsp;&nbsp; 3. (cedit only) void setcustommask( ceditmask* editmask = 0 /* null == default */ ) - note i have tried using this feature yet.

&nbsp;&nbsp;&nbsp; 4. (cedit only) void definepopupmenu( uint uresourceid  = 0 /* null == default */ ) - overide default context menu with new menu resource.

&nbsp;&nbsp;&nbsp; 5. void setfont( const logfont* lplogfont ); - note: see clogfont included in the ceditex headers and cstaticex headers
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void setfont( long fontheight = -8,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; long fontweight = fw_normal,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uchar pitchandfamily = default_pitch | ff_dontcare,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lpcstr facename = _t(&quot;ms sans serif&quot; );


&nbsp;&nbsp;&nbsp; 6. (cstaticex only) the following idea came from paul dilascia in the december 1997 issue of msj.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void onclickdoshellcommand( const cstring&amp; linkname ) - use control as a link to open a link or exe
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; colorref setlinkcolorvisited( colorref crcolor ) - sets the visit color, returns previous setting
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; colorref setlinkcolorunvisited( colorref crcolor ) - sets the unvisited color, returns previous setting
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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 + -