LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 11 Dec 2003 11:02:04 -0500
Reply-To:     "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Subject:      Re: SAS/AF Windows Contextual Help

"Francesco" <f_marelli@hotmail.com> wrote in message news:7a61aa40.0312090751.9770e74@posting.google.com... > Hi... I'm having a problem using SAS/AF 8.2 under MS Windows (2000). > > I have created and compiled a Windows help file, named downApp.chm. I > have set the helploc option in the config file and set downApp.chm as > the default help file for my application (help attribute of _frame_ is > helploc://downApp.chm). This works fine and if I press F1 or invoke > the _help() method of _frame_ the help file displays correctly... > > The application contains various objects, 2 of them being table > viewers; I use these for extended selection. Each table viewer has its > own page in downApp.chm, so I would like to display this by using the > contextual help of the frame. I set the help attribute of one of the > table viewers to helploc://downApp.chm::/uwFields.htm and the _frame_ > attribute showContextHelp to Yes. In run mode this creates a button > with a question mark, so that if I click the button and then the table > viewer, I'd like to see helploc://downApp.chm::/uwFields.htm, but > nothing happens... not even error message or anything else. > > Has anyone done this before? Can anyone help, please? > > Thanks in advance for your help, Francesco

SAS stuff: The 'What's this' question mark icon appears in the title bar only when the frame .type is dialog, if frame.type is 'Standard', there is no icon, however F1 will open the chm _and_ the what's this mouse cursor will activate. I don't really understand the bifurcation to dialog and normal windows, probably some MS thing rooted back to win1.0. (According to some 'standard' dialogs are not resizable, which is a real pain in the a**; especially when the dialog is designed for 640x480 and I run at 1600x1200)

For dialogs, I've found that if the chm file in question is not found, there will be no obvious warning. All you get is 'ERROR: No help is available.' in the status bar of the SAS session window. Nothing in the log, no annoying can't find dialog. Note: sometimes the message portion of the status bar is 'hidden' due to the current directory portion of the status bar being all the way to the left. Drag the splitter to the right if the directory name is way off to the left.

For standard, I found that ERROR: No help is available appears in the log when .help is non-existent.

I'm not sure how SAS kicks off the chm file... does it fork off a 'hh.exe <value-of-object.help>' ? does it use winapi implicitly ? (we certainly could use winapi explicitly via SASCBTBL and MODULEN as a very last resort)

Consider the chm c:\temp\new folder\help.chm containing three pages index.html listbox1.html textentry1.html

From the windows command prompt this command will open a specific page > hh mk:@MSITStore:c:\temp\new folder\help.chm::/Listbox1.html note that you can replace spaces in the chm filename with %20 if you want.

This is nice, but if you execute multiple HH's from in a SAS session you get multiple help windows. So it seems you really need to use HWND WINAPI HtmlHelp(HWND hwndCaller, LPCTSTR pszFile, UINT uCommand, DWORD_PTR dwData) where hwndCaller is the HWND of calling window pszFile is the CHM file name uCommand is equal to HH_DISPLAY_TEXT_POPUP dwData is the address of a HH_POPUP structure we will use to give the ActiveX the parameters it needs to display the text we want. (copied from http://www.codeproject.com/winhelp/cshelp.asp)

Going back to .help helploc://Help.chm works

helploc://Help.chm::/listbox1.html does not work, I do get a htmlhelp window, but it has yadayada about This page cannot be displayed.

What does work ? How about .help set to mk:@MSITStore:c:\temp\new folder\help.chm::/Listbox1.html Yup, it works... well sort of. The page appears in the default browser, the same as if you ran: iexplore mk:@MSITStore:c:\temp\new folder\help.chm::/Listbox1.html , not in a htmlhelp managed window; and you get one window per help invocation. Not good.

You could fall back to WinHelp if you want to simply display a context pop up (as opposed to a web based help). And your own 'context help' icon in the upper right of the frame, override the onClick of things having contextual help, in override check if context help is active and if so, perform a WinHelp ('HELP_CONTEXTPOPUP', 'myHelpFile.hlp', <context-number-of-the-help-topic-in-the-help-file>)

WinHelp() is documented in publication SAS Companion for Windows.

data _null_; msg = WinHelp("HELP_HELPONHELP"); run;

WinHelp will not open CHMs. Hey SAS, where is the HtmlHelp() function ?

a very long url http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/hwHTMLHelpFrequentlyAskedQuestions.asp

If it ever does work as it should, the problem is most likely in the construct of the .help value. It's just that the obvious constructs ain't working as expected.

-- Richard A. DeVenezia http://www.devenezia.com


Back to: Top of message | Previous page | Main SAS-L page