📄 cooldialogbar.htm
字号:
<html>
<h3 align="center">Another DevStudio-alike DialogBar</h3>
<p>After spending much time looking for an authentic-looking
DevStudio™-alike docking dialog bar, I found very few
possible contenders. The best of which is Alger Pike's
"DevStudio-like CControlBar", which, unfortunately,
fell short at providing support for dynamically resizing the
dialog and real authentic DevStudio looks.</p>
<p>So, for my inspiration, I turned to the simpler resizing
ControlBar which has raised much attention on codeguru (judging
from the amount of articles here relating to it). The task at
hand was to add resizing dialog support and draw authentic
gripper controls. This was acutally quite easy. The real nasty
part was doing the calculations for the size of the client area
(this still isn't as clean as I would like - read the code and
see). Eventually, I ended up with a simple, yet functional
DevStudio-alike dialog bar that actually took a minimal amount of
work - how great!</p>
<p><img src="CoolDialogBar.jpg" width="464" height="320"></p>
<p>A great piece of functionality introduced with the
CoolDialogBar is that it takes CDialog classes in its Create
functions. That is, if you already have a killer dialog that you
wish to port to a docking dialog bar, it requires only minimal
code, as it does not have to be changed to adapt to MFC's
CDialogBar class. Also, this means you can still have DDX support
in your dialog bars.</p>
<p>The create function for the CCoolDialogBar is defined as
follows:</p>
<pre><font color="#990000"><tt>BOOL CCoolDialogBar::Create(CWnd* pParentWnd, CDialog *pDialog, CString &pTitle, UINT nID, DWORD dwStyle) </tt></font></pre>
<p>The function takes a pointer to the parent window, a pointer
to the dialog class (if you do not require a custom dialog class,
simply pass it a new CDialog item), the title of the dialog bar
(it will be shown when floating), the ID of the dialog bar, and
the dialog bar style (the CBRS_ flags, etc..).</p>
<p>Other than the create function, the rest of the class acts as
a normal CDialogBar.</p>
<p><a href="CoolDialogBar_sample.zip">download a sample app (11k)</a></p>
<p><a href="CoolDialogBar_src.zip">download source code (6k)</a></p>
<p>Date: 14th June 1998</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -