Programming with Microsoft Visual C++.NET 6ed [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Programming with Microsoft Visual C++.NET 6ed [Electronic resources] - نسخه متنی

George Shepherd, David Kruglinski

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید








A Help Example with No Programming Required


Chapter 18, you selected the MFC Application Wizard's Context-Sensitive Help option. We'll now use that example to explore the application framework's built-in help capability. You'll see how easy it is to link help topics to menu command IDs and frame window resource IDs. We'll edit RTF files, not CPP files.

Here are the steps for customizing the help for Ex18d:



    Verify that the help file was built correctly. If you've built the Ex18d project, the help file was probably created correctly as part of the build process. Check this by running the application and then pressing the F1 key. You should see the generic Application Help screen with the title "Modifying the Document," as shown here:


    If you do not see this screen, the help file was not built correctly. You can rebuild it by rebuilding the entire solution. Rerun the Ex18d program, and press F1 again.



    Test the generic help file. Try the following experiments:



      Close the Help dialog box, press Alt+F, and then press F1. This should open the help topic for the File New command. You can also press F1 while holding down the mouse button on the File New command to see the same help topic.



      Close the Help dialog box, click the Context Help toolbar button and then choose Save from the File menu. You should get the appropriate help topic.



      Click the Context Help toolbar button again, and then select the frame window's title bar. You should get an explanation of a Windows title bar.



      Close all child windows and then press F1. You should see a main index page that is also an old-style table of contents.





    Change the application title. The file

    AfxCore.rtf , in the \vcppnet\Ex18d\hlp directory, contains the string <<YourApp>> throughout. Replace it globally with Ex18d.



    Change the Modifying The Document Help screen. The file

    AfxCore.rtf in the \vcppnet\Ex18d\hlp directory contains text for the generic Application Help screen. Search on Modifying the Document, and then change the text to something appropriate for the application. This topic has the help context ID HIDR_DOC1TYPE. The generated

    Ex18d.hpj file provides the alias HIDR_Ex18dTYPE.



    Add a topic for the New String Window and New Hex Window commands on the Window menu. The New String Window and New Hex Window commands were added to Ex18d, but without appropriate help text. Add a topic to

    AfxCore.rtf , as shown here.



    Be sure the # footnote that links the topic to the context ID uses HID_WINDOW_NEWSTRINGWINDOW and HID_WINDOW_NEWHEXWINDOW, as defined in hlp\

    Ex18d.hm . The program's command ID for the New String Window command is ID_WINDOW_NEWSTRINGWINDOW. The command ID for a new hex window is ID_WINDOW_NEWHEXWINDOW.



    Rebuild and test the application. Rebuild the entire application to synchronize the help files. Try the two new help links.




/ 319