322 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			322 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| compile insert PS_Window_Equates
 | |
| /* 
 | |
|    ** Copyright (C) 2013-2024 Revelation Software Inc. All Rights Reserved **
 | |
|    
 | |
|    Author   : Wile C Coyote - Super Genius
 | |
|    Date     : June 2013
 | |
|    Purpose  : Constants for working with PS WINDOW object structures
 | |
|    
 | |
|    
 | |
|    Comments
 | |
|    ========
 | |
|    
 | |
|    
 | |
|    Amended  Date        Reason
 | |
|    =======  ====        ======
 | |
|    Mr C     10 May 24   Added PSSX_WINDOW_MDISHOWCHILDMENU$
 | |
|    Mr C     15 Oct 20   Renamed FRAMESTYLE to FORMBORDERSTYLE
 | |
|                         Added SHOWEFFECT/HIDEEFFECT equates
 | |
|    Mr C     19 Apr 18   Added PLACEMENTDATA property equates
 | |
|    Mr C     09 Feb 17   Added ToolBars equates
 | |
|    Mr C     07 Aug 17   Added InitialPosition equates
 | |
|    Mr C     12 Dec 16   Fixed PSS_WINDOW_HAS_MENU$
 | |
|    Mr C     03 Oct 16   Added OIWIN/EXE structure overrides.
 | |
|    Mr C     18 May 16   Removed PSSX_WINDOW_DPISCALING$
 | |
|    Mr C     05 May 16   Moved SCALEUNITS to ps_Equates 
 | |
|    Mr C     26 Apr 16   Transposed scale units
 | |
|    Mr C     10 Feb 16   Added PSS_WINDOW_DIALOGBOX$
 | |
|    Mr C     21 Dec 15   Added SIZINGMODE constants
 | |
|    Mr C     29 Jan 15   Added FrameStyle rules
 | |
|    Mr C     25 Jan 15   Added PSSX_WINDOW_SCALEMODEDIPS$
 | |
| */
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| #ifndef _PS_WINDOW_EQUATES_
 | |
| #define _PS_WINDOW_EQUATES_
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| 
 | |
|    $insert msWin_WindowStyle_Equates
 | |
|    $insert oiWin_Equates
 | |
|    $insert ps_Equates
 | |
|    
 | |
| ///////////////////////////////////////////////////////////////////////////////   
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| 
 | |
|    // PS Style equates
 | |
|    equ PSS_WINDOW_BMP_CENTER$             to 0x00000001      ; 
 | |
|    equ PSS_WINDOW_RESIZEALWAYS$           to 0x00000002      ; // SIZINGMODE property
 | |
|    equ PSS_WINDOW_RESIZENEVER$            to 0x00000004      ; // SIZINGMODE property
 | |
|    equ PSS_WINDOW_BMP_TILED$              to 0x00000020      ; 
 | |
|    equ PSS_WINDOW_BMP_STRETCH$            to bitOr( PSS_WINDOW_BMP_CENTER$, PSS_WINDOW_BMP_TILED$ )
 | |
|    equ PSS_WINDOW_HAS_MENU$               to 0x00000100      ; 
 | |
|    equ PSS_WINDOW_DIALOGBOX$              to 0x00001000      ;
 | |
|    equ PSS_WINDOW_AUTOSCROLL$             to 0x00002000      ;
 | |
|    equ PSS_WINDOW_MULTIINSTANCE$          to 0x00004000      ;
 | |
|    equ PSS_WINDOW_USEBKGDCOLOR$           to 0x00008000      ;
 | |
|    equ PSS_WINDOW_CREATECOMPLETE$         to 0x80000000      ;
 | |
|    
 | |
|    equ PSSX_WINDOW_SUPPRESSMDITRANSLATE$  to 0x00400000      ; // SUPPRESSMDITRANSLATE property
 | |
|    equ PSSX_WINDOW_MDISHOWCHILDMENU$      to 0x00800000      ; // MDISHOWCHILDMENU property
 | |
|    
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| 
 | |
|    // SYSREPOSWINS structure overrides
 | |
|    
 | |
|    equ POS_TASKBARID$                     to POS_TEXT_1$
 | |
|    equ POS_STATUSLINE$                    to POS_TEXT_2$
 | |
|    equ POS_TOOLBARS$                      to POS_TEXT_3$
 | |
|    
 | |
|    // SYSREPOSWINEXES structure overrides
 | |
|    
 | |
|    equ PSPOS_TASKBARID$                   to PSPOS_TEXT_1$
 | |
|    equ PSPOS_STATUSLINE$                  to PSPOS_TEXT_2$
 | |
|    equ PSPOS_TOOLBARS$                    to PSPOS_TEXT_3$
 | |
|    
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| 
 | |
|    // POS_DISPLAY WINDOW-only sub-values...
 | |
|    equ POS_DISP_WIN_TRANSLUCENCY$         to POS_DISPLAY_TRANSLUCENCY$
 | |
|    equ POS_DISP_WIN_RESERVED_2$           to 2  ; * // @tm delimited
 | |
|    equ POS_DISP_WIN_RESERVED_3$           to 3 
 | |
|    equ POS_DISP_WIN_INITIALPOS$           to 4
 | |
|    equ POS_DISP_WIN_SHOWEFFECT$           to 5
 | |
|    equ POS_DISP_WIN_HIDEEFFECT$           to 6
 | |
|    equ POS_DISP_WIN_MAXIMIZESIZE$         to 7  ; * // @tm delimited
 | |
|    equ POS_DISP_WIN_MINSCALEFACTOR$       to 8
 | |
|    equ POS_DISP_WIN_MAXSCALEFACTOR$       to 9
 | |
|    equ POS_DISP_WIN_SCALEINCREMENT$       to 10
 | |
|    
 | |
|    // PSPOS_DISPLAY WINDOW-only sub-values...
 | |
|    equ PSPOS_DISP_WIN_TRANSLUCENCY$       to PSPOS_DISPLAY_TRANSLUCENCY$
 | |
|    equ PSPOS_DISP_WIN_RESERVED_2$         to 2  ; * // @tm delimited
 | |
|    equ PSPOS_DISP_WIN_RESERVED_3$         to 3 
 | |
|    equ PSPOS_DISP_WIN_INITIALPOS$         to 4
 | |
|    equ PSPOS_DISP_WIN_SHOWEFFECT$         to 5
 | |
|    equ PSPOS_DISP_WIN_HIDEEFFECT$         to 6
 | |
|    equ PSPOS_DISP_WIN_MAXIMIZESIZE$       to 7  ; * // @tm delimited
 | |
|    equ PSPOS_DISP_WIN_MINSCALEFACTOR$     to 8
 | |
|    equ PSPOS_DISP_WIN_MAXSCALEFACTOR$     to 9
 | |
|    equ PSPOS_DISP_WIN_SCALEINCREMENT$     to 10
 | |
|    
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| 
 | |
|    // FORMBORDERSTYLE property equates
 | |
|    equ PS_FORMBORDERSTYLE_NONE$           to 0
 | |
|    equ PS_FORMBORDERSTYLE_FIXED$          to 1
 | |
|    equ PS_FORMBORDERSTYLE_SIZEABLE$       to 2
 | |
|    equ PS_FORMBORDERSTYLE_DIALOG$         to 3
 | |
|    equ PS_FORMBORDERSTYLE_FIXEDTOOL$      to 4
 | |
|    equ PS_FORMBORDERSTYLE_SIZEABLETOOL$   to 5
 | |
|    
 | |
|    // These values map onto the following window styles:
 | |
|    //
 | |
|    //   FormBorderStyle  |  Window Styles       Window Ex Styles
 | |
|    //   =====================================================================
 | |
|    //   None             |  WS_POPUP          |
 | |
|    //   ---------------------------------------------------------------------
 | |
|    //   Fixed            |  WS_POPUP          |  WS_EX_WINDOWEDGE   
 | |
|    //                    |  WS_BORDER         |
 | |
|    //   ---------------------------------------------------------------------
 | |
|    //   Sizeable         |  WS_POPUP          |  WS_EX_WINDOWEDGE
 | |
|    //                    |  WS_BORDER         |  
 | |
|    //                    |  WS_THICKFRAME     |
 | |
|    //   ---------------------------------------------------------------------
 | |
|    //   Dialog           |  WS_POPUP          |  WS_EX_DLGMODALFRAME
 | |
|    //                    |                    |  WS_EX_WINDOWEDGE
 | |
|    //   ---------------------------------------------------------------------
 | |
|    //   FixedTool        |  WS_POPUP          |  WS_EX_WINDOWEDGE   
 | |
|    //                    |  WS_BORDER         |  WS_EX_TOOLWINDOW
 | |
|    //   ---------------------------------------------------------------------
 | |
|    //   SizeableTool     |  WS_POPUP          |  WS_EX_WINDOWEDGE
 | |
|    //                    |  WS_BORDER         |  WS_EX_TOOLWINDOW
 | |
|    //                    |  WS_THICKFRAME     |
 | |
|    //   ---------------------------------------------------------------------
 | |
|    //
 | |
|    // NB:  The "None" style cannot be displayed with a caption.
 | |
|    
 | |
|    // Backwards compatibilty with the old FRAMESTYLE name.
 | |
|    equ PS_FRAMESTYLE_NONE$           to PS_FORMBORDERSTYLE_NONE$
 | |
|    equ PS_FRAMESTYLE_FIXED$          to PS_FORMBORDERSTYLE_FIXED$
 | |
|    equ PS_FRAMESTYLE_SIZEABLE$       to PS_FORMBORDERSTYLE_SIZEABLE$
 | |
|    equ PS_FRAMESTYLE_DIALOG$         to PS_FORMBORDERSTYLE_DIALOG$
 | |
|    equ PS_FRAMESTYLE_FIXEDTOOL$      to PS_FORMBORDERSTYLE_FIXEDTOOL$
 | |
|    equ PS_FRAMESTYLE_SIZEABLETOOL$   to PS_FORMBORDERSTYLE_SIZEABLETOOL$
 | |
|    
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| 
 | |
|    // SIZINGMODE property equates
 | |
|    equ PS_SIZINGMODE_DEFAULT$            to 0
 | |
|    equ PS_SIZINGMODE_ALWAYS$             to 1
 | |
|    equ PS_SIZINGMODE_NEVER$              to 2 
 | |
|    
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| 
 | |
|    // SHOWEFFECT/HIDEEFFECT property
 | |
|    equ PS_SHE_NONE$             to 0
 | |
|    equ PS_SHE_FADE$             to 1
 | |
|    equ PS_SHE_SLIDE_DOWN$       to 2
 | |
|    equ PS_SHE_SLIDE_UP$         to 3
 | |
|    equ PS_SHE_SLIDE_RIGHT$      to 4
 | |
|    equ PS_SHE_SLIDE_LEFT$       to 5
 | |
|    equ PS_SHE_SLIDE_DOWN_RIGHT$ to 6
 | |
|    equ PS_SHE_SLIDE_DOWN_LEFT$  to 7
 | |
|    equ PS_SHE_SLIDE_UP_RIGHT$   to 8
 | |
|    equ PS_SHE_SLIDE_UP_LEFT$    to 9
 | |
|    
 | |
|    equ PS_SHE_SLIDE_DEFAULT$    to -1
 | |
|    
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| 
 | |
|    * // CENTER method equates
 | |
|    * //
 | |
|    * // param1     - If TRUE then Center to Parent else Center to Desktop
 | |
|    * // 
 | |
|    * // param2     - Requested SIZE (all fields default to "-1")
 | |
|    * //
 | |
|    * //               <1> X-Position (-1 means center it on the X-Axis)
 | |
|    * //               <2> Y-Position (-1 means center it on the Y-Axis)
 | |
|    * //               <3> Width  (-1 means leave the window width as is)
 | |
|    * //               <4> Height (-1 means leave the window height as is)
 | |
|    * // 
 | |
|    * // param3     - If TRUE then just return the calculated size, don't 
 | |
|    * //              actually set it.
 | |
|    * //
 | |
|    * // param4    - Options:
 | |
|    * //
 | |
|    * //              - If Centering on the Parent then this argument contains 
 | |
|    * //                the Parent Size to use (@'fm'd - overrides actual parent 
 | |
|    * //                size)
 | |
|    * //
 | |
|    * //              - If Centering on the Desktop then this contains:
 | |
|    * //
 | |
|    * //                 <1> Force Boundary Check: If TRUE then check that the 
 | |
|    * //                     frame is within the bounds of desktop. Usually
 | |
|    * //                     this is only checked if we don't specify a specific
 | |
|    * //                     X or Y coordinate (i.e. vParams[1]<1> and <2> are 
 | |
|    * //                     both "-1" )
 | |
|    * //
 | |
|    * //                 <2> Desktop "anchor" window ID.  This field can contain 
 | |
|    * //                     the name of an "anchor" window - this means the frame
 | |
|    * //                     will be centered on the same monitor as the "anchor"
 | |
|    * //
 | |
|    * // Returns    - Calculated size coordinates
 | |
|    
 | |
|    * // NewSize
 | |
|    equ PSMTD_CENTER_DFT_XPOS$             to -1
 | |
|    equ PSMTD_CENTER_DFT_YPOS$             to -1
 | |
|    equ PSMTD_CENTER_DFT_WIDTH$            to -1
 | |
