DOCUMENT:Q238030 04-MAY-2001 [visualc] TITLE :HOWTO: Create HTML Help for MFC Application on WinCE PRODUCT :Microsoft C Compiler PROD/VER:winnt: OPER/SYS: KEYWORDS:kbCSHelp kbHTMLHelp kbOSWinCEsearch kbGrpDSMFCATL ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - The Microsoft Foundation Classes (MFC), included with: - Microsoft Visual C++ for Windows CE, version 2.0 ------------------------------------------------------------------------------- SUMMARY ======= In applications supporting Windows Help, the users can tap the Help menu or tap the Help button (?) on the command bar or press F1 on the keyboard to access the Help files. Note that F1 might not be supported on some Windows CE-based devices. Because screen space is crucial, Palm-size PCs do not enable the Help button on your applications. Instead, you can access Help files through the Help menu item. A Palm-size PC sends a WM_HELP message to the current application when the Help menu item is selected. In H/PC and H/PC Pro-based applications, the most common way to access the Help file is through the Help button (?) on the command bar. In the Windows CE operating system, the identifier is ID_HELP, the message handler is CWnd::OnHelp, and it sends WM_COMMAND and ID_HELP messages. Help for Windows CE, also known as PegHelp, lets users access your HTML Help files. MORE INFORMATION ================ 1. Create a default Windows CE MFC AppWizard (.exe) called Sample. At step 2 of 4 select the Windows Help check box. This step enables the Help button (?) on the command bar. The rest of the AppWizard steps can be the default ones. 2. At this point if you build and run the sample application and click the Help button (?) (that is the button next to the Close (X) button), it brings up a message box titled Sample.htp containing just the word, Help. From the Help menu item, if you choose Help Topics, it bring ups a the dialog box, Cannot open help file, and the Help file viewer (PegHelp) is running in the background. 3. To create the Help files, create each topic as a text file with a .htp extension. Create your contents page as a text file also, but save it with a .htc extension. The difference between the two is that you can traverse back from the topic to the contents page. The Soltr sample Help file demonstrates the unique tags and structure of a Help for Windows CE file. Refer to the "References" section of this article for additional information. 4. Create a sample Help file. Add a new text file to the project workspace called Sample.htc. This is the Contents Page of the Help. Add the following code to it: