From: Dirk B. <db...@us...> - 2005-12-24 11:59:37
|
Update of /cvsroot/win32forth/win32forth/doc/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12879/doc/classes Modified Files: Generic.htm Window.htm gdiBase.htm gdiPen.htm Added Files: gdiStruct.htm Log Message: More documentation added. Index: Generic.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/classes/Generic.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Generic.htm 17 Dec 2005 15:18:00 -0000 1.1 --- Generic.htm 24 Dec 2005 11:59:25 -0000 1.2 *************** *** 64,69 **** </p><pre><b><a name="0">:M Paint: ( -- ) </a></b></pre><p>force window repaint ! </p><pre><b><a name="0">:M SetAlign: ( flag id -- ) \ hold over from the past </a></b></pre><p>Obsolescent Method use SetDlgItemAlign: instead </p><pre><b><a name="0">;CLASS </a></b></pre><p>End of generic-window class --- 64,611 ---- </p><pre><b><a name="0">:M Paint: ( -- ) </a></b></pre><p>force window repaint ! </p><pre><b><a name="0">:M Show: ( state -- ) \ use words like SW_SHOWNORMAL ! </a></b></pre><p>The ShowWindow function sets the specified window's show state. <br /> ! Possible values for state are: ! </p><table border="1"><tr><td>SW_FORCEMINIMIZE ! </td> ! <td>Windows 2000: Minimizes a window, even if the thread that owns the window is hung. This flag should only be used when minimizing windows from a different thread. ! </td> ! </tr> ! <tr><td>SW_HIDE ! </td> ! <td>Hides the window and activates another window. ! </td> ! </tr> ! <tr><td>SW_MAXIMIZE ! </td> ! <td>Maximizes the specified window. ! </td> ! </tr> ! <tr><td>SW_MINIMIZE ! </td> ! <td>Minimizes the specified window and activates the next top-level window in the Z order. ! </td> ! </tr> ! <tr><td>SW_RESTORE ! </td> ! <td>Activates and displays the window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when restoring a minimized window. ! </td> ! </tr> ! <tr><td>SW_SHOW ! </td> ! <td>Activates the window and displays it in its current size and position. ! </td> ! </tr> ! <tr><td>SW_SHOWDEFAULT ! </td> ! <td>Sets the show state based on the SW_ value specified in the STARTUPINFO structure passed to the CreateProcess function by the program that started the application. ! </td> ! </tr> ! <tr><td>SW_SHOWMAXIMIZED ! </td> ! <td>Activates the window and displays it as a maximized window. ! </td> ! </tr> ! <tr><td>SW_SHOWMINIMIZED ! </td> ! <td>Activates the window and displays it as a minimized window. ! </td> ! </tr> ! <tr><td>SW_SHOWMINNOACTIVE ! </td> ! <td>Displays the window as a minimized window. This value is similar to SW_SHOWMINIMIZED, except the window is not activated. ! </td> ! </tr> ! <tr><td>SW_SHOWNA ! </td> ! <td>Displays the window in its current size and position. This value is similar to SW_SHOW, except the window is not activated. ! </td> ! </tr> ! <tr><td>SW_SHOWNOACTIVATE ! </td> ! <td>Displays a window in its most recent size and position. This value is similar to SW_SHOWNORMAL, except the window is not actived. ! </td> ! </tr> ! <tr><td>SW_SHOWNORMAL ! </td> ! <td>Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when displaying the window for the first time. ! </td> ! </tr> ! </table><pre><b><a name="0">:M GDIFlush: ( -- ) ! </a></b></pre><p>The GdiFlush function flushes the calling thread's current batch. ! </p><pre><b><a name="0">:M Update: ( -- ) ! </a></b></pre><p>The UpdateWindow function updates the client area of the window by sending ! a WM_PAINT message to the window if the window's update region is not empty. The ! function sends a WM_PAINT message directly to the window procedure of the window, ! bypassing the application queue. If the update region is empty, no message is sent. ! </p><pre><b><a name="0">:M Scroll: { x y -- } ! </a></b></pre><p>The ScrollWindow function scrolls the contents of the specified window's client area. ! </p><pre><b><a name="0">:M Move: { x y w h -- } ! </a></b></pre><p>The MoveWindow function changes the position and dimensions of window. ! For a top-level window, the position and dimensions are relative to the upper-left corner ! of the screen. For a child window, they are relative to the upper-left corner of the parent ! window's client area. ! </p><pre><b><a name="0">:M SetWindowPos: { x y -- } ! </a></b></pre><p>The SetWindowPos function changes the position of a child, pop-up, or top-level window. <br /> ! X Specifies the new position of the left side of the window, in client coordinates. <br /> ! Y Specifies the new position of the top of the window, in client coordinates. ! </p><pre><b><a name="0">:M SetMenu: ( MenuHandle -- ) ! </a></b></pre><p>The SetMenu function assigns a new menu to the window. ! If MenuHandle is NULL, the window's current menu is removed. ! </p><pre><b><a name="0">:M SetText: { addr len \ text$ -- } ! </a></b></pre><p>The SetWindowText function changes the text of the window's title bar (if it has one). ! If the window is a control, the text of the control is changed. ! </p><pre><b><a name="0">:M GetText: ( -- addr len ) ! </a></b></pre><p>The GetWindowText function copies the text of the window's title bar (if it has one) ! into a buffer. If the window is a control, the text of the control is copied. ! </p><pre><b><a name="0">:M SetTextAlign: ( flag -- ) ! </a></b></pre><p>Set the text-alignment for the window. <br /> ! The current position is updated after each text output call. ! The current position is used as the reference point. ! Possible values for flag are: ! </p><table border="1"><tr><td>0 ! </td> ! <td>The reference point will be on the left edge of the bounding rectangle. ! </td> ! </tr> ! <tr><td>1 ! </td> ! <td>The reference point will be on the right edge of the bounding rectangle. ! </td> ! </tr> ! <tr><td>2 ! </td> ! <td>The reference point will be aligned horizontally with the center of the bounding rectangle. ! </td> ! </tr> ! </table><pre><b><a name="0">:M GetDC: ( -- hdc ) ! </a></b></pre><p>The GetDC function retrieves a handle to a display device context (DC) ! for the client area of the window. <br /> ! You have to call ReleaseDC when the DC isn't needed any longer. ! </p><pre><b><a name="0">:M GetWindowDC: ( -- hdc ) ! </a></b></pre><p>The GetWindowDC function retrieves the device context (DC) for the entire ! window, including title bar, menus, and scroll bars. A window device context ! permits painting anywhere in a window, because the origin of the device context ! is the upper-left corner of the window instead of the client area. <br /> ! GetWindowDC assigns default attributes to the window device context each time it ! retrieves the device context. Previous attributes are lost. <br /> ! You have to call ReleaseDC when the DC isn't needed any longer. ! </p><pre><b><a name="0">:M ReleaseDC: ( hdc -- ) ! </a></b></pre><p>The ReleaseDC function releases the device context (DC) of the window. <br /> ! Call only after GetDC or GetWindowDC. ! </p><pre><b><a name="0">:M BeginPaint: ( ps -- hdc ) ! </a></b></pre><p>The BeginPaint function prepares the window for painting and fills a ! PAINTSTRUCT (ps) structure with information about the painting. ! </p><pre><b><a name="0">:M EndPaint: ( ps -- ) ! </a></b></pre><p>The EndPaint function marks the end of painting in the window. This function is ! required for each call to the BeginPaint function, but only after painting is complete. ! </p><pre><b><a name="0">:M GetClientRect: ( rect -- ) ! </a></b></pre><p>The GetClientRect function retrieves the coordinates of the window's client area. The ! client coordinates specify the upper-left and lower-right corners of the client area. ! Because client coordinates are relative to the upper-left corner of a window's client ! area, the coordinates of the upper-left corner are (0,0). ! </p><pre><b><a name="0">:M GetWindowLong: ( index -- value ) ! </a></b></pre><p>The GetWindowLong function retrieves information about the window. The function ! also retrieves the 32-bit (long) value at the specified offset into the extra ! window memory. <br /> ! Index Specifies the zero-based offset to the value to be retrieved. Valid values are ! in the range zero through the number of bytes of extra window memory, minus four; for ! example, if you specified 12 or more bytes of extra memory, a value of 8 would be an ! index to the third 32-bit integer. To retrieve any other value, specify one of the ! following values. ! </p><table border="1"><tr><td>GWL_EXSTYLE ! </td> ! <td>Retrieves the extended window styles. For more information, see CreateWindowEx. ! </td> ! </tr> ! <tr><td>GWL_STYLE ! </td> ! <td>Retrieves the window styles. ! </td> ! </tr> ! <tr><td>GWL_WNDPROC ! </td> ! <td>Retrieves the address of the window procedure, or a handle representing the address of the window procedure. You must use the CallWindowProc function to call the window procedure. ! </td> ! </tr> ! <tr><td>GWL_HINSTANCE ! </td> ! <td>Retrieves a handle to the application instance. ! </td> ! </tr> ! <tr><td>GWL_HWNDPARENT ! </td> ! <td>Retrieves a handle to the parent window, if any. ! </td> ! </tr> ! <tr><td>GWL_ID ! </td> ! <td>Retrieves the identifier of the window. ! </td> ! </tr> ! <tr><td>GWL_USERDATA ! </td> ! <td>Retrieves the 32-bit value associated with the window. Each window has a corresponding 32-bit value intended for use by the application that created the window. This value is initially zero. ! </td> ! </tr> ! </table><pre><b><a name="0">:M SetWindowLong: ( value index -- oldval ) ! </a></b></pre><p>The SetWindowLong function changes an attribute of the window. The function also sets the ! 32-bit (long) value at the specified offset into the extra window memory. ! </p><table border="1"><tr><td>GWL_EXSTYLE ! </td> ! <td>Sets a new extended window style. For more information, see CreateWindowEx. ! </td> ! </tr> ! <tr><td>GWL_STYLE ! </td> ! <td>Sets a new window style. ! </td> ! </tr> ! <tr><td>GWL_WNDPROC ! </td> ! <td>Sets a new address for the window procedure. Windows NT/2000: You cannot change this attribute if the window does not belong to the same process as the calling thread. ! </td> ! </tr> ! <tr><td>GWL_HINSTANCE ! </td> ! <td>Sets a new application instance handle. ! </td> ! </tr> ! <tr><td>GWL_ID ! </td> ! <td>Sets a new identifier of the window. ! </td> ! </tr> ! <tr><td>GWL_USERDATA ! </td> ! <td>Sets the 32-bit value associated with the window. Each window has a corresponding 32-bit value intended for use by the application that created the window. This value is initially zero. ! </td> ! </tr> ! </table><pre><b><a name="0">:M GetStyle: ( -- style ) ! </a></b></pre><p>Retrieves the window styles. ! </p><pre><b><a name="0">:M SetStyle: ( style -- ) ! </a></b></pre><p>Sets a new window style. ! </p><pre><b><a name="0">:M +Style: ( style -- ) ! </a></b></pre><p>Add a window style. ! </p><pre><b><a name="0">:M -Style: ( style -- ) ! </a></b></pre><p>Remove a window style. ! </p><pre><b><a name="0">:M SetFocus: ( -- ) ! </a></b></pre><p>The SetFocus function sets the keyboard focus to the window. The window must be ! attached to the calling thread's message queue. ! </p><pre><b><a name="0">:M SetForegroundWindow: ( -- ) ! </a></b></pre><p>The SetForegroundWindow function puts the thread that created the specified window ! into the foreground and activates the window. Keyboard input is directed to the window, ! and various visual cues are changed for the user. The system assigns a slightly higher ! priority to the thread that created the foreground window than it does to other threads. <br /> ! The foreground window is the window at the top of the Z order. It is the window that the ! user is working with. In a preemptive multitasking environment, you should generally let the ! user control which window is the foreground window. }n ! Windows 98, Windows 2000: The system restricts which processes can set the foreground window. ! A process can set the foreground window only if one of the following conditions is true: <br /> ! - The process is the foreground process. <br /> ! - The process was started by the foreground process. <br /> ! - The process received the last input event. <br /> ! - There is no foreground process. <br /> ! - The foreground process is being debugged. <br /> ! - The foreground is not locked (see LockSetForegroundWindow). <br /> ! - The foreground lock time-out has expired (see SPI_GETFOREGROUNDLOCKTIMEOUT in SystemParametersInfo). <br /> ! - Windows 2000: No menus are active. <br /> ! With this change, an application cannot force a window to the foreground while the user is ! working with another window. Instead, SetForegroundWindow will activate the window (see SetActiveWindow) ! and call the FlashWindowEx function to notify the user. For more information, see Foreground and ! Background Windows. <br /> ! A process that can set the foreground window can enable another process to set the foreground window by ! calling the AllowSetForegroundWindow function. The process specified by dwProcessId loses the ability to ! set the foreground window the next time the user generates input, unless the input is directed at that ! process, or the next time a process calls AllowSetForegroundWindow, unless that process is specified. <br /> ! The foreground process can disable calls to SetForegroundWindow by calling the LockSetForegroundWindow function. ! </p><pre><b><a name="0">:M SetActiveWindow: ( -- ) ! </a></b></pre><p>The SetActiveWindow function activates a window. The window must be attached to the calling thread's message queue. <br /> ! The SetActiveWindow function activates a window, but not if the application is in the background. The window will be ! brought into the foreground (top of Z order) if its application is in the foreground when the system activates the window. <br /> ! If the window identified by the hWnd parameter was created by the calling thread, the active window status of the calling ! thread is set to hWnd. Otherwise, the active window status of the calling thread is set to NULL. <br /> ! By using the AttachThreadInput function, a thread can attach its input processing to another thread. ! This allows a thread to call SetActiveWindow to activate a window attached to another thread's message queue. ! </p><pre><b><a name="0">:M MessageBox: ( szText szTitle style -- result ) ! </a></b></pre><p>The MessageBox function creates, displays, and operates a message box. The message box contains an ! application-defined message and title, plus any combination of predefined icons and push buttons. ! </p><table border="1"><tr><td>szText ! </td> ! <td>Pointer to a null-terminated string that contains the message to be displayed. \ ! </td> ! </tr> ! <tr><td>szTitle ! </td> ! <td>Pointer to a null-terminated string that contains the dialog box title. If this parameter is NULL, the default title Error is used. \ ! </td> ! </tr> ! <tr><td>Type ! </td> ! <td>Specifies the contents and behavior of the dialog box. This parameter can be a combination of flags from the following groups of flags ! </td> ! </tr> ! </table><p>To indicate the buttons displayed in the message box, specify one of the following values. ! </p><table border="1"><tr><td>MB_ABORTRETRYIGNORE ! </td> ! <td>The message box contains three push buttons: Abort, Retry, and Ignore. ! </td> ! </tr> ! <tr><td>MB_CANCELTRYCONTINUE ! </td> ! <td>Windows 2000: The message box contains three push buttons: Cancel, Try Again, Continue. Use this message box type instead of MB_ABORTRETRYIGNORE. ! </td> ! </tr> ! <tr><td>MB_HELP ! </td> ! <td>Adds a Help button to the message box. When the user clicks the Help button or presses F1, the system sends a WM_HELP message to the owner. ! </td> ! </tr> ! <tr><td>MB_OK ! </td> ! <td>The message box contains one push button: OK. This is the default. ! </td> ! </tr> ! <tr><td>MB_OKCANCEL ! </td> ! <td>The message box contains two push buttons: OK and Cancel. ! </td> ! </tr> ! <tr><td>MB_RETRYCANCEL ! </td> ! <td>The message box contains two push buttons: Retry and Cancel. ! </td> ! </tr> ! <tr><td>MB_YESNO ! </td> ! <td>The message box contains two push buttons: Yes and No. ! </td> ! </tr> ! <tr><td>MB_YESNOCANCEL ! </td> ! <td>The message box contains three push buttons: Yes, No, and Cancel. ! </td> ! </tr> ! </table><p>To display an icon in the message box, specify one of the following values. ! </p><table border="1"><tr><td>MB_ICONEXCLAMATION, MB_ICONWARNING ! </td> ! <td>An exclamation-point icon appears in the message box. ! </td> ! </tr> ! <tr><td>MB_ICONINFORMATION, MB_ICONASTERISK ! </td> ! <td>An icon consisting of a lowercase letter i in a circle appears in the message box. ! </td> ! </tr> ! <tr><td>MB_ICONQUESTION ! </td> ! <td>A question-mark icon appears in the message box. ! </td> ! </tr> ! <tr><td>MB_ICONSTOP, MB_ICONERROR, MB_ICONHAND ! </td> ! <td>A stop-sign icon appears in the message box. ! </td> ! </tr> ! </table><p>To indicate the default button, specify one of the following values. ! </p><table border="1"><tr><td>MB_DEFBUTTON1 ! </td> ! <td>The first button is the default button. MB_DEFBUTTON1 is the default unless MB_DEFBUTTON2, MB_DEFBUTTON3, or MB_DEFBUTTON4 is specified ! </td> ! </tr> ! <tr><td>MB_DEFBUTTON2 ! </td> ! <td>The second button is the default button. ! </td> ! </tr> ! <tr><td>MB_DEFBUTTON3 ! </td> ! <td>The third button is the default button. ! </td> ! </tr> ! <tr><td>MB_DEFBUTTON4 ! </td> ! <td>The fourth button is the default button. ! </td> ! </tr> ! </table><p>To specify other options, use one or more of the following values. ! </p><table border="1"><tr><td>MB_RIGHT ! </td> ! <td>The text is right-justified. ! </td> ! </tr> ! <tr><td>MB_SETFOREGROUND ! </td> ! <td>The message box becomes the foreground window. Internally, the system calls the SetForegroundWindow function for the message box. ! </td> ! </tr> ! <tr><td>MB_TOPMOST ! </td> ! <td>The message box is created with the WS_EX_TOPMOST window style. ! </td> ! </tr> ! </table><p>If the function succeeds, the return value is one of the following menu-item values. ! </p><table border="1"><tr><td>IDABORT ! </td> ! <td>Abort button was selected. ! </td> ! </tr> ! <tr><td>IDCANCEL ! </td> ! <td>Cancel button was selected. ! </td> ! </tr> ! <tr><td>IDCONTINUE ! </td> ! <td>Continue button was selected. ! </td> ! </tr> ! <tr><td>IDIGNORE ! </td> ! <td>Ignore button was selected. ! </td> ! </tr> ! <tr><td>IDNO No ! </td> ! <td>button was selected. ! </td> ! </tr> ! <tr><td>IDOK OK ! </td> ! <td>button was selected. ! </td> ! </tr> ! <tr><td>IDRETRY ! </td> ! <td>Retry button was selected. ! </td> ! </tr> ! <tr><td>IDTRYAGAIN ! </td> ! <td>Try Again button was selected. ! </td> ! </tr> ! <tr><td>IDYES ! </td> ! <td>Yes button was selected. ! </td> ! </tr> ! </table><pre><b><a name="0">:M InvalidateRect: ( bgflag rectangle -- ) ! </a></b></pre><p>The InvalidateRect function adds a rectangle to the window's update region. ! The update region represents the portion of the window's client area that must be redrawn. ! </p><table border="1"><tr><td>lpRect ! </td> ! <td>Pointer to a RECT structure that contains the client coordinates of the rectangle to be added to the update region. If this parameter is NULL, the entire client area is added to the update region. ! </td> ! </tr> ! <tr><td>bErase ! </td> ! <td>Specifies whether the background within the update region is to be erased when the update region is processed. If this parameter is TRUE, the background is erased when the BeginPaint function is called. If this parameter is FALSE, the background remains unchanged. ! </td> ! </tr> ! </table><pre><b><a name="0">:M GetDlgItem: ( id -- handle ) ! </a></b></pre><p>The GetDlgItem function retrieves a handle of the control (id) in the window. ! </p><pre><b><a name="0">:M GetDlgItemText: ( addr len id -- len ) ! </a></b></pre><p>The GetDlgItemText function retrieves the title or text associated with a control in the window. ! </p><pre><b><a name="0">:M SetDlgItemText: ( addr len id -- ) ! </a></b></pre><p>The SetDlgItemText function sets the title or text of a control in then window. ! </p><pre><b><a name="0">:M SetDlgItemFocus: ( id -- ) ! </a></b></pre><p>Set the focus to the control (id) in the window ! </p><pre><b><a name="0">:M SelectDlgItemAll: ( id -- ) ! </a></b></pre><p>Selects all characters in the edit control (id). You can use this forn an edit control ! or a rich edit control. ! </p><pre><b><a name="0">:M IsDlgButtonChecked: ( id -- f1 ) ! </a></b></pre><p>The IsDlgButtonChecked function determines whether a button control has a check mark next to ! it or whether a three-state button control is grayed, checked, or neither. ! </p><pre><b><a name="0">:M CheckDlgButton: ( uCheck id -- ) ! </a></b></pre><p>The CheckDlgButton function changes the check state of a button control. ! Possible values for uCheck are: ! </p><table border="1"><tr><td>BST_CHECKED ! </td> ! <td>Sets the button state to checked. ! </td> ! </tr> ! <tr><td>BST_INDETERMINATE ! </td> ! <td>Sets the button state to grayed, indicating an indeterminate state. Use this value only if the button has the BS_3STATE or BS_AUTO3STATE style. ! </td> ! </tr> ! <tr><td>BST_UNCHECKED ! </td> ! <td>Sets the button state to cleared ! </td> ! </tr> ! </table><pre><b><a name="0">:M SetDlgItemAlign: ( flag id -- ) ! </a></b></pre><p>Set the text-alignment for a control (id) in the window. <br /> ! The current position is updated after each text output call. ! The current position is used as the reference point. ! Possible values for flag are: ! </p><table border="1"><tr><td>0 ! </td> ! <td>The reference point will be on the left edge of the bounding rectangle. ! </td> ! </tr> ! <tr><td>1 ! </td> ! <td>The reference point will be on the right edge of the bounding rectangle. ! </td> ! </tr> ! <tr><td>2 ! </td> ! <td>The reference point will be aligned horizontally with the center of the bounding rectangle. ! </td> ! </tr> ! </table><pre><b><a name="0">:M SetAlign: ( flag id -- ) \ DEPRECATED </a></b></pre><p>Obsolescent Method use SetDlgItemAlign: instead + </p><pre><b><a name="0">:M EnableDlgItem: ( flag id -- ) + </a></b></pre><p>Enable or disable a control (id) in the window. + Possible values for flag are: + </p><table border="1"><tr><td>0 + </td> + <td>disable + </td> + </tr> + <tr><td>1 + </td> + <td>enable + </td> + </tr> + </table><pre><b><a name="0">:M ShowDlgItem: ( flag id -- ) + </a></b></pre><p>Hide or show a control (id) in the window. + Possible values for flag are: + </p><table border="1"><tr><td>0 + </td> + <td>hide + </td> + </tr> + <tr><td>1 + </td> + <td>show + </td> + </tr> + </table><pre><b><a name="0">:M CheckRadioButton: ( check_id first_id last_id -- ) + </a></b></pre><p>The CheckRadioButton function adds a check mark to (checks) a specified radio button + in a group and removes a check mark from (clears) all other radio buttons in the group. + </p><table border="1"><tr><td>check_id + </td> + <td>Specifies the identifier of the radio button to select. + </td> + </tr> + <tr><td>first_id + </td> + <td>Specifies the identifier of the first radio button in the group. + </td> + </tr> + <tr><td>last_id + </td> + <td>Specifies the identifier of the last radio button in the group. + </td> + </tr> + </table><pre><b><a name="0">:M SendDlgItemMessage: ( lParam wParam message id -- long ) + </a></b></pre><p>Send a message to the control (id) in the window. + </p><pre><b><a name="0">:M SetDlgItemFont: ( FontObject id -- ) + </a></b></pre><p>Specify the font that the control (id) is to use when drawing text. <br /> + FontObject must be the HANDLE of a font. If this parameter is NULL, the control uses the + default system font to draw text. </p><pre><b><a name="0">;CLASS </a></b></pre><p>End of generic-window class --- NEW FILE: gdiStruct.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> </title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: gdiStruct.htm,v 1.1 2005/12/24 11:59:25 dbu_de Exp $"> <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>gdiStruct -- Wrapper classes for GDI structs. </h1><hr /><h3><i>Version 1.0 </i></h3><p>This GDI class library was written and placed in the Public Domain in 2005 by Dirk Busch </p><h2>Glossary </h2><a name="gdiPOINT"></a> <pre><b><a name="0">:class gdiPOINT <super object </a></b></pre><p>Wrapper class for a POINT struct. </p><pre><b><a name="0">:M GetX: ( -- x ) </a></b></pre><p>Get the x value of the point. </p><pre><b><a name="0">:M GetY: ( -- y ) </a></b></pre><p>Get the y value of the point. </p><pre><b><a name="0">:M SetX: ( x -- ) </a></b></pre><p>Set the x value of the point. </p><pre><b><a name="0">:M SetY: ( y -- ) </a></b></pre><p>Get the y value of the point. </p><pre><b><a name="0">:M Addr: ( -- addr ) </a></b></pre><p>Get the address of the point struct. </p><pre><b><a name="0">:M Size: ( -- size ) </a></b></pre><p>Get the site of the point struct </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiPOINT class </p><a name="gdiCOLORREF"></a> <pre><b><a name="0">:class gdiCOLORREF <super object </a></b></pre><p>Wrapper class for a COLORREF struct. <br /> A COLORREF value is used to specify an RGB color. When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form: 0x00bbggrr <br /> The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero. The maximum value for a single byte is 0xFF. </p><pre><b><a name="0">:M SetRValue: ( r -- ) </a></b></pre><p>Set the red value of the color </p><pre><b><a name="0">:M SetGValue: ( g -- ) </a></b></pre><p>Set the green value of the color </p><pre><b><a name="0">:M SetBValue: ( b -- ) </a></b></pre><p>Set the blue value of the color </p><pre><b><a name="0">:M GetRValue: ( -- r ) </a></b></pre><p>Get the red value of the color </p><pre><b><a name="0">:M GetGValue: ( -- g ) </a></b></pre><p>Get the green value of the color </p><pre><b><a name="0">:M GetBValue: ( -- b ) </a></b></pre><p>Get the blue value of the color </p><pre><b><a name="0">:M SetColor: ( colorref -- ) </a></b></pre><p>Set the color </p><pre><b><a name="0">:M SetSysColor: ( n -- ) </a></b></pre><p>Set a system color. Possible values are: </p><table border="1"><tr><td>COLOR_3DDKSHADOW </td> <td>Dark shadow for three-dimensional display elements. </td> </tr> <tr><td>COLOR_3DFACE, COLOR_BTNFACE </td> <td>Face color for three-dimensional display elements and for dialog box backgrounds. </td> </tr> <tr><td>COLOR_3DHILIGHT </td> <td>Highlight color for three-dimensional display elements (for edges facing the light source.) </td> </tr> <tr><td>COLOR_3DHIGHLIGHT </td> <td>Highlight color for three-dimensional display elements (for edges facing the light source.) </td> </tr> <tr><td>COLOR_BTNHILIGHT </td> <td>Highlight color for three-dimensional display elements (for edges facing the light source.) </td> </tr> <tr><td>COLOR_BTNHIGHLIGHT </td> <td>Highlight color for three-dimensional display elements (for edges facing the light source.) </td> </tr> <tr><td>COLOR_3DLIGHT </td> <td>Light color for three-dimensional display elements (for edges facing the light source.) </td> </tr> <tr><td>COLOR_3DSHADOW, COLOR_BTNSHADOW </td> <td>Shadow color for three-dimensional display elements (for edges facing away from the light source). </td> </tr> <tr><td>COLOR_ACTIVEBORDER </td> <td>Active window border. </td> </tr> <tr><td>COLOR_ACTIVECAPTION </td> <td>Active window title bar. Windows 98, Windows 2000: Specifies the left side color in the color gradient of an active window's title bar if the gradient effect is enabled. </td> </tr> <tr><td>COLOR_APPWORKSPACE </td> <td>Background color of multiple document interface (MDI) applications. </td> </tr> <tr><td>COLOR_BACKGROUND, COLOR_DESKTOP </td> <td>Desktop. </td> </tr> <tr><td>COLOR_BTNTEXT </td> <td>Text on push buttons. </td> </tr> <tr><td>COLOR_CAPTIONTEXT </td> <td>Text in caption, size box, and scroll bar arrow box. </td> </tr> <tr><td>COLOR_GRADIENTACTIVECAPTION </td> <td>Windows 98, Windows 2000: Right side color in the color gradient of an active window's title bar </td> </tr> <tr><td>COLOR_ACTIVECAPTION </td> <td>Windows 98, Windows 2000: specifies the left side color </td> </tr> <tr><td>COLOR_GRADIENTINACTIVECAPTION </td> <td>Windows 98, Windows 2000: Right side color in the color gradient of an inactive window's title bar </td> </tr> <tr><td>COLOR_INACTIVECAPTION </td> <td>Windows 98, Windows 2000: specifies the left side color. </td> </tr> <tr><td>COLOR_GRAYTEXT </td> <td>Grayed (disabled) text. This color is set to 0 if the current display driver does not support a solid gray color. </td> </tr> <tr><td>COLOR_HIGHLIGHT </td> <td>Item(s) selected in a control. </td> </tr> <tr><td>COLOR_HIGHLIGHTTEXT </td> <td>Text of item(s) selected in a control. </td> </tr> <tr><td>COLOR_HOTLIGHT </td> <td>Windows 98, Windows 2000: Color for a hot-tracked item. Single clicking a hot-tracked item executes the item. </td> </tr> <tr><td>COLOR_INACTIVEBORDER </td> <td>Inactive window border. </td> </tr> <tr><td>COLOR_INACTIVECAPTION </td> <td>Inactive window caption. Windows 98, Windows 2000: Specifies the left side color in the color gradient of an inactive window's title bar if the gradient effect is enabled. </td> </tr> <tr><td>COLOR_INACTIVECAPTIONTEXT </td> <td>Color of text in an inactive caption. </td> </tr> <tr><td>COLOR_INFOBK </td> <td>Background color for tooltip controls. </td> </tr> <tr><td>COLOR_INFOTEXT </td> <td>Text color for tooltip controls. </td> </tr> <tr><td>COLOR_MENU </td> <td>Menu background. </td> </tr> <tr><td>COLOR_MENUTEXT </td> <td>Text in menus. </td> </tr> <tr><td>COLOR_SCROLLBAR </td> <td>Scroll bar gray area. </td> </tr> <tr><td>COLOR_WINDOW </td> <td>Window background. </td> </tr> <tr><td>COLOR_WINDOWFRAME </td> <td>Window frame. </td> </tr> <tr><td>COLOR_WINDOWTEXT </td> <td>Text in windows. </td> </tr> </table><pre><b><a name="0">:M GetColor: ( -- colorref ) </a></b></pre><p>Get the color </p><pre><b><a name="0">:M SetRGB: ( r g b -- ) </a></b></pre><p>Set the red, green and blue values of the color </p><pre><b><a name="0">:M Addr: ( -- addr ) </a></b></pre><p>Get the address of the COLORREF struct </p><pre><b><a name="0">:M Size: ( -- size ) </a></b></pre><p>Get the size of the COLORREF struct </p><pre><b><a name="0">:M Choose: ( hWnd -- f ) </a></b></pre><p>Open the windows dialog for choosing a color. </p><pre><b><a name="0">:M CustomColors: ( -- addr len ) </a></b></pre><p>Get the address and length (in cells) of the CustomColors array used by Choose: </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiCOLORREF class </p><a name="gdiRGBQUAD"></a> <pre><b><a name="0">:class gdiRGBQUAD <super gdiCOLORREF </a></b></pre><p>Wrapper class for a RGBQUAD struct <br /> The RGBQUAD structure describes a color consisting of relative intensities of red, green, and blue. <br /> The bmiColors member of the BITMAPINFO structure consists of an array of RGBQUAD structures. <br /> Note: This class doesn't have any private methods. For a description of the methods see the gdiCOLORREF class. </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiRGBQUAD class </p><a name="gdiSIZE"></a> <pre><b><a name="0">:class gdiSIZE <super object </a></b></pre><p>Wrapper class for a SIZE struct </p><pre><b><a name="0">:M GetX: ( -- x ) </a></b></pre><p>Get the x value </p><pre><b><a name="0">:M GetY: ( -- y ) </a></b></pre><p>Get the y value </p><pre><b><a name="0">:M SetX: ( x -- ) </a></b></pre><p>Set the x value </p><pre><b><a name="0">:M SetY: ( y -- ) </a></b></pre><p>Set the y value </p><pre><b><a name="0">:M Addr: ( -- addr ) </a></b></pre><p>Get the address of the SIZE struct </p><pre><b><a name="0">:M Size: ( -- size ) </a></b></pre><p>Get the size of the SIZE struct </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiSIZE class </p><a name="gdiTEXTMETRIC"></a> <pre><b><a name="0">:class gdiTEXTMETRIC <super object </a></b></pre><p>Wrapper class for a TEXTMETRIC struct </p><pre><b><a name="0">:M Addr: ( -- addr ) &TEXTMETRIC ;M </a></b></pre><p>Get the address of the TEXTMETRIC struct. </p><pre><b><a name="0">:M Size: ( -- size ) sizeof(TEXTMETRIC) ;M </a></b></pre><p>Get the size of the TEXTMETRIC struct. </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiTEXTMETRIC class </p><hr><p>Document $Id: gdiStruct.htm,v 1.1 2005/12/24 11:59:25 dbu_de Exp $</p> </body></html> Index: gdiBase.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/classes/gdiBase.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gdiBase.htm 17 Dec 2005 15:18:00 -0000 1.1 --- gdiBase.htm 24 Dec 2005 11:59:25 -0000 1.2 *************** *** 47,51 **** </a></b></pre><p>Get the type of the object. <br /> Possible return values are: ! </p><table border="1"><tr><td>OBJ_BRUSH </td> <td>Brush --- 47,56 ---- </a></b></pre><p>Get the type of the object. <br /> Possible return values are: ! </p><table border="1"><tr><td>OBJ_BITMAP ! </td> ! <td>Bitmap ! </td> ! </tr> ! <tr><td>OBJ_BRUSH </td> <td>Brush Index: gdiPen.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/classes/gdiPen.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gdiPen.htm 17 Dec 2005 15:18:00 -0000 1.1 --- gdiPen.htm 24 Dec 2005 11:59:25 -0000 1.2 *************** *** 28,32 **** </p><pre><b><a name="0">:M SetStyle: ( style -- ) </a></b></pre><p>Set Syle of the pen. Possible values are: ! </p><table border="1"><tr><td>PS_DASH </td> <td>The pen is dashed. This style is valid only when the pen width is one or less in device units. --- 28,37 ---- </p><pre><b><a name="0">:M SetStyle: ( style -- ) </a></b></pre><p>Set Syle of the pen. Possible values are: ! </p><table border="1"><tr><td>PS_SOLID ! </td> ! <td>The pen is solid. ! </td> ! </tr> ! <tr><td>PS_DASH </td> <td>The pen is dashed. This style is valid only when the pen width is one or less in device units. *************** *** 55,59 **** <tr><td>PS_INSIDEFRAME </td> ! <td>The pen is solid. When this pen is used in any GDI drawing function that takes a bounding rectangle, the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. This applies only to geometric pens. </td> </tr> --- 60,64 ---- <tr><td>PS_INSIDEFRAME </td> ! <td>The pen is solid. When this pen is used the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. Only for geometric pens. </td> </tr> *************** *** 77,81 **** </p><pre><b><a name="0">:M GetStyle: ( -- style ) </a></b></pre><p>Get Syle of the pen. Possible values are: ! </p><table border="1"><tr><td>PS_DASH </td> <td>The pen is dashed. This style is valid only when the pen width is one or less in device units. --- 82,91 ---- </p><pre><b><a name="0">:M GetStyle: ( -- style ) </a></b></pre><p>Get Syle of the pen. Possible values are: ! </p><table border="1"><tr><td>PS_SOLID ! </td> ! <td>The pen is solid. ! </td> ! </tr> ! <tr><td>PS_DASH </td> <td>The pen is dashed. This style is valid only when the pen width is one or less in device units. *************** *** 104,108 **** <tr><td>PS_INSIDEFRAME </td> ! <td>The pen is solid. When this pen is used in any GDI drawing function that takes a bounding rectangle, the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. This applies only to geometric pens. </td> </tr> --- 114,118 ---- <tr><td>PS_INSIDEFRAME </td> ! <td>The pen is solid. When this pen is used the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. This applies only to geometric pens. </td> </tr> |