11.04.2014 Views

Advanced MFC Programming

Advanced MFC Programming

Advanced MFC Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 16. Context Sensitive Help<br />

Figure 16-4. Create a footnote in Microsoft Word<br />

Tag “help_test_A” can be referenced either from other footnote pages or from the application. If we<br />

want to let the user jump from one help item to another (for example, when viewing help on “telp_test_A”,<br />

the user may want to jump to footnote “help_test_B” by clicking on a link within the same page), we need<br />

to implement links by editing the “.rtf” file.<br />

Suppose we have added four footnotes for the newly implemented commands: “help_test_A”,<br />

“help_test_B”, “help_test_C”, and “help_test_D”, and we want to add links to the rest of three commands<br />

within each footnote page. For example, help item “help_test_A” may be implemented as illustrated in<br />

Figure 16-5:<br />

Figure 16-5. Help page for command ID_HELPTEST_TESTA<br />

Under “See Also” statement, there are three links that will direct mouse clicking to footnotes<br />

“help_test_B”, “help_test_C” and “help_test_D”.<br />

To create this type of links, we need to use special font format. We need to use double underline style<br />

to format the text that will be linked to a footnote (By doing this, the text formatted with double underline<br />

can respond to mouse clicking and bringing up another help item). Following the underlined text, we need<br />

to place the footnote tag using “Hidden” font style. To let the hidden text be displayed in the Word editor,<br />

we can execute command Tools | Options… and click tab View on the popped up property sheet. Then<br />

within “Nonprinting Characters” section, check “Hidden Text” check box.<br />

Now we can make a link very easily. First we need to type in and format the text as illustrated in<br />

Figure 16-6:<br />

Figure 16-6. Create link within a help item<br />

To format text using double underline, we can select the text, then execute command Format |<br />

Font…. From the popped up property sheet, we can go to “Font” page and select “Double” form<br />

“Underline” combo box. By doing this, the selected text will be double underlined. To format text using<br />

“Hidden Text” style, we can first select the text, then execute command Format | Font…, go to “Font”<br />

484

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!