|    equ PSMTD_CENTER_DFT_HEIGHT$           to -1
 | |
|    
 | |
|    * // Options (param4)
 | |
|    equ PSMTD_CENTER_OPT_BOUNDSCHECK$      to 1
 | |
|    equ PSMTD_CENTER_OPT_ANCHORWINID$      to 2
 | |
|    
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| 
 | |
|    // Initial position equates
 | |
|    equ PS_IP_AS_DESIGNED$                 to 0
 | |
|    equ PS_IP_CENTER_DESKTOP$              to 1
 | |
|    equ PS_IP_CENTER_PARENT$               to 2
 | |
|    
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| 
 | |
|    // PLACEMENTDATA property
 | |
|    //
 | |
|    // <1> showCmd ( SW_ value )
 | |
|    // 
 | |
|    // <2> Normal Position
 | |
|    //
 | |
|    //     <2,1> Left
 | |
|    //     <2,2> Top
 | |
|    //     <2,3> Width
 | |
|    //     <2,4> Height
 | |
|    //
 | |
|    // <3> Min position (Specifies the coordinates of the window's upper-left
 | |
|    //                   corner when the window is minimized)
 | |
|    //     
 | |
|    //     <3,1> Left
 | |
|    //     <3,2> Top
 | |
|    //
 | |
|    //     NB: If this is set then WPF_SETMINPOSITION must be set in the Flags 
 | |
|    //         field
 | |
|    //
 | |
|    // <4> Max position (Specifies the coordinates of the window's upper-left
 | |
|    //                   corner when the window is maximized)
 | |
|    //     
 | |
|    //     <4,1> Left
 | |
|    //     <4,2> Top
 | |
|    //
 | |
|    // <5> Flags (Set_Property only)
 | |
|    
 | |
|    equ PS_PD_POS_SHOWCMD$                   to 1
 | |
|    equ PS_PD_POS_NORMALPOS$                 to 2
 | |
|    equ PS_PD_POS_MINPOS$                    to 3
 | |
|    equ PS_PD_POS_MAXPOS$                    to 4
 | |
|    equ PS_PD_POS_FLAGS$                     to 5
 | |
|    
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| 
 | |
|    // LOCKTYPE property equates
 | |
|    equ PS_LKTYPE_EXCLUSIVE$                 to 0
 | |
|    equ PS_LKTYPE_SHARED$                    to 1
 | |
|    equ PS_LKTYPE_NONE$                      to 2
 | |
|    
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| 
 | |
|    // LOCKCOORDINATION property equates
 | |
|    equ PS_LKCOORD_NORMAL$                   to 0
 | |
|    equ PS_LKCOORD_WITHTABLE$                to 1
 | |
|    
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| 
 | |
|    // PROGRESSSTATE property equates
 | |
|    equ PS_PGS_NOPROGRESS$                   to 0
 | |
|    equ PS_PGS_NORMAL$                       to 1  ; // Spectrum is Green
 | |
|    equ PS_PGS_ERROR$                        to 2  ; // Red
 | |
|    equ PS_PGS_PAUSED$                       to 3  ; // Amber
 | |
|    equ PS_PGS_INDETERMINATE$                to 4  ; // Green marquee
 | |
| 
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| 
 | |
|    // SCALEFACTOR property equates
 | |
|    // 
 | |
|    // <1> ScaleFactor
 | |
|    // <2> Min ScaleFactor
 | |
|    // <3> Max ScaleFactor
 | |
|    // <4> ScaleFactor Increment
 | |
|    
 | |
|    equ PS_SCF_POS_FACTOR$              to 1
 | |
|    equ PS_SCF_POS_MINFACTOR$           to 2
 | |
|    equ PS_SCF_POS_MAXFACTOR$           to 3
 | |
|    equ PS_SCF_POS_INCREMENT$           to 4
 | |
|    
 | |
|    equ PS_SCF_DFT_MINFACTOR$           to 0.5
 | |
|    equ PS_SCF_DFT_MAXFACTOR$           to 5.0
 | |
|    equ PS_SCF_DFT_INCREMENT$           to 0
 | |
|    
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| 
 | |
|    // WRITEMODE property equates
 | |
|    equ PS_WRMD_CONTROLS_ONLY$               to 0
 | |
|    equ PS_WRMD_ALL$                         to 1   
 | |
|    
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| #endif
 | |
| ///////////////////////////////////////////////////////////////////////////////
 | |
| ///////////////////////////////////////////////////////////////////////////////
 |