亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? wtl for mfc programmers, part v.mht

?? 大家知道wtl是window UI庫
?? MHT
?? 第 1 頁 / 共 5 頁
字號:
    MESSAGE_HANDLER(OCM_COMPAREITEM, OnCompareItem)
    MESSAGE_HANDLER(OCM_DELETEITEM, OnDeleteItem)
  END_MSG_MAP()
};</PRE>
      <P>Notice that the main section of the map handles the =
<CODE>WM_*</CODE>=20
      messages, while the ALT section handles the reflected versions,=20
      <CODE>OCM_*</CODE>. The owner draw notifications are like=20
      <CODE>WM_NOTIFY</CODE>, in that you can handle them in the =
control's=20
      parent, or reflect them back to the control. If you choose the =
former, you=20
      chain messages directly to <CODE>COwnerDraw</CODE>:</P><PRE><SPAN =
class=3Dcpp-keyword>class</SPAN> CSomeDlg : <SPAN =
class=3Dcpp-keyword>public</SPAN> COwnerDraw&lt;CSomeDlg&gt;, ...
{
  BEGIN_MSG_MAP(CSomeDlg)
    <SPAN class=3Dcpp-comment>//...</SPAN>
    CHAIN_MSG_MAP(COwnerDraw&lt;CSomeDlg&gt;)
  END_MSG_MAP()
=20
  <SPAN class=3Dcpp-keyword>void</SPAN> DrawItem ( LPDRAWITEMSTRUCT =
lpdis );
};</PRE>
      <P>However, if you want the control to handle the messages, you =
need to=20
      chain to the <CODE>ALT_MSG_MAP(<SPAN =
class=3Dcpp-literal>1</SPAN>)</CODE>=20
      section, using the <CODE>CHAIN_MSG_MAP_ALT</CODE> =
macro:</P><PRE><SPAN class=3Dcpp-keyword>class</SPAN> CSomeButtonImpl : =
<SPAN class=3Dcpp-keyword>public</SPAN> =
COwnerDraw&lt;CSomeButtonImpl&gt;, ...
{
  BEGIN_MSG_MAP(CSomeButtonImpl)
    <SPAN class=3Dcpp-comment>//...</SPAN>
    CHAIN_MSG_MAP_ALT(COwnerDraw&lt;CSomeButtonImpl&gt;, <SPAN =
class=3Dcpp-literal>1</SPAN>)
    DEFAULT_REFLECTION_HANDLER()
  END_MSG_MAP()
=20
  <SPAN class=3Dcpp-keyword>void</SPAN> DrawItem ( LPDRAWITEMSTRUCT =
lpdis );
};</PRE>
      <P><CODE>COwnerDraw</CODE> unpacks the parameters sent with the =
message,=20
      then calls an implementation function in your class. In the =
example above,=20
      the classes implement <CODE>DrawItem()</CODE>, which is called =
when=20
      <CODE>WM_DRAWITEM</CODE> or <CODE>OCM_DRAWITEM</CODE> is chained =
to=20
      <CODE>COwnerDraw</CODE>. The methods you can override =
are:</P><PRE><SPAN class=3Dcpp-keyword>void</SPAN> =
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
<SPAN class=3Dcpp-keyword>void</SPAN> MeasureItem(LPMEASUREITEMSTRUCT =
lpMeasureItemStruct);
<SPAN class=3Dcpp-keyword>int</SPAN>  CompareItem(LPCOMPAREITEMSTRUCT =
lpCompareItemStruct);
<SPAN class=3Dcpp-keyword>void</SPAN> DeleteItem(LPDELETEITEMSTRUCT =
lpDeleteItemStruct);</PRE>
      <P>If for some reason you don't want to handle a message, you can =
call=20
      <CODE>SetMsgHandled(<SPAN class=3Dcpp-keyword>false</SPAN>)</CODE> =
and the=20
      message will be passed along to any other handlers that might be =
later in=20
      the message map. This <CODE>SetMsgHandled()</CODE> function is =
actually a=20
      member of <CODE>COwnerDraw</CODE>, but it works the same as the=20
      <CODE>SetMsgHandled()</CODE> you use with=20
      <CODE>BEGIN_MSG_MAP_EX()</CODE>.</P>
      <P>For ControlMania2, we'll start with the tree control from=20
      ControlMania1, and add an owner-drawn button and handle the =
reflected=20
      <CODE>WM_DRAWITEM</CODE> in the button class. Here's the new =
button in the=20
      resource editor:</P>
      <P><IMG height=3D346 alt=3D" [Owner-drawn button 1 - 7K] "=20
      src=3D"http://www.codeproject.com/wtl/WTL4MFC5/cm2_od1.png" =
width=3D325=20
      align=3Dbottom border=3D0></P>
      <P>Now we need a class that implements this button:</P><PRE><SPAN =
class=3Dcpp-keyword>class</SPAN> CODButtonImpl : <SPAN =
class=3Dcpp-keyword>public</SPAN> CWindowImpl&lt;CODButtonImpl, =
CButton&gt;,
                      <SPAN class=3Dcpp-keyword>public</SPAN> =
COwnerDraw&lt;CODButtonImpl&gt;
{
<SPAN class=3Dcpp-keyword>public</SPAN>:
    BEGIN_MSG_MAP_EX(CODButtonImpl)
        CHAIN_MSG_MAP_ALT(COwnerDraw&lt;CODButtonImpl&gt;, <SPAN =
class=3Dcpp-literal>1</SPAN>)
        DEFAULT_REFLECTION_HANDLER()
    END_MSG_MAP()
=20
    <SPAN class=3Dcpp-keyword>void</SPAN> DrawItem ( LPDRAWITEMSTRUCT =
lpdis );
};</PRE>
      <P><CODE>DrawItem()</CODE> uses GDI calls like =
<CODE>BitBlt()</CODE> to=20
      draw a picture on the button face. This code should be easy to =
follow,=20
      since once again the WTL class names and methods are similar to =
MFC.</P><PRE><SPAN class=3Dcpp-keyword>void</SPAN> =
CODButtonImpl::DrawItem ( LPDRAWITEMSTRUCT lpdis )
{
<SPAN class=3Dcpp-comment>// NOTE: m_bmp is a CBitmap init'ed in the =
constructor.</SPAN>
CDCHandle dc =3D lpdis-&gt;hDC;
CDC dcMem;
=20
    dcMem.CreateCompatibleDC ( dc );
    dc.SaveDC();
    dcMem.SaveDC();
=20
    <SPAN class=3Dcpp-comment>// Draw the button's background, red if it =
has the focus, blue if not.</SPAN>
    <SPAN class=3Dcpp-keyword>if</SPAN> ( lpdis-&gt;itemState &amp; =
ODS_FOCUS )=20
        dc.FillSolidRect ( &amp;lpdis-&gt;rcItem, RGB(<SPAN =
class=3Dcpp-literal>255</SPAN>,<SPAN class=3Dcpp-literal>0</SPAN>,<SPAN =
class=3Dcpp-literal>0</SPAN>) );
    <SPAN class=3Dcpp-keyword>else</SPAN>
        dc.FillSolidRect ( &amp;lpdis-&gt;rcItem, RGB(<SPAN =
class=3Dcpp-literal>0</SPAN>,<SPAN class=3Dcpp-literal>0</SPAN>,<SPAN =
class=3Dcpp-literal>255</SPAN>) );
=20
    <SPAN class=3Dcpp-comment>// Draw the bitmap in the top-left, or =
offset by 1 pixel if the button</SPAN>
    <SPAN class=3Dcpp-comment>// is clicked.</SPAN>
    dcMem.SelectBitmap ( m_bmp );
=20
    <SPAN class=3Dcpp-keyword>if</SPAN> ( lpdis-&gt;itemState &amp; =
ODS_SELECTED )=20
        dc.BitBlt ( <SPAN class=3Dcpp-literal>1</SPAN>, <SPAN =
class=3Dcpp-literal>1</SPAN>, <SPAN class=3Dcpp-literal>80</SPAN>, <SPAN =
class=3Dcpp-literal>80</SPAN>, dcMem, <SPAN =
class=3Dcpp-literal>0</SPAN>, <SPAN class=3Dcpp-literal>0</SPAN>, =
SRCCOPY );
    <SPAN class=3Dcpp-keyword>else</SPAN>
        dc.BitBlt ( <SPAN class=3Dcpp-literal>0</SPAN>, <SPAN =
class=3Dcpp-literal>0</SPAN>, <SPAN class=3Dcpp-literal>80</SPAN>, <SPAN =
class=3Dcpp-literal>80</SPAN>, dcMem, <SPAN =
class=3Dcpp-literal>0</SPAN>, <SPAN class=3Dcpp-literal>0</SPAN>, =
SRCCOPY );
=20
    dcMem.RestoreDC(-<SPAN class=3Dcpp-literal>1</SPAN>);
    dc.RestoreDC(-<SPAN class=3Dcpp-literal>1</SPAN>);
}</PRE>
      <P>Here's what the button looks like:</P>
      <P><IMG height=3D324 alt=3D" [Owner-drawn button - 11K] "=20
      src=3D"http://www.codeproject.com/wtl/WTL4MFC5/cm2_od2.png" =
width=3D305=20
      align=3Dbottom border=3D0></P>
      <H3><A name=3Dccustomdraw></A>CCustomDraw</H3>
      <P><CODE>CCustomDraw</CODE> works similarly to =
<CODE>COwnerDraw</CODE> in=20
      the way you handle <CODE>NM_CUSTOMDRAW</CODE> messages and chain =
them.=20
      <CODE>CCustomDraw</CODE> has an overridable method for each of the =
custom=20
      draw stages:</P><PRE>DWORD OnPrePaint(<SPAN =
class=3Dcpp-keyword>int</SPAN> idCtrl, LPNMCUSTOMDRAW lpNMCD);
DWORD OnPostPaint(<SPAN class=3Dcpp-keyword>int</SPAN> idCtrl, =
LPNMCUSTOMDRAW lpNMCD);
DWORD OnPreErase(<SPAN class=3Dcpp-keyword>int</SPAN> idCtrl, =
LPNMCUSTOMDRAW lpNMCD);
DWORD OnPostErase(<SPAN class=3Dcpp-keyword>int</SPAN> idCtrl, =
LPNMCUSTOMDRAW lpNMCD);
=20
DWORD OnItemPrePaint(<SPAN class=3Dcpp-keyword>int</SPAN> idCtrl, =
LPNMCUSTOMDRAW lpNMCD);
DWORD OnItemPostPaint(<SPAN class=3Dcpp-keyword>int</SPAN> idCtrl, =
LPNMCUSTOMDRAW lpNMCD);
DWORD OnItemPreErase(<SPAN class=3Dcpp-keyword>int</SPAN> idCtrl, =
LPNMCUSTOMDRAW lpNMCD);
DWORD OnItemPostEraset(<SPAN class=3Dcpp-keyword>int</SPAN> idCtrl, =
LPNMCUSTOMDRAW lpNMCD);
=20
DWORD OnSubItemPrePaint(<SPAN class=3Dcpp-keyword>int</SPAN> idCtrl, =
LPNMCUSTOMDRAW lpNMCD);</PRE>
      <P>The default handlers all return <CODE>CDRF_DODEFAULT</CODE>, so =
you=20
      only need to override a method if you need to do your own drawing =
or=20
      return a different value.</P>
      <P>You might have noticed that in the last screen shot, "Dawn" was =
shown=20
      in green. That is achieved by <CODE>CBuffyTreeCtrl</CODE> chaining =

      messages to <CODE>CCustomDraw</CODE> and overriding=20
      <CODE>OnPrePaint()</CODE> and <CODE>OnItemPrePaint()</CODE>. When =
the tree=20
      is filled, that node's item data set to 1, and=20
      <CODE>OnItemPrePaint()</CODE> checks for that value and changes =
the text=20
      color if it's found.</P><PRE>DWORD =
CBuffyTreeCtrl::OnPrePaint(<SPAN class=3Dcpp-keyword>int</SPAN> idCtrl,=20
                                 LPNMCUSTOMDRAW lpNMCD)
{
    <SPAN class=3Dcpp-keyword>return</SPAN> CDRF_NOTIFYITEMDRAW;
}
=20
DWORD CBuffyTreeCtrl::OnItemPrePaint(<SPAN =
class=3Dcpp-keyword>int</SPAN> idCtrl,=20
                                     LPNMCUSTOMDRAW lpNMCD)
{
    <SPAN class=3Dcpp-keyword>if</SPAN> ( <SPAN =
class=3Dcpp-literal>1</SPAN> =3D=3D lpNMCD-&gt;lItemlParam )
        pnmtv-&gt;clrText =3D RGB(<SPAN =
class=3Dcpp-literal>0</SPAN>,<SPAN class=3Dcpp-literal>128</SPAN>,<SPAN =
class=3Dcpp-literal>0</SPAN>);
=20
    <SPAN class=3Dcpp-keyword>return</SPAN> CDRF_DODEFAULT;
}</PRE>
      <P><CODE>CCustomDraw</CODE> also has its own =
<CODE>SetMsgHandled()</CODE>=20
      function that's available to your overrides, just as in=20
      <CODE>COwnerDraw</CODE>.</P>
      <H2><A name=3Dnewwtlctrls></A>New WTL Controls</H2>
      <P>WTL has a few new controls of its own that either improve on =
other=20
      wrappers (like <CODE>CTreeViewCtrlEx</CODE>), or provide new =
functionality=20
      that isn't in the built-in controls (like =
<CODE>CHyperLink</CODE>).</P>
      <H3><A name=3Dnewcbitmapbutton></A>CBitmapButton</H3>
      <P>WTL's <CODE>CBitmapButton</CODE>, declared in atlctrlx.h, is =
rather=20
      easier to use than the MFC version. The WTL class uses an image =
list=20
      instead of four separate bitmap resources, which means you can =
keep=20
      multiple button images in one bitmap and reduce your GDI usage a =
bit. This=20
      is especially nice if you have a lot of graphics and your app runs =
on=20
      Windows 9x, because using lots of separate graphics can quickly =
exhaust=20
      GDI resources and bring down the system.</P>
      <P><CODE>CBitmapButton</CODE> is a =
<CODE>CWindowImpl</CODE>-derived class=20
      that has many features including: automatic sizing of the control, =

      automatic generation of a 3D border, hot-tracking support, and =
several=20
      images per button for the various states the control can be =
in.</P>
      <P>In ControlMania2, we'll use a <CODE>CBitmapButton</CODE> along =
side the=20
      owner-draw button we created earlier. We start by adding a=20
      <CODE>CBitmapButton</CODE> member called <CODE>m_wndBmpBtn</CODE> =
to=20
      <CODE>CMainDlg</CODE>. We then connect it to the new button in the =
usual=20
      way, either by calling <CODE>SubclassWindow()</CODE> or using DDX. =
We load=20
      a bitmap into an image list, then tell the button to use that =
image list.=20
      We also tell the button which image in the image list corresponds =
to which=20
      control state. Here's the section from <CODE>OnInitDialog()</CODE> =
that=20
      sets up the button:</P><PRE>    <SPAN class=3Dcpp-comment>// Set =
up the bitmap button</SPAN>
CImageList iml;
=20
    iml.CreateFromImage ( IDB_ALYSON_IMGLIST, <SPAN =
class=3Dcpp-literal>81</SPAN>, <SPAN class=3Dcpp-literal>1</SPAN>, =
CLR_NONE,
                          IMAGE_BITMAP, LR_CREATEDIBSECTION );
=20
    m_wndBmpBtn.SubclassWindow ( GetDlgItem(IDC_ALYSON_BMPBTN) );
    m_wndBmpBtn.SetToolTipText ( _T(<SPAN =
class=3Dcpp-string>"Alyson"</SPAN>) );
    m_wndBmpBtn.SetImageList ( iml );
    m_wndBmpBtn.SetImages ( <SPAN class=3Dcpp-literal>0</SPAN>, <SPAN =
class=3Dcpp-literal>1</SPAN>, <SPAN class=3Dcpp-literal>2</SPAN>, <SPAN =
class=3Dcpp-literal>3</SPAN> );</PRE>
      <P>By default, the button assumes ownership of the image list, so=20
      <CODE>OnInitDialog()</CODE> must not delete the image list it =
creates.=20
      Here is the new button in its default state. Notice how the =
control is=20
      resized to exactly fit the size of the image.</P>
      <P><IMG height=3D324 alt=3D" [WTL bitmap button - 12K] "=20
      src=3D"http://www.codeproject.com/wtl/WTL4MFC5/cm2_bb1.png" =
width=3D305=20
      align=3Dbottom border=3D0></P>
      <P>Since <CODE>CBitmapButton</CODE> is a very useful class, I'll =
cover its=20
      public methods here.</P>
      <H4>CBitmapButton methods</H4>
      <P>The class <CODE>CBitmapButtonImpl</CODE> contains all the code =
to=20
      implement a button, but unless you need to override a method or =
message=20
      handler, you can use <CODE>CBitmapButton</CODE> for your =
controls.</P>
      <H5>CBitmapButtonImpl constructor</H5><PRE>CBitmapButtonImpl(DWORD =
dwExtendedStyle =3D BMPBTN_AUTOSIZE,
                  HIMAGELIST hImageList =3D NULL)</PRE>
      <P>The constructor sets up the button extended style (not to be =
confused=20
      with its window styles) and can assign an image list. Usually the =
defaults=20
      are sufficient, since you can set both attributes with other =
methods.</P>
      <H5>SubclassWindow()</H5><PRE>BOOL SubclassWindow(HWND hWnd)</PRE>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲禁片免费| 欧美图片一区二区三区| 国产一区二区0| 麻豆一区二区三区| 日本sm残虐另类| 免费日本视频一区| 久久精品国产77777蜜臀| 日本在线播放一区二区三区| 日韩国产欧美在线视频| 免费观看一级特黄欧美大片| 日韩av网站免费在线| 日韩高清中文字幕一区| 麻豆精品新av中文字幕| 精彩视频一区二区三区| 国产精品一线二线三线精华| 不卡在线视频中文字幕| 国产精品中文字幕一区二区三区| 亚洲国产精品一区二区久久恐怖片| 亚洲国产精品视频| 日本欧美一区二区三区乱码| 美女精品自拍一二三四| 国产成人午夜电影网| 成av人片一区二区| 欧美日韩一级视频| 日韩欧美一区电影| 久久久精品黄色| 国产精品久久夜| 亚洲国产成人tv| 久99久精品视频免费观看| 国产成人在线观看| 91福利国产精品| 日韩视频中午一区| 国产精品午夜春色av| 亚洲欧美偷拍卡通变态| 天天影视涩香欲综合网| 国产永久精品大片wwwapp| 成人国产在线观看| 成人深夜在线观看| 欧美性大战久久久| 精品日韩欧美一区二区| 最新国产成人在线观看| 亚洲电影视频在线| 国产一区二区在线看| av激情综合网| 91精品久久久久久蜜臀| 国产亚洲精品福利| 欧美亚洲禁片免费| 日韩视频免费观看高清完整版| 韩国毛片一区二区三区| 26uuu另类欧美| 亚洲图片欧美激情| 蜜桃视频免费观看一区| 国产麻豆精品视频| 欧美亚洲尤物久久| 久久综合九色综合97_久久久| 日韩毛片精品高清免费| 麻豆精品在线视频| 91美女片黄在线| 91精品国产综合久久久久| 国产精品蜜臀av| 免费成人av资源网| 日本高清无吗v一区| 2021国产精品久久精品| 一区二区三区波多野结衣在线观看| 青娱乐精品视频| 99热99精品| 久久久久9999亚洲精品| 五月激情六月综合| 色天天综合色天天久久| 欧美国产日韩一二三区| 久久99精品久久久久婷婷| 在线视频一区二区三| 国产三区在线成人av| 美脚の诱脚舐め脚责91| 欧美日韩中文国产| 亚洲欧美日韩电影| 大尺度一区二区| 日韩三级电影网址| 天天操天天干天天综合网| 91在线视频观看| 国产精品区一区二区三区| 麻豆极品一区二区三区| 欧美一区二区三区免费观看视频| 亚洲美女视频在线观看| 成人av在线一区二区三区| 久久久不卡网国产精品二区| 久久99九九99精品| 日韩久久久精品| 亚洲va欧美va人人爽| 欧美日韩免费电影| 亚洲一二三区视频在线观看| 一本色道久久综合亚洲aⅴ蜜桃| 欧美激情在线免费观看| 国产黄色精品网站| 国产无遮挡一区二区三区毛片日本| 精品一二三四在线| 日韩色视频在线观看| 蜜桃在线一区二区三区| 日韩欧美成人激情| 免费成人美女在线观看| 日韩欧美中文字幕一区| 免费观看一级特黄欧美大片| 日韩一区二区高清| 看电影不卡的网站| 精品久久一区二区三区| 国产在线乱码一区二区三区| 亚洲精品一区二区三区在线观看 | 欧美成人猛片aaaaaaa| 亚洲国产精品一区二区www| 欧美视频在线播放| 视频一区二区三区在线| 91精品国产免费| 精品午夜久久福利影院| www激情久久| 国产大陆亚洲精品国产| 亚洲国产精品传媒在线观看| 成人99免费视频| 伊人色综合久久天天| 91久久精品国产91性色tv| 亚洲一区二区高清| 8v天堂国产在线一区二区| 另类人妖一区二区av| 久久亚洲精品小早川怜子| 懂色av一区二区夜夜嗨| 最新欧美精品一区二区三区| 欧美亚洲国产一区二区三区va| 亚洲大型综合色站| 日韩女优av电影| 成人a免费在线看| 亚洲一区二区三区不卡国产欧美| 91精品中文字幕一区二区三区| 美女mm1313爽爽久久久蜜臀| 国产精品网友自拍| 日本电影亚洲天堂一区| 丝袜美腿高跟呻吟高潮一区| 精品黑人一区二区三区久久| 国产69精品一区二区亚洲孕妇 | 激情六月婷婷久久| 国产精品久久久久婷婷| 欧美在线视频不卡| 麻豆国产一区二区| 亚洲欧洲韩国日本视频| 欧美高清视频不卡网| 国产酒店精品激情| 亚洲精品一二三| 欧美大肚乱孕交hd孕妇| 91在线观看成人| 奇米精品一区二区三区四区| 欧美国产日韩在线观看| 7777精品伊人久久久大香线蕉最新版| 精品亚洲porn| 亚洲激情网站免费观看| 日韩午夜在线播放| 色哟哟欧美精品| 狠狠色综合播放一区二区| 亚洲激情av在线| 国产亚洲女人久久久久毛片| 欧美日韩一二三区| 成人精品一区二区三区四区| 天堂va蜜桃一区二区三区| 国产欧美一区二区在线| 欧美丰满高潮xxxx喷水动漫| 成人性生交大片免费看在线播放| 亚洲电影在线免费观看| 国产日产欧美一区| 51午夜精品国产| 色综合网色综合| 国产精品99久久久久久有的能看| 亚洲www啪成人一区二区麻豆| 国产精品乱人伦| 日韩亚洲电影在线| 欧美亚洲国产怡红院影院| 成人免费毛片片v| 久久福利视频一区二区| 亚洲综合一区二区| 国产精品网站一区| 亚洲精品一区二区三区在线观看| 精品污污网站免费看| av在线不卡免费看| 国产一区二区三区高清播放| 日韩制服丝袜先锋影音| 亚洲美女精品一区| 中文字幕av一区二区三区免费看| 精品国产乱子伦一区| 欧美精品一二三区| 在线观看亚洲精品| 91在线视频网址| 成人福利视频网站| 国产成都精品91一区二区三 | 欧美精品视频www在线观看| 91麻豆视频网站| 成人免费的视频| 丰满少妇在线播放bd日韩电影| 另类综合日韩欧美亚洲| 午夜精品免费在线观看| 夜夜精品视频一区二区| 一区二区三区在线视频免费观看| 亚洲视频一区二区在线| 综合久久国产九一剧情麻豆| 欧美韩国一区二区|