Visit Gigasoft's Web Site
 ProEssentials v9 Help

PEgethelpcontext

DWORD PEgethelpcontext (hWnd)

 

HWND 

hWnd

Handle of window to get context for.

 

This function returns the help-context assigned to the window identified by hWnd.

 

Returns

Zero if the window identified by hWnd is not a child of a ProEssentials based dialog, otherwise the help-context to be used with "PEGRAPHS.HLP".

 

Example

In response to the F1 key being pressed.

 

DWORD  wHelpID;

HWND hWnd;

 

/* get window with current focus */

hWnd = GetFocus();

 

/* check to see if it is a ProEssentials Object */

wHelpID = PEgethelpcontext (hWnd);

 

if (wHelpID)

{

 WinHelp(hMainFrame, "pegraphs.hlp", HELP_CONTEXT, wHelpID);

}

else

{

 /* a non-ProEssentials controls has the focus */

}

 

Comments

Visual Basic and Delphi developers note that HWND is really an integer in 16 bit and a long integer in 32 bit. GetFocus and WinHelp are Windows API calls. Refer to your Visual Basic and Delphi documentation on calling Windows functions. These environments usually offer a different method of calling WinHelp so also search for WinHelp.