How to let views in a splitter window have their own tit
Chuck Yan -- yan@CMML2.eng.ohio-state.edu
Friday, December 13, 1996
Environment: MSVC++ 4.0, Win NT 3.51
I'd like to thank a few people who responded to my question. The solution is
pointed out by bshamsian@ccvhs.vhsla.com in the following forwarded message.
However, the original source code of ZCaptionFormView has a small problem:
after the user drags the splitter bar, the pseudo title bar of the active view
is not painted correctly. To correct this, you can overwrite
ZCaptionFormView::OnSetFocus to set data member m_bActive to TRUE. Or you can
derive your own splitter window class from CSplitterWnd to prevent the
splitter bar to get keyboard input focus. It seems to me that MSDN's infoview
takes the later approach.
>
> Chuck Mr. V. Ramachandran wrote an article in the July 1996 Windows
> Developer Journal which showed exactly how to do this. The article is
> called "Tiny Captions for MFC Splitter Views". You can find the
> article online at http://www.wdj.com/notgone/707art.htm. This page
> also points to the location of the source file and sample application
> he wrote (ftp://ftp.mfi.com/pub/windev/1996/jul96.zip).
>
> The files you need are zCapform.cpp and zCapform.h.
>
Source code deleted.
============================================================================
Zhongcheng(Chuck) Yan, Ph.D. | Phone:
The Ohio State University | (1)-614-292-8718(Lab), 292-2054(O)
Department of Mechanical Engineering | (1)-614-688-9613(H)
206 West 18th Avenue | Fax:
Columbus, OH 43210 | (1)-614-292-3163 (Dept.Office)
============================================================================
Lin Sebastian Kayser -- Lin.Kayser@munich.netsurf.de
Monday, December 16, 1996
[Mini-digest: 2 responses]
Chuck,
I wonder what this discussion is all about. As I pointed out in my =
answer to your question the solution in Windows Development Journal has =
several problems. My solution which I also posted has none of these =
problems. As I said the code is based on the code printed out in the =
magazine but fixes all of its problems - it is btw also much nicer to =
look at. You should be able to just copy and paste my example without =
needing further investigation. As I said in my previous reply the code I =
provided is part of a shipping application and it *simply works*.
No point in occupying 2000 list members with problems already solved!
Best regards,
Lin
...........................................................
. Lin Sebastian Kayser, Kayser & Nass, Munich .
. Lin.Kayser@Munich.Netsurf.de / 100532.2621@CompuServe.com .
. http://ourworld.compuserve.com/homepages/Lin_Kayser .
. Writing from Munich at 16.12.96 11:24 GMT+1:00 .
...........................................................
-----Original Message-----
From: Chuck Yan [SMTP:yan@CMML2.eng.ohio-state.edu]
Sent: Friday, December 13, 1996 2:52 PM
To: mfc-l@netcom.com
Subject: Re: How to let views in a splitter window have their own tit
Environment: MSVC++ 4.0, Win NT 3.51
I'd like to thank a few people who responded to my question. The =
solution is=20
pointed out by bshamsian@ccvhs.vhsla.com in the following forwarded =
message.
However, the original source code of ZCaptionFormView has a small =
problem:
after the user drags the splitter bar, the pseudo title bar of the =
active view=20
is not painted correctly. To correct this, you can overwrite
ZCaptionFormView::OnSetFocus to set data member m_bActive to TRUE. Or =
you can
derive your own splitter window class from CSplitterWnd to prevent the
splitter bar to get keyboard input focus. It seems to me that MSDN's =
infoview
takes the later approach.
> =20
> Chuck Mr. V. Ramachandran wrote an article in the July 1996 =
Windows=20
> Developer Journal which showed exactly how to do this. The =
article is=20
> called "Tiny Captions for MFC Splitter Views". You can find the=20
> article online at http://www.wdj.com/notgone/707art.htm. This =
page=20
> also points to the location of the source file and sample =
application=20
> he wrote (ftp://ftp.mfi.com/pub/windev/1996/jul96.zip).=20
> =20
> The files you need are zCapform.cpp and zCapform.h. =20
> =20
Source code deleted.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
Zhongcheng(Chuck) Yan, Ph.D. | Phone:
The Ohio State University | (1)-614-292-8718(Lab), =
292-2054(O)
Department of Mechanical Engineering | (1)-614-688-9613(H)
206 West 18th Avenue | Fax:
Columbus, OH 43210 | (1)-614-292-3163 (Dept.Office)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
-----From: "Kenneth A. Argo"
I don't think it will actually solve what you want but it may have the =
information you are looking for; A few months ago in Win Dev there was =
an article on how to deal with focus indication and splitter windows in =
VC. I don't recall the article and what was discussed, but it sounds =
like information which may be helpful to your task.
Ken
| Вернуться в корень Архива
|