═══ 1. Extended Help for PM Draw ═══ The PM Draw program is a graphics program that allows you to create and edit OS/2 Presentation Manager bitmaps. There are two primary modes of operation: graphics mode and text mode. Graphics Mode The graphics mode of operation is in effect whenever the Text Mode option in the Options menu is not selected. In this mode, you can create graphics images using both the keyboard and mouse interfaces. PM Draw provides two types of graphics items: curves and solid figures. Curves are single-line graphics such as straight lines, circular arcs, parabolic curves, Bezier splines, and fillets. Solid figures consist of such items as pentagons, hexagons, circles, ellipses, hearts, and stars. There are also three graphics items which can behave as either curves or solid figures: rectangles, diamonds and triangles. The behavior of these items is determined by the Fill Solid Figures option in the Options menu. Whenever an item is created while in the graphics mode, it is automatically saved in a memory bitmap, which maintains an image of the screen workspace. If item chain construction is enabled, the item is also saved in the item chain. Note: Any text characters entered while in the graphics mode are ignored. Text Mode The text mode of operation is in effect whenever the Text Mode option in the Options menu is selected. In this mode, you can create both graphics and character images, using the mouse interface for graphics items and the keyboard interface for character items. While in text mode, you can set the current font in two ways: use one of the currently loaded fonts (Available Fonts in the Options menu), or create a new font based on one of the currently loaded fonts (Create Font in the Options menu). The second method allows you to add such features as italics, underscore, and strike-out to your font. ═══ 2. Menus ═══ Provides help for the individual menus and submenus available for the PM Draw program. ═══ 2.1. Help for 'File' Menu ═══ Use these choices to perform operations which affect the current bitmap file in memory. New Erase the current bitmap from memory and start a new one. Open Load a bitmap from a file. Save Save the current bitmap to a file, using the current file name. Save As Save the current bitmap to a file, using a new file name. Bitcount 1 Set bits-per-pel count to 1 (Monochrome bitmaps). Bitcount 4 Set bits-per-pel count to 4 (16-color bitmaps). Bitcount 8 Set bits-per-pel count to 8 (256-color bitmaps). Bitcount 24 Set bits-per-pel count to 24 (Full-color bitmaps). About Display release information for PM Draw. ═══ 2.1.1. Help for 'New' ═══ Use this choice to create a new bitmap, specifying a name for the bitmap file. This brings up a simple dialog box containing a prompt string ("File Name:"), an entry field, and two pushbuttons ("Enter" and "Cancel"). If "Enter" is selected, the screen is cleared and a new bitmap is created. "Cancel" restores the bitmap to its previous state. ═══ 2.1.2. Help for 'Open' ═══ Use this choice to load a bitmap file into the work space. This brings up a dialog box containing an entry field for the file search template, a list box for all files in the current or selected directory which match the search template, a list box for all drives and directories available from the current or selected directory, and two pushbuttons ("Enter" and "Cancel"). The file search template is initialized to find all bitmap files with the default file extension ("*.bmp"). Note: Any changes made to the search template or directory selection will be saved between calls to this dialog. ═══ 2.1.3. Help for 'Save' ═══ Use this choice to save the bitmap in the work space to a file, using the current file name. If there is no file name associated with the current bitmap, then a dialog appears prompting for one. ═══ 2.1.4. Help for 'Save As' ═══ Use this choice to save the bitmap in the work space to a file, using a new file name. If there is a file name associated with the current bitmap, the dialog appears with the current file name in the name entry field. ═══ 2.1.5. Help for 'Bitcount 1' ═══ Use this choice to set the current bitmap to a monochrome format, consisting of 1 bit per pel and 1 color plane. In this format, the bitmap color data consists of 2 values, which map to the RGB color information for each pel. ═══ 2.1.6. Help for 'Bitcount 4' ═══ Use this choice to set the current bitmap to a 16-color format, consisting of 4 bits per pel and 1 color plane. In this format, the bitmap color data consists of 16 values, which map to the RGB color information for each pel. ═══ 2.1.7. Help for 'Bitcount 8' ═══ Use this choice to set the current bitmap to a 256-color format, consisting of 8 bits per pel and 1 color plane. In this format, the bitmap color data consists of 256 values, which map to the RGB color information for each pel. ═══ 2.1.8. Help for 'Bitcount 24' ═══ Use this choice to set the current bitmap to a full color format, consisting of 24 bits per pel and 1 color plane. In this format, the bitmap color data contains no values, since the full RGB color information is contained in the bits for each pel. ═══ 2.1.9. Help for 'About' ═══ Use this choice to see information relating to the current release of the PM Draw program. Selecting this option displays a small message box containing the name of the program, the version level, and the copyright notice for the program. ═══ 2.2. Help for 'Edit' Menu ═══ Use this choice for information of the 'Edit' menu. ═══ 2.3. Help for 'Options' Menu ═══ Use this choice for information of the 'Options' menu. ═══ 2.4. Help for 'Graphics' Menu ═══ Use these choices to set the current graphics drawing mode for the PM Draw program. Curves Provides a list of single-line graphics drawing modes, including lines and curves. Figures Provides a list of solid graphics drawing items, including circles, stars, pentagons, hexagons, and hearts. Special Provides a list of special graphics drawing modes, whose behavior depends on the state of the Fill Solid Figures flag in the Options menu. ═══ 2.4.1. Help for 'Curves' Submenu ═══ Use this choice for information of the 'Curves' menu. ═══ 2.4.2. Help for 'Figures' Submenu ═══ Use this choice for information of the 'Figures' menu. ═══ 2.4.3. Help for 'Special' Submenu ═══ Use this choice for information of the 'Special' menu. ═══ 2.5. Help for 'Colors' Menu ═══ Use these choices to set the foreground and background color values for text and graphics drawing. Pre-defined Provides a list of pre-defined color values for quick selection of the foreground drawing color. Gray-scale Provides a list of monochrome color values, including black, white, and two shades of gray. RGB Initiates a dialog which allows you to set the exact foreground color by selecting indices for red, green and blue intensity. Background Provides a list of pre-defined color values for the background drawing color. This value only has meaning when drawing text. ═══ 2.6. Help for 'Exit' Menu ═══ Use these choices to exit the program or return to the graphics creation environment. Exit PM Draw Terminate the program. Resume Return to graphics creation (do nothing). ═══ 2.6.1. Help for 'Exit PM Draw' ═══ Use this choice to end a PM Draw graphics session. If the image has been modified since the last file save, a confirmation box is presented before program termination. ═══ 2.6.2. Help for 'Resume' ═══ Use this choice to return to the PM Draw program without any alterations to the graphics creation environment. Selecting this option causes the program to behave as if you did not do anything (it has no effect). ═══ 2.7. Help for 'Help' Menu ═══ Use these choices to find out how to use help, to get extended help, to go to a list of keys, or to go to the help index. Help for help Provides detailed information on the kinds of help available and how to use help. Extended help Displays general help. Keys help Displays a list of keys. Help index Displays the help index. ═══ 2.7.1. Help for 'Help for Help' ═══ Use this choice to obtain information on how to use the Help facility. ═══ 2.7.2. Help for 'Extended Help' ═══ Use this choice to obtain general information on the tasks you can perform while you are viewing a help window. ═══ 2.7.3. Help for 'Keys Help' ═══ Use this choice to see a list of keys and a description of the function of the keys. ═══ 2.7.4. Help for 'Help Index' ═══ Use this choice to display the help index. The help index lists the titles of the help information that is available. ═══ 3. Keyboard Accelerators ═══ The list of keys is arranged in groups. ACCELERATOR KEYS Ctrl+b Start/Stop building item chain Ctrl+f Toggle solid figure fill Ctrl+k Toggle click position marking Ctrl+x Toggle graphics/text mode Shift+F2 Restore bitmap from memory Alt+a Set circular arc drawing mode Alt+c Set solid circle drawing mode Alt+d Set diamond drawing mode Alt+e Erase entire bitmap Alt+f Draw a fillet curve Alt+h Set solid heart drawing mode Alt+i Set solid ellipse drawing mode Alt+l Set straight line drawing mode Alt+n Draw a Bezier spline curve Alt+p Set solid pentagon drawing mode Alt+r Set rectangle drawing mode Alt+t Set triangle drawing mode Alt+v Set parabolic curve drawing mode Alt+x Set solid hexagon drawing mode Alt+1 Erase Quadrant I (upper-right corner of bitmap) Alt+2 Erase Quadrant II (upper-left corner of bitmap) Alt+3 Erase Quadrant III (lower-left corner of bitmap) Alt+4 Erase Quadrant IV (lower-right corner of bitmap) Alt+5 Set solid 5-pointed star drawing mode Alt+6 Set solid 6-pointed star drawing mode Alt+7 Set solid 7-pointed star drawing mode Alt+8 Set solid 8-pointed star drawing mode Alt+9 Set solid 9-pointed star drawing mode Alt+F2 Draw the item chain in the bitmap Alt+F3 Save the current bitmap to a file F3 Exit program F12 Select foreground color CLIPBOARD KEYS Ctrl+Ins Copy selected area to clipboard Shift+Ins Paste bitmap image from clipboard Shift+Del Cut selected area to clipboard Del Clear selected area HELP KEYS F1 Get help F2 Get extended help (from within any help window) Alt+F4 End help F9 Go to a list of keys (from within any help window) F11 Go to the help index (from within any help window) Esc Previous Help Panel, or End help if only one panel Alt+F6 Go to/from help and programs Shift+F10 Get help for help SYSTEM KEYS Alt+F6 Switch to the next windowed program Alt+Esc Switch to the next program, including full-screen programs Ctrl+Esc Switch to the Task List WINDOW KEYS F3 Close a window F10 Go to/from the action bar Arrow keys Move among choices End Go to the last choice in a pull-down Esc Cancel a pull-down or the system menu Home Go to the first choice in a pull-down PgUp Scroll the contents of the window up one page PgDn Scroll the contents of the window down one page Underlined letter Move among the choices on the action bar and pull-downs Alt+F10 Go to/from the action bar Alt+F4 or F3 Close the window Alt+F5 Restore the window Alt+F7 Move the window Alt+F8 Size the window Alt+F9 Minimize the window Alt+F10 Maximize the window Ctrl+PgDn or Shift+F8 Scroll the contents of the window right one page Ctrl+PgUp or Shift+F7 Scroll the contents of the window left one page Shift+Esc or Alt+Spacebar Go to/from the system menu Shift+Esc or Alt Go to/from the system menu of a text window ═══ 4. File Load Dialog (PMDRWFIL.DLL) ═══ The dialog which is used by the PM Draw program to retrieve a file name can also be used by other applications, if the proper functions are called at the proper time. There are three functions which must be used by your program: PSZ APIENTRY InitFileOpenDlg( /* initialization routine */ PHAB phab, /* ptr to anchor block handle */ PHWND phwnd, /* ptr to main window handle */ PSZ szTitle, /* dialog window title */ PSZ szMask ); /* search string mask */ MRESULT EXPENTRY FileOpenDlg( /* dialog window procedure */ HWND hwndDlg, /* dialog window handle */ USHORT msg, /* dialog window message */ MPARAM mp1, /* message parameter 1 */ MPARAM mp2 ); /* message parameter 2 */ VOID APIENTRY TermFileOpenDlg(VOID); /* termination routine */ InitFileOpenDlg The InitFileOpenDlg function should be called during your program's WM_CREATE processing, to ensure that it will only be called once for each invocation of your program. The returned pointer gives you acces to a string buffer in the dialog window dynamic link library's data segment, which will contain the fully qualified file name which was selected through the dialog. This is how it is called in the main window routine for PM Draw: case WM_CREATE: :: :: szFileOpenString = InitFileOpenDlg(&hab, &hwnd, "File", "*.bmp"); :: :: FileOpenDlg The FileOpenDlg function is used when the file open dialog window is invoked. Since the dialog window is entirely self-contained, the handle to the PMDRWFIL.DLL dynamic link library must be given at invocation time, as in the following: case WM_CREATE: :: :: DosLoadModule((PSZ)0, 0, "PMDRWFIL", &hmodFileOpen); :: :: case WM_COMMAND: :: :: if (WinDlgBox(HWND_DESKTOP, hwndFrame, FileOpenDlg, hmodFileOpen, 1000, (PVOID)0) != DID_CANCEL ) load_file(szFileOpenString); :: :: TermFileOpenDlg The TermFileOpenDlg function should be called during your program's WM_DESTROY processing, to ensure that it will only be called once for each invocation of your program. It releases storage which was allocated during the initialization routine processing.