How to get '?' on title bar
Jeff Lindholm -- JeffL@inter-intelli.com
Wednesday, November 06, 1996
Environment: NT 4.0, MSVC 4.2b
I am trying to figure out how to get the "?" in a dialog's title bar. I
may just be missing this somewhere (I hope).
Thanks
Jeff
Joseph M. -- jkoral@realworldcorp.com
Thursday, November 07, 1996
[Mini-digest: 8 responses]
Jeff Lindholm wrote:
>> I am trying to figure out how to get the "?" in a dialog's title bar.
Look at the window style WS_EX_CONTEXTHELP.
- joseph
-----From: Gonzalo Isaza
Use the style DS_CONTEXTHELP.
Gonzalo
I speak as myself. I do not speak for Microsoft
-----From: Alaks Sevugan
Hi Jeff,
Override the OnInitDialog function and add the following code :-
BOOL BaseDialog::OnInitDialog()
{
CDialog::OnInitDialog();
// add context help button
ModifyStyleEx(0, WS_EX_CONTEXTHELP);
return TRUE;
}
-alaks
-----------------------------------------------
Alaks Sevugan CSC CIS
Technical Consultant 115 North Neil Street
(217) 351-8250 (2161) Champaign, Illinois
asevugan@csci.csc.com 61820
-----------------------------------------------
-----From: Mats Manhav
On Dialog Propertys|Extended Styles select the Context Help toggle.
mats
--
==========================================================================
Mats Mеnhav (Mats Manhav for 7-bit people)
email:manhav@connectum.skurup.se WWW: http://connectum.skurup.se/~manhav
FAX: (int) 46 (0) 414 243 05 Phone: (int) 46 (0) 414 243 05
==========================================================================
-----From: Ashok Srinivasan
Hello,
You can specify it from the resource editor. Open your dialog's
properties window and then select the extended styles tab. You will see
a check box for context help. Checking this box will give you the ? in the
title bar.
Ashok
-----From: David Lowndes
Jeff,
Use ModifyStyleEx to add the WS_EX_CONTEXTHELP style flag
in the OnInitDialog handler.
Dave Lowndes
-----From: "Doug Brubacher"
Jeff,
You need an extended window style of:
WS_EX_CONTEXTHELP
One way to get this is to Over ride OnInitDialog and add
the line ModifyStyle(0, WS_EX_CONTEXTHELP ); as in
BOOL CAboutDlg::OnInitDialog()
{
CDialog::OnInitDialog();
ModifyStyle(0, WS_EX_CONTEXTHELP );
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
Regards,
Doug Brubacher
DouglasB@msn.com
-----From: "Smith, Brad P. (Exchange)"
Take a look at the KnowledgeBase articles Q141724 ("SAMPLE:
Context-Sensitive Help in a CDialog Object") and Q149343 ("How to
Implement Context-Sensitive Help for Dialog Controls").
Between the two articles, you'll find pretty much all the info you'll
need to implement correctly. Coincidentally, I just happen to be working
on this very issue. :-)
Brad.
--
Brad P. Smith - Software Designer
Cognos Inc.; 3755 Riverside Dr.; Ottawa, Ontario, CANADA; K1G 4K9
Voice: (613) 738-1440 ext 3702 FAX: (613) 738-0002
Internet: smithb@bpsmicro.com or smithb@cognos.com
| Вернуться в корень Архива
|