📄 wtl for mfc programmers, part vii.mht
字号:
<TD><IMG height=3D16=20
=
src=3D"http://www.codeproject.com/script/images/support_icon.gif"=20
width=3D16></TD>
<TD class=3DsmallText><A=20
href=3D"http://www.codeproject.com/store/"><B>VS.NET =
2003 from=20
$899</B></A></TD></TR>
<TR vAlign=3Dtop>
<TD><IMG height=3D16=20
=
src=3D"http://www.codeproject.com/script/images/support_icon.gif"=20
width=3D16></TD>
<TD class=3DsmallText><A=20
href=3D"http://www.codeproject.com/store/"><B>MSDN =
Univ. from=20
$1950</B></A></TD></TR>
<TR vAlign=3Dtop>
<TD></TD>
<TD></TD></TR>
<TR vAlign=3Dtop>
<TD><IMG height=3D16=20
src=3D"http://www.codeproject.com/images/print.gif" =
width=3D16></TD>
<TD class=3DsmallText><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp?print=3Dtrue"=20
target=3D_print>Print version</A></TD></TR>
<TR vAlign=3Dtop>
<TD><IMG height=3D16=20
src=3D"http://www.codeproject.com/images/link.gif" =
width=3D16></TD>
<TD class=3DsmallText><A=20
=
href=3D"http://www.codeproject.com/script/profile/add_bookmark.asp?t=3D0&=
amp;ct=3D%2Fwtl%2Fwtl4mfc7%2Easp&guid=3DWTL4MFC7%2Fwtl7%2F11%2F2003">=
Bookmark=20
this</A></TD></TR></TR>
<TR vAlign=3Dtop>
<TD><IMG height=3D16=20
src=3D"http://www.codeproject.com/images/mail.gif" =
width=3D16></TD>
<TD class=3DSmallText><A=20
=
href=3D"http://www.codeproject.com/script/recommend/form.asp?guid=3DWTL4M=
FC7%2Fwtl7%2F11%2F2003">Send=20
to a friend</A></TD></TR>
<TR vAlign=3Dtop>
<TD></TD>
<TD></TD></TR>
<TR vAlign=3Dtop>
<TD></TD>
<TD class=3DInfoBarHeader>My Profile</TD></TR>
<TR>
<TD bgColor=3Dblack colSpan=3D2><IMG height=3D1=20
src=3D"http://www.codeproject.com/images/space.gif"=20
width=3D1></TD></TR>
<TR vAlign=3Dtop>
<TD><IMG height=3D16=20
=
src=3D"http://www.codeproject.com/images/profile_small.gif"=20
width=3D16></TD>
<TD class=3DsmallText><A=20
=
href=3D"http://www.codeproject.com/script/profile/modify.asp?ct=3D/wtl/wt=
l4mfc7.asp">My=20
Settings</A></TD></TR>
<TR vAlign=3Dtop>
<TD><IMG height=3D16=20
=
src=3D"http://www.codeproject.com/images/submit_small.gif"=20
width=3D16></TD>
<TD class=3DsmallText><A=20
=
href=3D"http://www.codeproject.com/script/articles/list_articles.asp?user=
id=3D273403">My=20
Articles</A></TD></TR>
<TR vAlign=3Dtop>
<TD><IMG height=3D16=20
=
src=3D"http://www.codeproject.com/images/bookmarks.gif"=20
width=3D16></TD>
<TD class=3DsmallText><A=20
=
href=3D"http://www.codeproject.com/script/profile/bookmark_list.asp">My=20
Bookmarks</A></TD></TR>
<TR vAlign=3Dtop>
<TD><IMG height=3D16=20
=
src=3D"http://www.codeproject.com/images/logoff_small.gif"=20
width=3D16></TD>
<TD class=3DsmallText><A=20
=
href=3D"http://www.codeproject.com/script/profile/logoff.asp?ct=3D/wtl/wt=
l4mfc7.asp">Sign=20
out</A></TD></TR>
<TR>
<TD bgColor=3Dblack colSpan=3D2><IMG height=3D1=20
src=3D"http://www.codeproject.com/images/space.gif"=20
width=3D1></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD> </TD></TR>
<TR>
<TD>
<CENTER><A=20
=
href=3D"http://www.codeproject.com/script/admentor/admentorredir.asp?id=3D=
575&way=3Dban"=20
target=3D_blank><IMG height=3D600 alt=3D""=20
=
src=3D"http://www.codeproject.com/script/admentor/images/tallsky.gif"=20
width=3D120 =
border=3D0></A><BR></CENTER><BR></TD></TR></TBODY></TABLE></TD>
<TD width=3D5 rowSpan=3D2><IMG height=3D1=20
src=3D"http://www.codeproject.com/images/space.gif" width=3D5> =
</TD>
<TD align=3Dright width=3D"100%" bgColor=3Dwhite>
<TABLE width=3D"100%">
<TBODY>
<TR>
<TD class=3DsmallText vAlign=3Dtop noWrap></TD>
<TD noWrap align=3Dright><A name=3D__top></A>
<TABLE>
<TBODY>
<TR>
<TD class=3DsmallText align=3Dright>42 members have =
rated this=20
article. Result:</TD>
<TD>
<TABLE cellSpacing=3D0 cellPadding=3D0 border=3D2>
<TBODY>
<TR>
<TD><IMG height=3D5=20
=
src=3D"http://www.codeproject.com/script/images/red.gif"=20
width=3D20 border=3D0></TD>
<TD><IMG height=3D5=20
=
src=3D"http://www.codeproject.com/script/images/red.gif"=20
width=3D20 border=3D0></TD>
<TD><IMG height=3D5=20
=
src=3D"http://www.codeproject.com/script/images/red.gif"=20
width=3D20 border=3D0></TD>
<TD><IMG height=3D5=20
=
src=3D"http://www.codeproject.com/script/images/red.gif"=20
width=3D20 border=3D0></TD>
<TD><IMG height=3D5=20
=
src=3D"http://www.codeproject.com/script/images/red.gif"=20
width=3D17 border=3D0><IMG height=3D5=20
=
src=3D"http://www.codeproject.com/script/images/white.gif"=20
width=3D3 =
border=3D0></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD class=3DsmallText align=3Dright colSpan=3D2><A=20
title=3D"Calculated as rating x Log10(# votes)"=20
=
href=3D"http://www.codeproject.com/script/articles/top_articles.asp?st=3D=
2">Popularity:=20
7.89</A>. Rating: <B>4.86</B> out of=20
5.</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD vAlign=3Dtop width=3D"100%">
<DIV id=3Dcontentdiv><!-- Article Starts -->
<UL class=3Ddownload>
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/WTL4MFC7/WTL4MFC7_demo.zip">Downlo=
ad=20
demo project - 88KB</A> </LI></UL><!-- Add the rest of your HTML =
here -->
<H2>Contents</H2>
<UL>
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#intro">Introduction</=
A>=20
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#wtlsplitters">WTL=20
Splitter Windows</A>=20
<UL>
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#splitclasses">Classes=
</A>=20
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#creatingsplitter">Cre=
ating=20
a splitter</A>=20
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#splittermethods">Basi=
c=20
methods</A>=20
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#splitdata">Data=20
members</A> </LI></UL>
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#startsample">Starting=
=20
the Sample Project</A>=20
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#creatingpanes">Creati=
ng=20
windows in the panes</A>=20
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#messagerouting">Messa=
ge=20
Routing</A>=20
<LI><A =
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#panecont">Pane=20
Containers</A>=20
<UL>
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#pcclasses">Classes</A=
>=20
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#pcmethods">Basic=20
methods</A>=20
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#pcinsplitter">Using=20
a pane container in a splitter window</A>=20
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#pcclosebtn">The=20
Close button and message handling</A> </LI></UL>
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#advancedsplitter">Adv=
anced=20
Splitter Features</A>=20
<UL>
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#nested">Nested=20
splitters</A>=20
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#axinpane">Using=20
ActiveX controls in a pane</A>=20
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#specialdraw">Special =
drawing</A> </LI></UL>
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#pcoverrides">Special =
Drawing in Pane Containers</A>=20
<LI><A =
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#bonus">Bonus:=20
Progress Bar in the Status Bar</A>=20
<LI><A =
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#upnext">Up=20
Next</A>=20
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#references">Reference=
s</A>=20
<LI><A=20
=
href=3D"http://www.codeproject.com/wtl/wtl4mfc7.asp#revisionhistory">Revi=
sion=20
History</A> </LI></UL>
<H2><A name=3Dintro></A>Introduction</H2>
<P>Splitter windows have been a popular UI element since Explorer =
debuted=20
in Windows 95, with its two-pane view of the file system. MFC has =
a=20
complex and powerful splitter window class, however it is somewhat =
difficult to learn how to use, and coupled to the doc/view =
framework. In=20
Part VII, I will discuss the WTL splitter window, which is much =
less=20
complicated than MFC's. While WTL's splitter implementation does =
have=20
fewer features than MFC's, it is far easier to use and extend.</P>
<P>The sample project for this part will be a rewrite of <A=20
=
href=3D"http://www.codeproject.com/clipboard/clipspy.asp">ClipSpy</A>, =
using=20
WTL of course instead of MFC. If you're not familiar with that =
program,=20
please skim over the article now, as I will be duplicating the=20
functionality of ClipSpy here without providing in-depth =
explanations of=20
how it works. This article's focus is the splitter window, not the =
clipboard.</P>
<H2><A name=3Dwtlsplitters></A>WTL Splitter Windows</H2>
<P>The header file atlsplit.h contains all of the WTL splitter =
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -