📄 combo_in_flatbar.shtml
字号:
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Author" CONTENT="Zafir Anjum">
<TITLE>Toolbar - Using ComboBox on a Flat Toolbar</TITLE>
</HEAD>
<body background="../fancyhome/back.gif" bgcolor="#FFFFFF" link="#B50029" vlink="#8E2323" alink="#FF0000" bgproperties="fixed">
<table WIDTH="100%">
<tr WIDTH="100%">
<td align=center><!--#exec cgi="/cgi/ads.cgi"--><td>
</tr>
</table>
<CENTER><H3><FONT COLOR="#AOAO99">Using ComboBox on a Flat Toolbar</FONT></H3></CENTER>
<HR>
This article was contributed by <A HREF="mailto:cartek@prodigy.net">Kenneth Carter</A>.
<P>This was tricky i spent week and a half on this but I solved it by
studying the messages that a combobox gives off.
I want to thank joerg for helping me get the combobox on the toolbar
this class was written to take advantage of th CToolBarEx as a base
class that Joerg had contributated.
<P>There is a message CBN_SELENDOK that is immediatly posted before
CBN_SELCHANGE.
<P>Using these two messages and a static variable you can pass the current
sel that you selected to class outside of the Combobar class. the nice
thing is that the api handles the setting the focus correctly.
<P>Here is some code on how it was down.
<P>combobar.cpp
<PRE><TT><FONT COLOR="#990000">
BEGIN_MESSAGE_MAP(CComboBar, CToolBarEx)
//{{AFX_MSG_MAP(CComboBar)
ON_CBN_SELENDOK(IDW_TOOLCOMBO, OnSelEndOk)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BOOL CComboBar::Create(CFrameWnd * pParent, UINT nID, UINT nComboID,
const int nWidth,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -