diff --git a/Controls/ModernUI_Animation/ModernUI_Animation.asm b/Controls/ModernUI_Animation/ModernUI_Animation.asm index 3cd393a..997d9f8 100644 --- a/Controls/ModernUI_Animation/ModernUI_Animation.asm +++ b/Controls/ModernUI_Animation/ModernUI_Animation.asm @@ -2,7 +2,7 @@ ; ; ModernUI Control - ModernUI_Animation ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/Controls/ModernUI_Animation/ModernUI_Animation.h b/Controls/ModernUI_Animation/ModernUI_Animation.h index e69de29..cfe88a4 100644 --- a/Controls/ModernUI_Animation/ModernUI_Animation.h +++ b/Controls/ModernUI_Animation/ModernUI_Animation.h @@ -0,0 +1,181 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef _MSC_VER // MSVC compiler +#define MUI_EXPORT __declspec(dllexport) __stdcall +#else +#define MUI_EXPORT +#endif + + +//------------------------------------------------------------------------------ +// ModernUI_Animation Prototypes +//------------------------------------------------------------------------------ +void MUI_EXPORT MUIAnimationRegister(); // Use 'ModernUI_Animation' as class in RadASM custom class control +HWND MUI_EXPORT MUIAnimationCreateHWND hWndParent, DWORD xpos, DWORD ypos, DWORD dwWidth, DWORD dwHeight, DWORD dwResourceID, DWORD dwStyle); +unsigned int MUI_EXPORT MUIAnimationSetProperty(HWND hModernUI_Animation, DWORD dwProperty, DWORD dwPropertyValue); +unsigned int MUI_EXPORT MUIAnimationGetProperty(HWND hModernUI_Animation, DWORD dwProperty); + +// Add image handle (bitmap, icon or png) as an animation frame image +bool MUI_EXPORT MUIAnimationAddFrame(HWND hModernUI_Animation, DWORD dwImageType, POINTER *lpMuiAnimationFrameStruct); +bool MUI_EXPORT MUIAnimationAddFrames(HWND hModernUI_Animation, DWORD dwImageType, POINTER *lpArrayMuiAnimationFrameStructs, DWORD dwCount); +// Load an image resource id (bitmap, icon or png) as an animation frame image +bool MUI_EXPORT MUIAnimationLoadFrame(HWND hModernUI_Animation, DWORD dwImageType, POINTER *lpMuiAnimationFrameStruct); +bool MUI_EXPORT MUIAnimationLoadFrames(HWND hModernUI_Animation, DWORD dwImageType, POINTER *lpArrayMuiAnimationFrameStructs, DWORD dwCount); +// Create a series of animation frames images from a sprite sheet +bool MUI_EXPORT MUIAnimationAddSpriteSheet(HWND hModernUI_Animation, DWORD dwImageType, HANDLE hImageSpriteSheet, DWORD dwSpriteCount, POINTER * lpFrameTimes, DWORD dwFrameTimeSize, DWORD dwFrameTimeType); +bool MUI_EXPORT MUIAnimationLoadSpriteSheet(HWND hModernUI_Animation, DWORD dwImageType, DWORD idResSpriteSheet, DWORD dwSpriteCount, POINTER * lpFrameTimes, DWORD dwFrameTimeSize, DWORD dwFrameTimeType); +// Insert image handle as an animation frame image +bool MUI_EXPORT MUIAnimationInsertFrame(HWND hModernUI_Animation, DWORD dwImageType, POINTER *lpMuiAnimationFrameStruct, DWORD dwFrameIndex, BOOL bInsertBefore); +bool MUI_EXPORT MUIAnimationInsertFrames(HWND hModernUI_Animation, DWORD dwImageType, POINTER *lpArrayMuiAnimationFrameStructs, DWORD dwCount, DWORD dwFrameIndex, BOOL bInsertBefore); + +// Frame Operations +bool MUI_EXPORT MUIAnimationClear(HWND hModernUI_Animation); +bool MUI_EXPORT MUIAnimationDeleteFrames(HWND hModernUI_Animation); +bool MUI_EXPORT MUIAnimationDeleteFrame(HWND hModernUI_Animation, DWORD dwFrameIndex); +bool MUI_EXPORT MUIAnimationMoveFrame(HWND hModernUI_Animation, DWORD dwFrameIndexFrom, DWORD dwFrameIndexTo); +bool MUI_EXPORT MUIAnimationCopyFrame(HWND hModernUI_Animation, DWORD dwFrameIndexFrom, DWORD dwFrameIndexTo); +bool MUI_EXPORT MUIAnimationCropFrame(HWND hModernUI_Animation, DWORD dwFrameIndex, LPRECT *lpRect); +bool MUI_EXPORT MUIAnimationCropFrames(HWND hModernUI_Animation, LPRECT *lpRect); + +// Save frames to file +bool MUI_EXPORT MUIAnimationExportSpriteSheet(HWND hModernUI_Animation, DWORD dwImageType, LPCSTR *lpszSpritesheetFilename, LPCSTR *lpszFrameTimesFilename); +bool MUI_EXPORT MUIAnimationExportFrame(HWND hModernUI_Animation, DWORD dwImageType, LPCSTR *lpszFrameFilename, DWORD dwFrameIndex); +bool MUI_EXPORT MUIAnimationExportFrames(HWND hModernUI_Animation, DWORD dwImageType, LPCSTR *lpszFrameFolder, LPCSTR *lpszFilePrefix, BOOL bFileFrameNo); + +// Load frames from file +bool MUI_EXPORT MUIAnimationImportSpriteSheet(HWND hModernUI_Animation, DWORD dwImageType, LPCSTR *lpszSpritesheetFilename, LPCSTR *lpszFrameTimesFilename); +bool MUI_EXPORT MUIAnimationImportFrame(HWND hModernUI_Animation, DWORD dwImageType, LPCSTR *lpszFrameFilename, DWORD dwFrameIndex); + +// Frame Information +bool MUI_EXPORT MUIAnimationGetFrameInfo(HWND hModernUI_Animation, DWORD dwFrameIndex, POINTER *lpMuiAnimationFrameStruct); +HANDLE MUI_EXPORT MUIAnimationGetFrameImage(HWND hModernUI_Animation, DWORD dwFrameIndex, POINTER *lpdwFrameType); +unsigned int MUIAnimationGetFrameTime(HWND hModernUI_Animation, DWORD dwFrameIndex); + +bool MUI_EXPORT MUIAnimationSetFrameInfo(HWND hModernUI_Animation, DWORD dwFrameIndex, POINTER *lpMuiAnimationFrameStruct); +bool MUI_EXPORT MUIAnimationSetFrameImage(HWND hModernUI_Animation, DWORD dwFrameIndex, DWORD dwFrameType, HANDLE hFrameImage); +bool MUI_EXPORT MUIAnimationSetFrameTime(HWND hModernUI_Animation, DWORD dwFrameIndex, DWORD dwFrameTime); + +// Animation control +void MUI_EXPORT MUIAnimationStart(HWND hModernUI_Animation); +void MUI_EXPORT MUIAnimationStop(HWND hModernUI_Animation); +void MUI_EXPORT MUIAnimationPause(HWND hModernUI_Animation); +void MUI_EXPORT MUIAnimationResume(HWND hModernUI_Animation); +void MUI_EXPORT MUIAnimationStep(HWND hModernUI_Animation, BOOL bReverse); +void MUI_EXPORT MUIAnimationSpeed(HWND hModernUI_Animation, FLOAT fSpeedFactor); + +void MUI_EXPORT MUIAnimationSetDefaultTime(HWND hModernUI_Animation, DWORD dwDefaultFrameTime); + +void MUI_EXPORT MUIAnimationNotifyCallback(HWND hModernUI_Animation, POINTER *lpNMAnimationStruct); + + +//------------------------------------------------------------------------------ +// ModernUI_Animation Messages +//------------------------------------------------------------------------------ +#define MUIAM_ADDFRAME WM_USER+1752 // wParam = dwImageType, lParam = lpAnimationFrameStruct +#define MUIAM_LOADFRAME WM_USER+1751 // wParam = dwImageType, lParam = idResImage +#define MUIAM_START WM_USER+1750 // wParam & lParam = NULL +#define MUIAM_STOP WM_USER+1749 // wParam & lParam = NULL +#define MUIAM_STEP WM_USER+1748 // wParam = bReverse +#define MUIAM_SPEED WM_USER+1745 // wParam = dwSpeedFactor + + +//------------------------------------------------------------------------------ +// ModernUI_Animation Notifications +//------------------------------------------------------------------------------ +#define MUIAN_STOP 0 // Animation is stopped +#define MUIAN_START 1 // Animation has started +#define MUIAN_PAUSE 2 // Animation is paused +#define MUIAN_RESUME 3 // Animation has resumed +#define MUIAN_STEP 4 // Animation stepping +#define MUIAN_FRAME 5 // Occurs every frame shown + + +//------------------------------------------ +// ModernUI_Animation Structures +//------------------------------------------ +IFNDEF MUI_ANIMATION_FRAME // lpMuiAnimationFrameStruct +typedef struct MUI_ANIMATION_FRAME +{ + DWORD dwFrameType, // DWORD. Image type: MUIAIT_BMP, MUIAIT_ICO, MUIAIT_PNG + DWORD dwFrameImage, // DWORD/HANDLE. Handle or resource ID of image: Bitmap, Icon or PNG (RT_BITMAP, RT_ICON or RT_RCDATA resource) + DWORD dwFrameTime, // DWORD. Frame time in milliseconds + DWORD lParam // DWORD. Custom user specified value +} +ENDIF + +IFNDEF MUI_ANIMATION_FT_FULL // For array of frame times for every frame in array +typedef struct MUI_ANIMATION_FT_FULL +{ + DWORD dwFrameTime +} +ENDIF + +IFNDEF MUI_ANIMATION_FT_COMPACT // For array of frame times for specified frame indexes in each entry +typedef struct MUI_ANIMATION_FT_COMPACT +{ + DWORD dwFrameID, + DWORD dwFrameTime +} +ENDIF + +IFNDEF NM_ANIMATION_FRAME // ModernUI_Animation Notification Item +typedef struct NM_ANIMATION_FRAME +{ + DWORD dwFrameIndex, // DWORD. Frame index + DWORD dwFrameType, // DWORD. Image type: MUIAIT_BMP, MUIAIT_ICO, MUIAIT_PNG + DWORD dwFrameImage, // HANDLE. Handle of image: Bitmap, Icon or PNG + DWORD dwFrameTime, // DWORD. Frame time in milliseconds + DWORD lParam // DWORD. Custom user specified value +} +ENDIF + +IFNDEF NM_ANIMATION // Notification Message Structure for ModernUI_Animation +typedef struct NM_ANIMATION +{ + NMHDR hdr, + NM_ANIMATION_FRAME item +} +ENDIF + + +//------------------------------------------ +// ModernUI_Animation Styles +// +//------------------------------------------ +#define MUIAS_NOSTRETCH 0x0 +#define MUIAS_NOCENTER 0x1 +#define MUIAS_CENTER 0x2 +#define MUIAS_STRETCH 0x3 +#define MUIAS_LCLICK 0x4 +#define MUIAS_RCLICK 0x8 +#define MUIAS_HAND 0x10 +#define MUIAS_CONTROL 0x20 + +//------------------------------------------------------------------------------ +// ModernUI_Animation Properties: Use with MUIAnimationSetProperty / +// MUIAnimationGetProperty or MUI_SETPROPERTY / MUI_GETPROPERTY msgs +//------------------------------------------------------------------------------ +#define AnimationBackColor 0 // RGBCOLOR. Background color of animation +#define AnimationBorderColor 4 // RGBCOLOR. Border color of animation +#define AnimationLoop 8 // BOOL. Loop animation back to start. Default is TRUE +#define AnimationNotifications 12 // BOOL. Allow notifications via WM_NOTIFY. Default is TRUE +#define AnimationNotifyCallback 16 // DWORD. Address of custom notifications callback function (MUIAnimationNotifyCallback) +#define AnimationDllInstance 20 // DWORD. Instance of DLL if using control in a DLL +#define AnimationParam 24 // DWORD. Custom user specified value + +// Animation Image Type: +#define MUIAIT_NONE 0 +#define MUIAIT_BMP 1 +#define MUIAIT_ICO 2 +#define MUIAIT_PNG 3 + +// Animation Frame Type: +#define MUIAFT_FULL 0 +#define MUIAFT_COMPACT 1 + + +#ifdef __cplusplus +} +#endif diff --git a/Controls/ModernUI_Animation/ModernUI_Animation.inc b/Controls/ModernUI_Animation/ModernUI_Animation.inc index 81eaa7f..13b64c6 100644 --- a/Controls/ModernUI_Animation/ModernUI_Animation.inc +++ b/Controls/ModernUI_Animation/ModernUI_Animation.inc @@ -2,7 +2,7 @@ ; ; ModernUI Control - ModernUI_Animation ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/Controls/ModernUI_Animation/ModernUI_Animation.lib b/Controls/ModernUI_Animation/ModernUI_Animation.lib index ddf5aff..a8bf51a 100644 Binary files a/Controls/ModernUI_Animation/ModernUI_Animation.lib and b/Controls/ModernUI_Animation/ModernUI_Animation.lib differ diff --git a/Controls/ModernUI_Animation/ModernUI_Animation.rap b/Controls/ModernUI_Animation/ModernUI_Animation.rap index 053f8b5..532400c 100644 --- a/Controls/ModernUI_Animation/ModernUI_Animation.rap +++ b/Controls/ModernUI_Animation/ModernUI_Animation.rap @@ -64,11 +64,11 @@ Group=Assembly,Misc [AutoLoad] AutoLoad=2,1,3,4,5,6,7 [Size] -3=0,0,0,0,2986 -4=0,0,0,0,314 -1=0,0,0,0,90590 -2=0,0,0,0,1196 -6=0,0,0,0,82 +3=0,0,0,0,537 +4=0,0,0,0,109 +1=0,0,0,0,144 +2=0,0,0,0,144 +6=0,0,0,0,111 5=0,0,0,0,503 7=0,0,0,0,0 [VersionControl] @@ -81,7 +81,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=23 +MilestoneOnDateDate=18 MilestoneOnDateTimeYear=2019 MilestoneOnDateTimeMonth=7 MilestoneOnDateTimeDate=1 @@ -105,7 +105,7 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=71247559 +PTimer=77268283 [GroupExpand] GroupExpand=1,1,0 [BookMark] @@ -125,7 +125,7 @@ GroupExpand=1,1,0 2= 1= [Collapse] -1=,,,,,16384,, +1=,,,,,,, 2= 6= 5= @@ -133,11 +133,12 @@ GroupExpand=1,1,0 3= 7= [Find] -1="GdipDrawImage" +1="fld" 2="finit" -3="SPINNER_USE_TIMERQUEUE" -4="@AnimationFrameTimeDefault" -5="MUIAnimationLoadSpriteSheet" -6="MUIAIT_NONE,MUIAIT_BMP,MUIAIT_ICO,MUIAIT_PNG" -7="_MUI_AnimationGetFrameImage" -8="ANIMATION_FRAME" +3="GdipDrawImage" +4="SPINNER_USE_TIMERQUEUE" +5="@AnimationFrameTimeDefault" +6="MUIAnimationLoadSpriteSheet" +7="MUIAIT_NONE,MUIAIT_BMP,MUIAIT_ICO,MUIAIT_PNG" +8="_MUI_AnimationGetFrameImage" +9="ANIMATION_FRAME" diff --git a/Controls/ModernUI_Button/ModernUI_Button.asm b/Controls/ModernUI_Button/ModernUI_Button.asm index 3c9f485..569e1a5 100644 --- a/Controls/ModernUI_Button/ModernUI_Button.asm +++ b/Controls/ModernUI_Button/ModernUI_Button.asm @@ -2,11 +2,7 @@ ; ; ModernUI Control - ModernUI_Button ; -; Copyright (c) 2018 by fearless -; -; All Rights Reserved -; -; http://www.LetTheLight.in +; Copyright (c) 2023 by fearless ; ; http://github.com/mrfearless/ModernUI ; diff --git a/Controls/ModernUI_Button/ModernUI_Button.inc b/Controls/ModernUI_Button/ModernUI_Button.inc index 322f13d..dd1da4c 100644 --- a/Controls/ModernUI_Button/ModernUI_Button.inc +++ b/Controls/ModernUI_Button/ModernUI_Button.inc @@ -2,11 +2,7 @@ ; ; ModernUI Control - ModernUI_Button ; -; Copyright (c) 2018 by fearless -; -; All Rights Reserved -; -; http://www.LetTheLight.in +; Copyright (c) 2023 by fearless ; ; http://github.com/mrfearless/ModernUI ; diff --git a/Controls/ModernUI_Button/ModernUI_Button.lib b/Controls/ModernUI_Button/ModernUI_Button.lib index de7eda0..7ac088d 100644 Binary files a/Controls/ModernUI_Button/ModernUI_Button.lib and b/Controls/ModernUI_Button/ModernUI_Button.lib differ diff --git a/Controls/ModernUI_Button/ModernUI_Button.rap b/Controls/ModernUI_Button/ModernUI_Button.rap index 7891542..52cd772 100644 --- a/Controls/ModernUI_Button/ModernUI_Button.rap +++ b/Controls/ModernUI_Button/ModernUI_Button.rap @@ -76,7 +76,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=15 +MilestoneOnDateDate=18 MilestoneOnDateTimeYear=2016 MilestoneOnDateTimeMonth=5 MilestoneOnDateTimeDate=30 @@ -100,9 +100,9 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=419071088 +PTimer=456695932 [Collapse] -1=4726848,,1006649598,,581632,131072,,131072,16787456,8456,,1063424 +1=20971520,,939524215,,17358848,,33554432,131072,16787456,270592,34816,14336 2= 3= 4= @@ -110,8 +110,8 @@ PTimer=419071088 6= 7= [Size] -1=0,0,0,0,112437 -2=0,0,0,0,36986 +1=0,0,0,0,154 +2=0,0,0,0,154 3=0,0,0,0,1323 4=0,0,0,0,3372 5=0,0,0,0,8385 @@ -133,13 +133,13 @@ GroupExpand=1,1,0 [BreakPoint] 0= [Find] -1="@ButtonBrush" -2="@ButtonDPI" -3="PUBLIC " -4="PRIVATE " -5="MUI_BUTTON_DEFAULT_THEME" -6="TextExtent" -7=";" -8="@" -9="EQU " -10="EQU" +1="WS_CLIP" +2="MUIBM_NOTIFY" +3="COLOR" +4="@ButtonBrush" +5="@ButtonDPI" +6="PUBLIC " +7="PRIVATE " +8="MUI_BUTTON_DEFAULT_THEME" +9="TextExtent" +10=";" diff --git a/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.asm b/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.asm index 2ac3dde..117ea91 100644 --- a/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.asm +++ b/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.asm @@ -2,11 +2,7 @@ ; ; ModernUI Control - ModernUI_CaptionBar ; -; Copyright (c) 2018 by fearless -; -; All Rights Reserved -; -; http://www.LetTheLight.in +; Copyright (c) 2023 by fearless ; ; http://github.com/mrfearless/ModernUI ; diff --git a/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.inc b/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.inc index 9528e98..8445edf 100644 --- a/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.inc +++ b/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.inc @@ -2,11 +2,7 @@ ; ; ModernUI Control - ModernUI_CaptionBar ; -; Copyright (c) 2018 by fearless -; -; All Rights Reserved -; -; http://www.LetTheLight.in +; Copyright (c) 2023 by fearless ; ; http://github.com/mrfearless/ModernUI ; diff --git a/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.lib b/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.lib index ea61ee2..ea63f0e 100644 Binary files a/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.lib and b/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.lib differ diff --git a/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.rap b/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.rap index 59120c5..d3eba3c 100644 --- a/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.rap +++ b/Controls/ModernUI_CaptionBar/ModernUI_CaptionBar.rap @@ -72,7 +72,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=26 +MilestoneOnDateDate=18 MilestoneOnDateTimeYear=2016 MilestoneOnDateTimeMonth=5 MilestoneOnDateTimeDate=17 @@ -96,7 +96,7 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=207806778 +PTimer=209251467 [GroupExpand] GroupExpand=1,1,0 [BookMark] @@ -116,7 +116,7 @@ GroupExpand=1,1,0 1= 2= [Collapse] -1=135266304,570425344,536903684,1107298304,524434,33570816,539033624,,464 +1=135266304,570425344,536903684,1107298304,524434,33570816,539033624,,384 2= 3= 4= @@ -124,8 +124,8 @@ GroupExpand=1,1,0 6= 7= [Size] -1=0,0,0,0,30593 -2=0,0,0,0,3502 +1=0,0,0,0,158 +2=0,0,0,0,158 3=0,0,0,0,314 4=0,0,0,0,2596 5=0,0,0,0,2005 diff --git a/Controls/ModernUI_Checkbox/ModernUI_Checkbox.asm b/Controls/ModernUI_Checkbox/ModernUI_Checkbox.asm index bd3d033..f2f4959 100644 --- a/Controls/ModernUI_Checkbox/ModernUI_Checkbox.asm +++ b/Controls/ModernUI_Checkbox/ModernUI_Checkbox.asm @@ -2,11 +2,7 @@ ; ; ModernUI Control - ModernUI_Checkbox ; -; Copyright (c) 2018 by fearless -; -; All Rights Reserved -; -; http://www.LetTheLight.in +; Copyright (c) 2023 by fearless ; ; http://github.com/mrfearless/ModernUI ; diff --git a/Controls/ModernUI_Checkbox/ModernUI_Checkbox.inc b/Controls/ModernUI_Checkbox/ModernUI_Checkbox.inc index cbc4794..0854aff 100644 --- a/Controls/ModernUI_Checkbox/ModernUI_Checkbox.inc +++ b/Controls/ModernUI_Checkbox/ModernUI_Checkbox.inc @@ -2,11 +2,7 @@ ; ; ModernUI Control - ModernUI_Checkbox ; -; Copyright (c) 2018 by fearless -; -; All Rights Reserved -; -; http://www.LetTheLight.in +; Copyright (c) 2023 by fearless ; ; http://github.com/mrfearless/ModernUI ; diff --git a/Controls/ModernUI_Checkbox/ModernUI_Checkbox.lib b/Controls/ModernUI_Checkbox/ModernUI_Checkbox.lib index 4b4f0ed..6273df1 100644 Binary files a/Controls/ModernUI_Checkbox/ModernUI_Checkbox.lib and b/Controls/ModernUI_Checkbox/ModernUI_Checkbox.lib differ diff --git a/Controls/ModernUI_Checkbox/ModernUI_Checkbox.rap b/Controls/ModernUI_Checkbox/ModernUI_Checkbox.rap index b9d5ebd..4aefee3 100644 Binary files a/Controls/ModernUI_Checkbox/ModernUI_Checkbox.rap and b/Controls/ModernUI_Checkbox/ModernUI_Checkbox.rap differ diff --git a/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.asm b/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.asm index e71c06f..5dbeff3 100644 --- a/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.asm +++ b/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.asm @@ -2,7 +2,7 @@ ; ; ModernUI Control - ModernUI_ProgressBar ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; @@ -147,6 +147,9 @@ szMUIProgressBarClass DB 'ModernUI_ProgressBar',0 ; Class name for szMUIProgressBarFont DB 'Segoe UI',0 ; Font used for ModernUI_ProgressBar text hMUIProgressBarFont DD 0 ; Handle to ModernUI_ProgressBar font (segoe ui) +szMUIPBPercentSign DB "%",0 +szMUIPBSpace DB " ",0 + ; start with 186,39,33 ; increase G (39) by 1 until matches R (186) 186,186,33 ; then decrease R (186) until it reaches end red (33) 33,186,33 @@ -491,8 +494,6 @@ _MUI_ProgressBarPaint PROC hWin:DWORD LOCAL hdc:HDC LOCAL hdcMem:HDC LOCAL hBufferBitmap:DWORD - LOCAL hBrush:DWORD - LOCAL hOldBrush:DWORD LOCAL Percent:DWORD LOCAL TextColor:DWORD LOCAL BackColor:DWORD @@ -583,7 +584,7 @@ _MUI_ProgressBarPaint PROC hWin:DWORD ;---------------------------------------------------------- ; Finish Double Buffering & Cleanup ;---------------------------------------------------------- - Invoke MUIGDIDoubleBufferFinish, hdcMem, hBufferBitmap, 0, 0, hBrush, 0 + Invoke MUIGDIDoubleBufferFinish, hdcMem, hBufferBitmap, 0, 0, 0, 0 Invoke EndPaint, hWin, Addr ps @@ -625,7 +626,7 @@ _MUI_ProgressBarPaintText PROC hWin:DWORD, hdc:DWORD, lpRect:DWORD, dwTextColor: Invoke MUIGetExtProperty, hWin, @ProgressBarPercent mov dwPercent, eax Invoke _MUI_ProgressBarDwordToAscii, dwPercent, Addr szPercentText - Invoke lstrcat, Addr szPercentText, CTEXT("%") + Invoke lstrcat, Addr szPercentText, Addr szMUIPBPercentSign ;CTEXT("%") Invoke lstrlen, Addr szPercentText mov dwLenPercentText, eax @@ -641,7 +642,7 @@ _MUI_ProgressBarPaintText PROC hWin:DWORD, hdc:DWORD, lpRect:DWORD, dwTextColor: Invoke SelectObject, hdc, hFont mov hFontOld, eax - Invoke GetTextExtentPoint32, hdc, CTEXT(" "), 1, Addr szspace + Invoke GetTextExtentPoint32, hdc, Addr szMUIPBSpace, 1, Addr szspace ; CTEXT(" ") Invoke GetTextExtentPoint32, hdc, Addr szPercentText, dwLenPercentText, Addr sz mov eax, sz.x .IF eax <= dwWidth diff --git a/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.inc b/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.inc index 96eed6c..c019690 100644 --- a/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.inc +++ b/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.inc @@ -2,7 +2,7 @@ ; ; ModernUI Control - ModernUI_ProgressBar ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.lib b/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.lib index 2de188e..13b334b 100644 Binary files a/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.lib and b/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.lib differ diff --git a/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.rap b/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.rap index 34a99d5..b1a3502 100644 --- a/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.rap +++ b/Controls/ModernUI_ProgressBar/ModernUI_ProgressBar.rap @@ -75,7 +75,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=7 +MilestoneOnDateDate=18 MilestoneOnDateTimeYear=2016 MilestoneOnDateTimeMonth=7 MilestoneOnDateTimeDate=19 @@ -99,18 +99,18 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=75995804 +PTimer=92880029 [Collapse] 2= -1=65541,1345061128,14 +1=1210286081,1478754560,14 5= 7= 6= 4= 3= [Size] -2=0,0,0,0,0 -1=0,0,0,0,37904 +2=0,0,0,0,146 +1=0,0,0,0,146 5=0,0,0,0,2 4=0,0,0,0,316 3=0,0,0,0,315 @@ -132,13 +132,13 @@ GroupExpand=1,1,0 [BreakPoint] 0= [Find] -1="EQU " -2="PROGRESS_HEARTBEAT_TIME" -3=">" -4="0," -5="@ProgressBarStep" -6=";-------------------------------------------------------------------------------------" -7=";--------------------------------------------------------------------------------------------------------------------------------------" -8="dwMouseOver" -9="@ProgressBarWidth" -10="_MUI_ProgressBarCalcWidth" +1="CTEXT" +2="szMUIProgressBarFont" +3="EQU " +4="PROGRESS_HEARTBEAT_TIME" +5=">" +6="0," +7="@ProgressBarStep" +8=";-------------------------------------------------------------------------------------" +9=";--------------------------------------------------------------------------------------------------------------------------------------" +10="dwMouseOver" diff --git a/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.asm b/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.asm index d93187d..c4e7d27 100644 --- a/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.asm +++ b/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.asm @@ -2,7 +2,7 @@ ; ; ModernUI Control - ModernUI_ProgressBarPlus (GDI+ version) ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.inc b/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.inc index d5e9dd8..4aa91cd 100644 --- a/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.inc +++ b/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.inc @@ -2,7 +2,7 @@ ; ; ModernUI Control - ModernUI_ProgressBarPlus (GDI+ version) ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.lib b/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.lib index c699824..83f6f2e 100644 Binary files a/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.lib and b/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.lib differ diff --git a/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.rap b/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.rap index d0fdb5a..7da6cee 100644 --- a/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.rap +++ b/Controls/ModernUI_ProgressBarPlus/ModernUI_ProgressBarPlus.rap @@ -75,7 +75,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=9 +MilestoneOnDateDate=18 MilestoneOnDateTimeYear=2016 MilestoneOnDateTimeMonth=7 MilestoneOnDateTimeDate=19 @@ -99,7 +99,7 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=67325128 +PTimer=67339784 [Collapse] 2= 1=839147524,3670048, @@ -109,8 +109,8 @@ PTimer=67325128 4= 3= [Size] -2=0,0,0,0,3882 -1=0,0,0,0,9393 +2=0,0,0,0,165 +1=0,0,0,0,165 5=0,0,0,0,401 4=0,0,0,0,778 3=0,0,0,0,755 diff --git a/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.asm b/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.asm index 4647147..5bf682d 100644 --- a/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.asm +++ b/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.asm @@ -2,11 +2,7 @@ ; ; ModernUI Control - ModernUI_ProgressDots ; -; Copyright (c) 2018 by fearless -; -; All Rights Reserved -; -; http://www.LetTheLight.in +; Copyright (c) 2023 by fearless ; ; http://github.com/mrfearless/ModernUI ; diff --git a/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.inc b/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.inc index ab95320..91895f0 100644 --- a/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.inc +++ b/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.inc @@ -2,11 +2,7 @@ ; ; ModernUI Control - ModernUI_ProgressDots ; -; Copyright (c) 2018 by fearless -; -; All Rights Reserved -; -; http://www.LetTheLight.in +; Copyright (c) 2023 by fearless ; ; http://github.com/mrfearless/ModernUI ; diff --git a/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.lib b/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.lib index 1d6b9d4..82cc4de 100644 Binary files a/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.lib and b/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.lib differ diff --git a/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.rap b/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.rap index a4c2c8b..e5fc027 100644 --- a/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.rap +++ b/Controls/ModernUI_ProgressDots/ModernUI_ProgressDots.rap @@ -61,7 +61,7 @@ Group=Assembly,Misc 6=2 7=2 [AutoLoad] -AutoLoad=2 +AutoLoad=2,1,4,3 [RADebugBP] 1= 2= @@ -75,7 +75,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=30 +MilestoneOnDateDate=18 MilestoneOnDateTimeYear=2018 MilestoneOnDateTimeMonth=7 MilestoneOnDateTimeDate=28 @@ -99,9 +99,9 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=50006132 +PTimer=50177029 [Collapse] -1=8650752,84051985, +1=8650752,84019217, 2= 4= 3= @@ -109,9 +109,9 @@ PTimer=50006132 6= 5= [Size] -1=0,0,0,0,11307 -2=0,0,0,0,3002 -4=0,0,0,0,508 +1=0,0,0,0,160 +2=0,0,0,0,160 +4=0,0,0,0,316 3=0,0,0,0,1251 5=0,0,0,0,646 7=0,0,0,0,316 @@ -132,10 +132,11 @@ GroupExpand=1,1,0 [BreakPoint] 0= [Find] -1="DOTS_SHOW_INTERVAL" -2="DOTS_TIME_INTERVAL" -3=";-------------------------------------------------------------------------------------" -4=";--------------------------------------------------------------------------------------------------------------------------------------" -5="Defer" -6="SHOW_INTERVAL" -7="_MUI_ProgressDotsCalcPositions" +1="http://www.LetTheLight.in" +2="DOTS_SHOW_INTERVAL" +3="DOTS_TIME_INTERVAL" +4=";-------------------------------------------------------------------------------------" +5=";--------------------------------------------------------------------------------------------------------------------------------------" +6="Defer" +7="SHOW_INTERVAL" +8="_MUI_ProgressDotsCalcPositions" diff --git a/Controls/ModernUI_Region/ModernUI_Region.asm b/Controls/ModernUI_Region/ModernUI_Region.asm index d79bdaf..100c94a 100644 --- a/Controls/ModernUI_Region/ModernUI_Region.asm +++ b/Controls/ModernUI_Region/ModernUI_Region.asm @@ -2,12 +2,10 @@ ; ; ModernUI Control - ModernUI_Region ; -; Copyright (c) 2018 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; -; http://www.LetTheLight.in -; ; http://github.com/mrfearless/ModernUI ; ; diff --git a/Controls/ModernUI_Region/ModernUI_Region.inc b/Controls/ModernUI_Region/ModernUI_Region.inc index 5a17720..0a64c68 100644 --- a/Controls/ModernUI_Region/ModernUI_Region.inc +++ b/Controls/ModernUI_Region/ModernUI_Region.inc @@ -2,12 +2,10 @@ ; ; ModernUI Control - ModernUI_Region ; -; Copyright (c) 2018 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; -; http://www.LetTheLight.in -; ; http://github.com/mrfearless/ModernUI ; ; diff --git a/Controls/ModernUI_Region/ModernUI_Region.lib b/Controls/ModernUI_Region/ModernUI_Region.lib index 748d7a1..0db7f0c 100644 Binary files a/Controls/ModernUI_Region/ModernUI_Region.lib and b/Controls/ModernUI_Region/ModernUI_Region.lib differ diff --git a/Controls/ModernUI_Region/ModernUI_Region.rap b/Controls/ModernUI_Region/ModernUI_Region.rap index 8909ff6..e0250c3 100644 --- a/Controls/ModernUI_Region/ModernUI_Region.rap +++ b/Controls/ModernUI_Region/ModernUI_Region.rap @@ -61,7 +61,7 @@ Group=Misc,Assembly 6=1 7=1 [AutoLoad] -AutoLoad=2 +AutoLoad=2,4,1 [RADebugBP] 1= 2= @@ -76,7 +76,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=30 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2017 MilestoneOnDateTimeMonth=6 MilestoneOnDateTimeDate=13 @@ -100,19 +100,19 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=225677507 +PTimer=233622741 [Collapse] 2= -1=136277,537133172,285492229,152076288,3817472 +1=136277,262260,285492224,152076288,3801088 4= 3= 7= 6= 5= [Size] -2=0,0,0,0,3563 -1=0,0,0,0,73716 -4=0,0,0,0,3952 +2=0,0,0,0,178 +1=0,0,0,0,141 +4=0,0,0,0,310 3=0,0,0,0,0 5=0,0,0,0,1452 7=0,0,0,0,448 @@ -133,6 +133,9 @@ GroupExpand=1,1,0 [BreakPoint] 0= [Find] -1="_MUI_AdjustPolyPoints" -2=";-------------------------------------------------------------------------------------" -3=";--------------------------------------------------------------------------------------------------------------------------------------" +1="MUIRegionButtonSetBrush" +2="MUIRegionButtonSetRegionBitmap" +3="MUIRegionButtonSetBitmap" +4="_MUI_AdjustPolyPoints" +5=";-------------------------------------------------------------------------------------" +6=";--------------------------------------------------------------------------------------------------------------------------------------" diff --git a/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.asm b/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.asm index 5e0a122..61b1f32 100644 --- a/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.asm +++ b/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.asm @@ -2,7 +2,7 @@ ; ; ModernUI Control - ModernUI_SmartPanel ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; @@ -43,15 +43,15 @@ option casemap:none include \masm32\macros\macros.asm -DEBUG32 EQU 1 - -IFDEF DEBUG32 - PRESERVEXMMREGS equ 1 - includelib M:\Masm32\lib\Debug32.lib - DBG32LIB equ 1 - DEBUGEXE textequ <'M:\Masm32\DbgWin.exe'> - include M:\Masm32\include\debug32.inc -ENDIF +;DEBUG32 EQU 1 +; +;IFDEF DEBUG32 +; PRESERVEXMMREGS equ 1 +; includelib M:\Masm32\lib\Debug32.lib +; DBG32LIB equ 1 +; DEBUGEXE textequ <'M:\Masm32\DbgWin.exe'> +; include M:\Masm32\include\debug32.inc +;ENDIF include windows.inc include user32.inc diff --git a/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.inc b/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.inc index f3a1e1b..ed6e2eb 100644 --- a/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.inc +++ b/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.inc @@ -2,7 +2,7 @@ ; ; ModernUI Control - ModernUI_SmartPanel ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.lib b/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.lib index 8b9078b..87a6e8f 100644 Binary files a/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.lib and b/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.lib differ diff --git a/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.rap b/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.rap index c860b8c..ad3c6ee 100644 --- a/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.rap +++ b/Controls/ModernUI_SmartPanel/ModernUI_SmartPanel.rap @@ -75,7 +75,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=13 +MilestoneOnDateDate=18 MilestoneOnDateTimeYear=2016 MilestoneOnDateTimeMonth=7 MilestoneOnDateTimeDate=18 @@ -99,18 +99,18 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=79479892 +PTimer=84969564 [Collapse] 2= -1=2147483636,1503695391,3407857,3803273 +1=2147483616,1495302687,1310705,3819649 3= 5= 7= 6= 4= [Size] -2=0,0,0,0,3729 -1=0,0,0,0,23803 +2=0,0,0,0,145 +1=0,0,0,0,18986 3=0,0,0,0,1150 5=0,0,0,0,2123 4=0,0,0,0,1011 @@ -132,13 +132,13 @@ GroupExpand=1,1,0 [BreakPoint] 0= [Find] -1="EQU " -2=";-------------------------------------------------------------------------------------------------------------" -3=";-------------------------------------------------------------------------------------" -4=";--------------------------------------------------------------------------------------------------------------------------------------" -5="SetWindowLong" -6="Invoke MUISetIntProperty, hControl, @SmartPanelCurrentPanel" -7="MUISetExtProperty" -8="MUIGetExtProperty" -9="@SmartPanelPanelsArray" -10="hinstance" +1="NM_MUISMARTPANEL" +2="EQU " +3=";-------------------------------------------------------------------------------------------------------------" +4=";-------------------------------------------------------------------------------------" +5=";--------------------------------------------------------------------------------------------------------------------------------------" +6="SetWindowLong" +7="Invoke MUISetIntProperty, hControl, @SmartPanelCurrentPanel" +8="MUISetExtProperty" +9="MUIGetExtProperty" +10="@SmartPanelPanelsArray" diff --git a/Controls/ModernUI_Spinner/ModernUI_Spinner.asm b/Controls/ModernUI_Spinner/ModernUI_Spinner.asm index 3d4cb32..8ad13b1 100644 --- a/Controls/ModernUI_Spinner/ModernUI_Spinner.asm +++ b/Controls/ModernUI_Spinner/ModernUI_Spinner.asm @@ -2,7 +2,7 @@ ; ; ModernUI Control - ModernUI_Spinner ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/Controls/ModernUI_Spinner/ModernUI_Spinner.inc b/Controls/ModernUI_Spinner/ModernUI_Spinner.inc index c28cd73..a9d9ef5 100644 --- a/Controls/ModernUI_Spinner/ModernUI_Spinner.inc +++ b/Controls/ModernUI_Spinner/ModernUI_Spinner.inc @@ -2,7 +2,7 @@ ; ; ModernUI Control - ModernUI_Spinner ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/Controls/ModernUI_Spinner/ModernUI_Spinner.lib b/Controls/ModernUI_Spinner/ModernUI_Spinner.lib index 30a0fe5..c3a900e 100644 Binary files a/Controls/ModernUI_Spinner/ModernUI_Spinner.lib and b/Controls/ModernUI_Spinner/ModernUI_Spinner.lib differ diff --git a/Controls/ModernUI_Spinner/ModernUI_Spinner.rap b/Controls/ModernUI_Spinner/ModernUI_Spinner.rap index 98720a1..42fd823 100644 --- a/Controls/ModernUI_Spinner/ModernUI_Spinner.rap +++ b/Controls/ModernUI_Spinner/ModernUI_Spinner.rap @@ -62,15 +62,15 @@ Group=Assembly,Misc 6=2 7=2 [AutoLoad] -AutoLoad=2,1,3,4 +AutoLoad=1,2 [RADebugBP] 2= 1= [Size] 3=0,0,0,0,162 4=0,0,0,0,311 -2=0,0,0,0,2394 -1=0,0,0,0,23828 +2=0,0,0,0,142 +1=0,0,0,0,142 7=0,0,0,0,311 6=0,0,0,0,313 5=0,0,0,0,1098 @@ -84,7 +84,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=22 +MilestoneOnDateDate=18 MilestoneOnDateTimeYear=2019 MilestoneOnDateTimeMonth=6 MilestoneOnDateTimeDate=24 @@ -108,11 +108,11 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=123679730 +PTimer=134736388 [Collapse] 3= 2= -1=16384,275513549,151011456,4196864, +1=134234368,1416497285,201326592,4213312, 7= 6= 5= @@ -133,13 +133,13 @@ GroupExpand=1,1,0 [BreakPoint] 0= [Find] -1="GdipDrawImage" -2="MUISpinnerLoadImageFrames" -3="MUISpinnerAddImageFrames" -4="_MUI_SpinnerGetCurrentFrame" -5="_MUI_SpinnerNextFrame" -6="CurrentFrame" -7="_MUI_SpinnerUpdate" -8="_MUI_SpinnerGetNextFrame" -9="MUISpinnerLoadBitmapStages" -10="MUISpinnerLoadImageStage" +1="finit" +2="_MUI_SpinnerTimerProc" +3="GdipDrawImage" +4="MUISpinnerLoadImageFrames" +5="MUISpinnerAddImageFrames" +6="_MUI_SpinnerGetCurrentFrame" +7="_MUI_SpinnerNextFrame" +8="CurrentFrame" +9="_MUI_SpinnerUpdate" +10="_MUI_SpinnerGetNextFrame" diff --git a/Controls/ModernUI_Text/ModernUI_DrawTextEXT.asm b/Controls/ModernUI_Text/ModernUI_DrawTextEXT.asm index 084ef87..808fc70 100644 --- a/Controls/ModernUI_Text/ModernUI_DrawTextEXT.asm +++ b/Controls/ModernUI_Text/ModernUI_DrawTextEXT.asm @@ -4,8 +4,6 @@ ; ; Copyright (c) 2019 by fearless ; -; All Rights Reserved -; ; http://github.com/mrfearless/ModernUI ; ; diff --git a/Controls/ModernUI_Text/ModernUI_Text.asm b/Controls/ModernUI_Text/ModernUI_Text.asm index 0c8aed0..4c45bdf 100644 --- a/Controls/ModernUI_Text/ModernUI_Text.asm +++ b/Controls/ModernUI_Text/ModernUI_Text.asm @@ -2,7 +2,7 @@ ; ; ModernUI Control - ModernUI_Text ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; @@ -402,7 +402,7 @@ MUI_ALIGN ;------------------------------------------------------------------------------ ; Set property for ModernUI_Text control ;------------------------------------------------------------------------------ -MUITextSetProperty PROC PUBLIC hControl:DWORD, dwProperty:DWORD, dwPropertyValue:DWORD +MUITextSetProperty PROC hControl:DWORD, dwProperty:DWORD, dwPropertyValue:DWORD Invoke SendMessage, hControl, MUI_SETPROPERTY, dwProperty, dwPropertyValue ret MUITextSetProperty ENDP @@ -412,7 +412,7 @@ MUI_ALIGN ;------------------------------------------------------------------------------ ; Get property for ModernUI_Text control ;------------------------------------------------------------------------------ -MUITextGetProperty PROC PUBLIC hControl:DWORD, dwProperty:DWORD +MUITextGetProperty PROC hControl:DWORD, dwProperty:DWORD Invoke SendMessage, hControl, MUI_GETPROPERTY, dwProperty, NULL ret MUITextGetProperty ENDP @@ -424,7 +424,7 @@ MUI_ALIGN ; can be used at start of program for use with RadASM custom control ; Custom control class must be set as ModernUI_Text ;------------------------------------------------------------------------------ -MUITextRegister PROC PUBLIC +MUITextRegister PROC LOCAL wc:WNDCLASSEX LOCAL hinstance:DWORD @@ -462,7 +462,7 @@ MUI_ALIGN ;------------------------------------------------------------------------------ ; MUITextCreate - Returns handle in eax of newly created control ;------------------------------------------------------------------------------ -MUITextCreate PROC PUBLIC hWndParent:DWORD, lpszText:DWORD, xpos:DWORD, ypos:DWORD, controlwidth:DWORD, controlheight:DWORD, dwResourceID:DWORD, dwStyle:DWORD +MUITextCreate PROC hWndParent:DWORD, lpszText:DWORD, xpos:DWORD, ypos:DWORD, controlwidth:DWORD, controlheight:DWORD, dwResourceID:DWORD, dwStyle:DWORD LOCAL wc:WNDCLASSEX LOCAL hinstance:DWORD LOCAL hControl:DWORD @@ -494,7 +494,7 @@ MUI_ALIGN ;------------------------------------------------------------------------------ ; _MUI_TextWndProc - Main processing window for our control ;------------------------------------------------------------------------------ -_MUI_TextWndProc PROC PRIVATE USES EBX hWin:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM +_MUI_TextWndProc PROC USES EBX hWin:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM LOCAL TE:TRACKMOUSEEVENT LOCAL lpUTF8String:DWORD @@ -822,23 +822,23 @@ _MUI_TextPaint PROC PRIVATE hWin:DWORD LOCAL BackColor:DWORD LOCAL hBackBrush:DWORD - Invoke BeginPaint, hWin, Addr ps - mov hdc, eax - Invoke IsWindowVisible, hWin .IF eax == FALSE ;PrintText 'IsWindowVisible Not Visible' - Invoke EndPaint, hWin, Addr ps + ;Invoke EndPaint, hWin, Addr ps ret .ENDIF Invoke GetWindowLong, hWin, 0 .IF eax == 0 ;PrintText 'Property Mem Not Allocated Yet' - Invoke EndPaint, hWin, Addr ps + ;Invoke EndPaint, hWin, Addr ps ret .ENDIF + Invoke BeginPaint, hWin, Addr ps + mov hdc, eax + ;---------------------------------------------------------- ; Get some property values ;---------------------------------------------------------- @@ -1073,6 +1073,8 @@ _MUI_TextPaintText PROC PRIVATE hWin:DWORD, hdc:DWORD, lpRect:DWORD, bEnabledSta .IF lpMUITextBuffer != 0 Invoke GetWindowText, hWin, lpMUITextBuffer, MUI_TEXT_MAX_CHARS ; length of string is returned in eax + .ELSE + mov eax, 0 .ENDIF mov LenText, eax diff --git a/Controls/ModernUI_Text/ModernUI_Text.inc b/Controls/ModernUI_Text/ModernUI_Text.inc index f1bad26..e117d72 100644 --- a/Controls/ModernUI_Text/ModernUI_Text.inc +++ b/Controls/ModernUI_Text/ModernUI_Text.inc @@ -2,7 +2,7 @@ ; ; ModernUI Control - ModernUI_Text ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/Controls/ModernUI_Text/ModernUI_Text.lib b/Controls/ModernUI_Text/ModernUI_Text.lib deleted file mode 100644 index 1081898..0000000 Binary files a/Controls/ModernUI_Text/ModernUI_Text.lib and /dev/null differ diff --git a/Controls/ModernUI_Text/ModernUI_Text.rap b/Controls/ModernUI_Text/ModernUI_Text.rap index 23526d3..d67b59c 100644 --- a/Controls/ModernUI_Text/ModernUI_Text.rap +++ b/Controls/ModernUI_Text/ModernUI_Text.rap @@ -64,7 +64,7 @@ Group=Assembly,Misc 7=1 8=2 [AutoLoad] -AutoLoad=2,4,1,5 +AutoLoad=2,4,1,5,7 [RADebugBP] 2= 1= @@ -72,10 +72,10 @@ AutoLoad=2,4,1,5 3= [Size] 3=0,0,0,0,5203 -1=0,0,0,0,41574 -2=0,0,0,0,5057 +1=0,0,0,0,37386 +2=0,0,0,0,6188 4=0,0,0,0,561 -7=0,0,0,0,2121 +7=0,0,0,0,139 6=0,0,0,0,310 5=0,0,0,0,1196 8=0,0,0,0,0 @@ -89,7 +89,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=26 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2017 MilestoneOnDateTimeMonth=2 MilestoneOnDateTimeDate=22 @@ -113,9 +113,9 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=1106197413 +PTimer=1116694290 [Collapse] -1=1092684564,2129952,67648,106496 +1=,,2112,32768 2= 3= 4= @@ -139,13 +139,13 @@ GroupExpand=1,1,0 [BreakPoint] 0= [Find] -1="lstrlen" -2="masm32" -3=";" -4="EQU " -5="@" -6="@TextFont" -7="ListLevel" -8="MUI_UNICODE" -9=";-------------------------------------------------------------------------------------" -10=";--------------------------------------------------------------------------------------------------------------------------------------" +1="@TextBuffer" +2="@@TextBufferSize" +3="http://www.LetTheLight.in" +4="lstrlen" +5="masm32" +6=";" +7="EQU " +8="@" +9="@TextFont" +10="ListLevel" diff --git a/Controls/ModernUI_Text/ModernUI_TextWide.lib b/Controls/ModernUI_Text/ModernUI_TextWide.lib index 260f612..2ce7833 100644 Binary files a/Controls/ModernUI_Text/ModernUI_TextWide.lib and b/Controls/ModernUI_Text/ModernUI_TextWide.lib differ diff --git a/Controls/ModernUI_Text/ModernUI_TextWide.rap b/Controls/ModernUI_Text/ModernUI_TextWide.rap index e0e8bb3..46bda48 100644 --- a/Controls/ModernUI_Text/ModernUI_TextWide.rap +++ b/Controls/ModernUI_Text/ModernUI_TextWide.rap @@ -64,7 +64,7 @@ Group=Assembly,Misc 7=1 8=2 [AutoLoad] -AutoLoad=2 +AutoLoad=2,1 [RADebugBP] 2= 1= @@ -89,7 +89,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=30 +MilestoneOnDateDate=18 MilestoneOnDateTimeYear=2017 MilestoneOnDateTimeMonth=2 MilestoneOnDateTimeDate=22 @@ -113,7 +113,7 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=1084010592 +PTimer=1084838826 [Collapse] 1=136347688,16779264,67108865, 2= diff --git a/Controls/ModernUI_Tooltip/ModernUI_Tooltip.asm b/Controls/ModernUI_Tooltip/ModernUI_Tooltip.asm index 89a7c5c..306be6e 100644 --- a/Controls/ModernUI_Tooltip/ModernUI_Tooltip.asm +++ b/Controls/ModernUI_Tooltip/ModernUI_Tooltip.asm @@ -2,11 +2,7 @@ ; ; ModernUI Control - ModernUI_Tooltip ; -; Copyright (c) 2018 by fearless -; -; All Rights Reserved -; -; http://www.LetTheLight.in +; Copyright (c) 2023 by fearless ; ; http://github.com/mrfearless/ModernUI ; diff --git a/Controls/ModernUI_Tooltip/ModernUI_Tooltip.inc b/Controls/ModernUI_Tooltip/ModernUI_Tooltip.inc index 0fd6f03..3411b31 100644 --- a/Controls/ModernUI_Tooltip/ModernUI_Tooltip.inc +++ b/Controls/ModernUI_Tooltip/ModernUI_Tooltip.inc @@ -2,11 +2,7 @@ ; ; ModernUI Control - ModernUI_Tooltip ; -; Copyright (c) 2018 by fearless -; -; All Rights Reserved -; -; http://www.LetTheLight.in +; Copyright (c) 2023 by fearless ; ; http://github.com/mrfearless/ModernUI ; diff --git a/Controls/ModernUI_Tooltip/ModernUI_Tooltip.lib b/Controls/ModernUI_Tooltip/ModernUI_Tooltip.lib index fbfd2e8..05a38db 100644 Binary files a/Controls/ModernUI_Tooltip/ModernUI_Tooltip.lib and b/Controls/ModernUI_Tooltip/ModernUI_Tooltip.lib differ diff --git a/Controls/ModernUI_Tooltip/ModernUI_Tooltip.rap b/Controls/ModernUI_Tooltip/ModernUI_Tooltip.rap index d9b1809..235a54a 100644 --- a/Controls/ModernUI_Tooltip/ModernUI_Tooltip.rap +++ b/Controls/ModernUI_Tooltip/ModernUI_Tooltip.rap @@ -61,7 +61,7 @@ Group=Assembly,Misc 6=2 7=2 [AutoLoad] -AutoLoad=2 +AutoLoad=2,3,1 [RADebugBP] 2= 1= @@ -75,7 +75,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=30 +MilestoneOnDateDate=18 MilestoneOnDateTimeYear=2018 MilestoneOnDateTimeMonth=1 MilestoneOnDateTimeDate=21 @@ -99,9 +99,9 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=28565781 +PTimer=32368591 [Collapse] -1=640,143721024,20971524, +1=640,143721024,4, 5= 2= 3= @@ -109,10 +109,10 @@ PTimer=28565781 7= 6= [Size] -1=0,0,0,0,46801 +1=0,0,0,0,155 5=0,0,0,0,867 -2=0,0,0,0,3078 -3=0,0,0,0,507 +2=0,0,0,0,155 +3=0,0,0,0,311 4=0,0,0,0,0 7=0,0,0,0,311 6=0,0,0,0,313 diff --git a/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.asm b/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.asm index 638b3f9..757abb9 100644 --- a/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.asm +++ b/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.asm @@ -4,10 +4,6 @@ ; ; Copyright (c) 2018 by fearless ; -; All Rights Reserved -; -; http://www.LetTheLight.in -; ; http://github.com/mrfearless/ModernUI ; ; @@ -45,15 +41,15 @@ option casemap:none include \masm32\macros\macros.asm -DEBUG32 EQU 1 - -IFDEF DEBUG32 - PRESERVEXMMREGS equ 1 - includelib M:\Masm32\lib\Debug32.lib - DBG32LIB equ 1 - DEBUGEXE textequ <'M:\Masm32\DbgWin.exe'> - include M:\Masm32\include\debug32.inc -ENDIF +;DEBUG32 EQU 1 +; +;IFDEF DEBUG32 +; PRESERVEXMMREGS equ 1 +; includelib M:\Masm32\lib\Debug32.lib +; DBG32LIB equ 1 +; DEBUGEXE textequ <'M:\Masm32\DbgWin.exe'> +; include M:\Masm32\include\debug32.inc +;ENDIF include windows.inc include user32.inc diff --git a/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.inc b/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.inc index 65b0fbf..022702f 100644 --- a/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.inc +++ b/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.inc @@ -2,11 +2,7 @@ ; ; ModernUI Control - ModernUI_TrayMenu ; -; Copyright (c) 2018 by fearless -; -; All Rights Reserved -; -; http://www.LetTheLight.in +; Copyright (c) 2023 by fearless ; ; http://github.com/mrfearless/ModernUI ; @@ -177,7 +173,9 @@ IFNDEF MUITRAYMENU_END ; Used with TrayMenuCreate and/or TrayMenuAssignM MUITRAYMENU_END TEXTEQU ENDIF - - - - +; +; https://masm32.com/board/index.php?topic=7972.0 +; HWND hWndTray = FindWindow(TEXT("Shell_TrayWnd"), NULL); +; hWndTray = GetWindow(hWndTray, GW_CHILD); //notification area +; PostMessage(hWndTray, WM_PAINT , 0, 0); +; diff --git a/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.lib b/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.lib index 5b6dfc9..bcb0406 100644 Binary files a/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.lib and b/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.lib differ diff --git a/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.rap b/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.rap index eae1303..2009d01 100644 --- a/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.rap +++ b/Controls/ModernUI_TrayMenu/ModernUI_TrayMenu.rap @@ -5,7 +5,7 @@ Description=ModernUI_TrayMenu Backup=$P\Bak\ Group=1 GroupExpand=1 -Debug=1 +Debug=0 [Files] 1=ModernUI_TrayMenu.asm 2=ModernUI_TrayMenu.inc @@ -76,7 +76,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=26 +MilestoneOnDateDate=18 MilestoneOnDateTimeYear=2017 MilestoneOnDateTimeMonth=7 MilestoneOnDateTimeDate=16 @@ -100,9 +100,9 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=73694137 +PTimer=77078634 [Collapse] -1=873071168,270819712,68609,107347968,432905920,15876 +1=873071168,270819712,68609,107347968,427917888,14336 2= 3= 7= @@ -110,8 +110,8 @@ PTimer=73694137 5= 4= [Size] -1=0,0,0,0,38424 -2=0,0,0,0,6603 +1=0,0,0,0,158 +2=0,0,0,0,158 3=0,0,0,0,0 5=0,0,0,0,991 4=0,0,0,0,1166 @@ -133,13 +133,13 @@ GroupExpand=1,1,0 [BreakPoint] 0= [Find] -1="Invoke _MUI_TM_IconText" -2="Timeout" -3="Shell_NotifyIcon" -4="MUITrayMenuSetTrayIconText" -5="KillTimer" -6="_MUI_TM_IconText" -7="@TrayParent" -8="_MUI_TM_RestoreFromTray" -9="MUITrayMenuSetMenuItemText" -10="_MUI_TM_AddIconAndTooltip" +1="_MUI_TrayMenuInit" +2="WM_INITSUBCLASS" +3="_MUI_TrayMenuSetSubclass" +4="Invoke _MUI_TM_IconText" +5="Timeout" +6="Shell_NotifyIcon" +7="MUITrayMenuSetTrayIconText" +8="KillTimer" +9="_MUI_TM_IconText" +10="@TrayParent" diff --git a/Examples/MUIAnim1/MUIAnim1.exe b/Examples/MUIAnim1/MUIAnim1.exe index f67e1b6..70dff7d 100644 Binary files a/Examples/MUIAnim1/MUIAnim1.exe and b/Examples/MUIAnim1/MUIAnim1.exe differ diff --git a/Examples/MUIAnim1/MUIAnim1.rap b/Examples/MUIAnim1/MUIAnim1.rap index 8640ef7..9ca2b61 100644 --- a/Examples/MUIAnim1/MUIAnim1.rap +++ b/Examples/MUIAnim1/MUIAnim1.rap @@ -90,13 +90,13 @@ AutoLoad=2,1,4 Settings=1148 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=3 +MilestoneEveryCurrent=4 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=23 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2019 MilestoneOnDateTimeMonth=7 MilestoneOnDateTimeDate=19 @@ -120,7 +120,7 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=28019808 +PTimer=28029230 [Collapse] 2= 1= diff --git a/Examples/MUIButton1/MUIButton1.exe b/Examples/MUIButton1/MUIButton1.exe index fbd7cb8..f930fed 100644 Binary files a/Examples/MUIButton1/MUIButton1.exe and b/Examples/MUIButton1/MUIButton1.exe differ diff --git a/Examples/MUIButton1/MUIButton1.rap b/Examples/MUIButton1/MUIButton1.rap index 13058b5..e7befc8 100644 --- a/Examples/MUIButton1/MUIButton1.rap +++ b/Examples/MUIButton1/MUIButton1.rap @@ -60,10 +60,10 @@ Menu=1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0 7=,105,0,house_grey.bmp [StringTable] [VerInf] -FV=0.0.0.5 -FileVersion=0.0.0.5 -PV=0.0.0.5 -ProductVersion=0.0.0.5 +FV=0.0.0.6 +FileVersion=0.0.0.6 +PV=0.0.0.6 +ProductVersion=0.0.0.6 Nme=VERINF1 ID=1 VerOS=0x00000004 @@ -93,13 +93,13 @@ AutoLoad=2,1,4 Settings=1279 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=1 +MilestoneEveryCurrent=2 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=21 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2016 MilestoneOnDateTimeMonth=5 MilestoneOnDateTimeDate=31 @@ -123,13 +123,13 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=34269440 +PTimer=37305959 [Collapse] 1= 2= [Size] -1=0,0,0,0,3215 -2=0,0,0,0,322 +1=0,0,0,0,4369 +2=0,0,0,0,435 4=0,0,0,0 [GroupExpand] GroupExpand=1,0,1,0 diff --git a/Examples/MUIButton1/Res/MUIButton1Ver.rc b/Examples/MUIButton1/Res/MUIButton1Ver.rc index bb6e2e4..88ef3f8 100644 --- a/Examples/MUIButton1/Res/MUIButton1Ver.rc +++ b/Examples/MUIButton1/Res/MUIButton1Ver.rc @@ -1,7 +1,7 @@ #define VERINF1 1 VERINF1 VERSIONINFO -FILEVERSION 0,0,0,5 -PRODUCTVERSION 0,0,0,5 +FILEVERSION 0,0,0,6 +PRODUCTVERSION 0,0,0,6 FILEOS 0x00000004 FILETYPE 0x00000001 BEGIN @@ -9,12 +9,12 @@ BEGIN BEGIN BLOCK "040904B0" BEGIN - VALUE "FileVersion", "0.0.0.5\0" + VALUE "FileVersion", "0.0.0.6\0" VALUE "FileDescription", "MUIButton Example #1\0" VALUE "InternalName", "MUIButton1\0" VALUE "OriginalFilename", "MUIButton1\0" VALUE "ProductName", "MUIButton1\0" - VALUE "ProductVersion", "0.0.0.5\0" + VALUE "ProductVersion", "0.0.0.6\0" END END BLOCK "VarFileInfo" diff --git a/Examples/MUIButtonGradient1/MUIButtonGradient1.exe b/Examples/MUIButtonGradient1/MUIButtonGradient1.exe index 96f7199..0adf1f3 100644 Binary files a/Examples/MUIButtonGradient1/MUIButtonGradient1.exe and b/Examples/MUIButtonGradient1/MUIButtonGradient1.exe differ diff --git a/Examples/MUIButtonGradient1/MUIButtonGradient1.rap b/Examples/MUIButtonGradient1/MUIButtonGradient1.rap index 43ceffb..a0ed22f 100644 --- a/Examples/MUIButtonGradient1/MUIButtonGradient1.rap +++ b/Examples/MUIButtonGradient1/MUIButtonGradient1.rap @@ -56,10 +56,10 @@ Menu=1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0 [StringTable] [Accel] [VerInf] -FV=0.0.1.1 -FileVersion=0.0.1.1 -PV=0.0.1.1 -ProductVersion=0.0.1.1 +FV=0.0.1.2 +FileVersion=0.0.1.2 +PV=0.0.1.2 +ProductVersion=0.0.1.2 Nme=VERINF1 ID=1 VerOS=0x00000004 @@ -89,13 +89,13 @@ AutoLoad=2,1 Settings=1279 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=1 +MilestoneEveryCurrent=2 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=27 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2019 MilestoneOnDateTimeMonth=10 MilestoneOnDateTimeDate=27 @@ -119,7 +119,7 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=1121257 +PTimer=1129007 [Collapse] 1= 2= diff --git a/Examples/MUIButtonGradient1/Res/MUIButtonGradient1Ver.rc b/Examples/MUIButtonGradient1/Res/MUIButtonGradient1Ver.rc index 7ee8b09..6e5ebed 100644 --- a/Examples/MUIButtonGradient1/Res/MUIButtonGradient1Ver.rc +++ b/Examples/MUIButtonGradient1/Res/MUIButtonGradient1Ver.rc @@ -1,7 +1,7 @@ #define VERINF1 1 VERINF1 VERSIONINFO -FILEVERSION 0,0,1,1 -PRODUCTVERSION 0,0,1,1 +FILEVERSION 0,0,1,2 +PRODUCTVERSION 0,0,1,2 FILEOS 0x00000004 FILETYPE 0x00000001 BEGIN @@ -9,8 +9,8 @@ BEGIN BEGIN BLOCK "040904B0" BEGIN - VALUE "FileVersion", "0.0.1.1\0" - VALUE "ProductVersion", "0.0.1.1\0" + VALUE "FileVersion", "0.0.1.2\0" + VALUE "ProductVersion", "0.0.1.2\0" END END BLOCK "VarFileInfo" diff --git a/Examples/MUIButtonTSOptions/Res/TSOptionsVer.rc b/Examples/MUIButtonTSOptions/Res/TSOptionsVer.rc index 717a010..e805a05 100644 --- a/Examples/MUIButtonTSOptions/Res/TSOptionsVer.rc +++ b/Examples/MUIButtonTSOptions/Res/TSOptionsVer.rc @@ -1,7 +1,7 @@ #define VERINF1 1 VERINF1 VERSIONINFO -FILEVERSION 1,0,6,5 -PRODUCTVERSION 1,0,6,5 +FILEVERSION 1,0,6,6 +PRODUCTVERSION 1,0,6,6 FILEOS 0x00000004 FILETYPE 0x00000001 BEGIN @@ -10,14 +10,14 @@ BEGIN BLOCK "040904B0" BEGIN VALUE "CompanyName", "fearless\0" - VALUE "FileVersion", "1.0.6.5\0" + VALUE "FileVersion", "1.0.6.6\0" VALUE "FileDescription", "TSOptions\0" VALUE "InternalName", "TSOptions\0" VALUE "LegalCopyright", "fearless\0" VALUE "LegalTrademarks", "fearless\0" VALUE "OriginalFilename", "TSOptions\0" VALUE "ProductName", "TSOptions\0" - VALUE "ProductVersion", "1.0.6.5\0" + VALUE "ProductVersion", "1.0.6.6\0" END END BLOCK "VarFileInfo" diff --git a/Examples/MUIButtonTSOptions/TSOptions.exe b/Examples/MUIButtonTSOptions/TSOptions.exe index 8070cd6..78d83ff 100644 Binary files a/Examples/MUIButtonTSOptions/TSOptions.exe and b/Examples/MUIButtonTSOptions/TSOptions.exe differ diff --git a/Examples/MUIButtonTSOptions/TSOptions.rap b/Examples/MUIButtonTSOptions/TSOptions.rap index 8de2658..0870120 100644 --- a/Examples/MUIButtonTSOptions/TSOptions.rap +++ b/Examples/MUIButtonTSOptions/TSOptions.rap @@ -67,10 +67,10 @@ Menu=1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0 15=,213,2,Images\32x32\notifications.ico [StringTable] [VerInf] -FV=1.0.6.5 -FileVersion=1.0.6.5 -PV=1.0.6.5 -ProductVersion=1.0.6.5 +FV=1.0.6.6 +FileVersion=1.0.6.6 +PV=1.0.6.6 +ProductVersion=1.0.6.6 Nme=VERINF1 ID=1 VerOS=0x00000004 @@ -100,13 +100,13 @@ AutoLoad=2,1,4 Settings=1279 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=0 +MilestoneEveryCurrent=4 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=10 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2018 MilestoneOnDateTimeMonth=7 MilestoneOnDateTimeDate=14 @@ -130,13 +130,13 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=9515873 +PTimer=9810831 [Collapse] 2= 1= [Size] 2=0,0,0,0,1541 -1=0,0,0,0,20482 +1=0,0,0,0,3679 4=0,0,0,0 [GroupExpand] GroupExpand=1,0,1,0 diff --git a/Examples/MUICaptionBar1/MUICaptionBar1.exe b/Examples/MUICaptionBar1/MUICaptionBar1.exe index ee0ca0a..c6d3b6e 100644 Binary files a/Examples/MUICaptionBar1/MUICaptionBar1.exe and b/Examples/MUICaptionBar1/MUICaptionBar1.exe differ diff --git a/Examples/MUICaptionBar1/MUICaptionBar1.rap b/Examples/MUICaptionBar1/MUICaptionBar1.rap index 18f6f79..065f077 100644 --- a/Examples/MUICaptionBar1/MUICaptionBar1.rap +++ b/Examples/MUICaptionBar1/MUICaptionBar1.rap @@ -57,10 +57,10 @@ Menu=1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0 4=,102,2,Images\mui_talk_16x16.ico [StringTable] [VerInf] -FV=0.1.7.1 -FileVersion=0.1.7.1 -PV=0.1.7.1 -ProductVersion=0.1.7.1 +FV=0.1.7.2 +FileVersion=0.1.7.2 +PV=0.1.7.2 +ProductVersion=0.1.7.2 Nme=VERINF1 ID=1 VerOS=0x00000004 @@ -90,13 +90,13 @@ AutoLoad=1,2,4 Settings=1279 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=3 +MilestoneEveryCurrent=4 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=28 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2016 MilestoneOnDateTimeMonth=5 MilestoneOnDateTimeDate=18 @@ -120,7 +120,7 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=48132174 +PTimer=48146487 [Size] 4=0,0,0,0 1=0,0,0,0,5063 diff --git a/Examples/MUICaptionBar1/Res/MUICaptionBar1Ver.rc b/Examples/MUICaptionBar1/Res/MUICaptionBar1Ver.rc index ae9d17b..905dc25 100644 --- a/Examples/MUICaptionBar1/Res/MUICaptionBar1Ver.rc +++ b/Examples/MUICaptionBar1/Res/MUICaptionBar1Ver.rc @@ -1,7 +1,7 @@ #define VERINF1 1 VERINF1 VERSIONINFO -FILEVERSION 0,1,7,1 -PRODUCTVERSION 0,1,7,1 +FILEVERSION 0,1,7,2 +PRODUCTVERSION 0,1,7,2 FILEOS 0x00000004 FILETYPE 0x00000001 BEGIN @@ -9,12 +9,12 @@ BEGIN BEGIN BLOCK "040904B0" BEGIN - VALUE "FileVersion", "0.1.7.1\0" + VALUE "FileVersion", "0.1.7.2\0" VALUE "FileDescription", "MUICaptionBar Example #1\0" VALUE "InternalName", "MUICaptionBar1\0" VALUE "OriginalFilename", "MUICaptionBar1\0" VALUE "ProductName", "MUICaptionBar1\0" - VALUE "ProductVersion", "0.1.7.1\0" + VALUE "ProductVersion", "0.1.7.2\0" END END BLOCK "VarFileInfo" diff --git a/Examples/MUICaptionBar2/MUICaptionBar2.exe b/Examples/MUICaptionBar2/MUICaptionBar2.exe index 6f80380..8acb3bf 100644 Binary files a/Examples/MUICaptionBar2/MUICaptionBar2.exe and b/Examples/MUICaptionBar2/MUICaptionBar2.exe differ diff --git a/Examples/MUICaptionBar2/MUICaptionBar2.rap b/Examples/MUICaptionBar2/MUICaptionBar2.rap index 6246744..1db87aa 100644 --- a/Examples/MUICaptionBar2/MUICaptionBar2.rap +++ b/Examples/MUICaptionBar2/MUICaptionBar2.rap @@ -53,10 +53,10 @@ Menu=1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0 1=,1,8,MUICaptionBar2.xml [StringTable] [VerInf] -FV=0.0.0.7 -FileVersion=0.0.0.7 -PV=0.0.0.7 -ProductVersion=0.0.0.7 +FV=0.0.0.8 +FileVersion=0.0.0.8 +PV=0.0.0.8 +ProductVersion=0.0.0.8 Nme=VERINF1 ID=1 VerOS=0x00000004 @@ -86,13 +86,13 @@ AutoLoad=1,2,4 Settings=1279 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=2 +MilestoneEveryCurrent=3 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=30 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2016 MilestoneOnDateTimeMonth=5 MilestoneOnDateTimeDate=18 @@ -116,7 +116,7 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=18727559 +PTimer=18735200 [Size] 4=0,0,0,0 1=0,0,0,0,615 diff --git a/Examples/MUICaptionBar2/Res/MUICaptionBar2Ver.rc b/Examples/MUICaptionBar2/Res/MUICaptionBar2Ver.rc index 47e772a..5758fc2 100644 --- a/Examples/MUICaptionBar2/Res/MUICaptionBar2Ver.rc +++ b/Examples/MUICaptionBar2/Res/MUICaptionBar2Ver.rc @@ -1,7 +1,7 @@ #define VERINF1 1 VERINF1 VERSIONINFO -FILEVERSION 0,0,0,7 -PRODUCTVERSION 0,0,0,7 +FILEVERSION 0,0,0,8 +PRODUCTVERSION 0,0,0,8 FILEOS 0x00000004 FILETYPE 0x00000001 BEGIN @@ -9,12 +9,12 @@ BEGIN BEGIN BLOCK "040904B0" BEGIN - VALUE "FileVersion", "0.0.0.7\0" + VALUE "FileVersion", "0.0.0.8\0" VALUE "FileDescription", "MUICaptionBar Example #2\0" VALUE "InternalName", "MUICaptionBar2\0" VALUE "OriginalFilename", "MUICaptionBar2\0" VALUE "ProductName", "MUICaptionBar2\0" - VALUE "ProductVersion", "0.0.0.7\0" + VALUE "ProductVersion", "0.0.0.8\0" END END BLOCK "VarFileInfo" diff --git a/Examples/MUICaptionBar3/MUICaptionBar3.exe b/Examples/MUICaptionBar3/MUICaptionBar3.exe index c91b58d..d97b3e7 100644 Binary files a/Examples/MUICaptionBar3/MUICaptionBar3.exe and b/Examples/MUICaptionBar3/MUICaptionBar3.exe differ diff --git a/Examples/MUICaptionBar3/MUICaptionBar3.rap b/Examples/MUICaptionBar3/MUICaptionBar3.rap index 01353be..da55c72 100644 --- a/Examples/MUICaptionBar3/MUICaptionBar3.rap +++ b/Examples/MUICaptionBar3/MUICaptionBar3.rap @@ -54,10 +54,10 @@ Menu=1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0 1=,1,8,MUICaptionBar3.xml [StringTable] [VerInf] -FV=0.0.0.6 -FileVersion=0.0.0.6 -PV=0.0.0.6 -ProductVersion=0.0.0.6 +FV=0.0.0.7 +FileVersion=0.0.0.7 +PV=0.0.0.7 +ProductVersion=0.0.0.7 Nme=VERINF1 ID=1 VerOS=0x00000004 @@ -88,13 +88,13 @@ AutoLoad=1,2,4,6 Settings=1279 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=7 +MilestoneEveryCurrent=8 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=30 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2016 MilestoneOnDateTimeMonth=5 MilestoneOnDateTimeDate=18 @@ -118,7 +118,7 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=26360720 +PTimer=26369783 [Size] 4=0,0,0,0 1=0,0,0,0,5299 diff --git a/Examples/MUICaptionBar3/Res/MUICaptionBar3Ver.rc b/Examples/MUICaptionBar3/Res/MUICaptionBar3Ver.rc index 904b467..adb261b 100644 --- a/Examples/MUICaptionBar3/Res/MUICaptionBar3Ver.rc +++ b/Examples/MUICaptionBar3/Res/MUICaptionBar3Ver.rc @@ -1,7 +1,7 @@ #define VERINF1 1 VERINF1 VERSIONINFO -FILEVERSION 0,0,0,6 -PRODUCTVERSION 0,0,0,6 +FILEVERSION 0,0,0,7 +PRODUCTVERSION 0,0,0,7 FILEOS 0x00000004 FILETYPE 0x00000001 BEGIN @@ -9,12 +9,12 @@ BEGIN BEGIN BLOCK "040904B0" BEGIN - VALUE "FileVersion", "0.0.0.6\0" + VALUE "FileVersion", "0.0.0.7\0" VALUE "FileDescription", "MUICaptionBar Example #3\0" VALUE "InternalName", "MUICaptionBar3\0" VALUE "OriginalFilename", "MUICaptionBar3\0" VALUE "ProductName", "MUICaptionBar3\0" - VALUE "ProductVersion", "0.0.0.6\0" + VALUE "ProductVersion", "0.0.0.7\0" END END BLOCK "VarFileInfo" diff --git a/Examples/MUICaptionBar4/MUICaptionBar4.exe b/Examples/MUICaptionBar4/MUICaptionBar4.exe index db9975b..1db421c 100644 Binary files a/Examples/MUICaptionBar4/MUICaptionBar4.exe and b/Examples/MUICaptionBar4/MUICaptionBar4.exe differ diff --git a/Examples/MUICaptionBar4/MUICaptionBar4.rap b/Examples/MUICaptionBar4/MUICaptionBar4.rap index 13f8fac..9c78f39 100644 --- a/Examples/MUICaptionBar4/MUICaptionBar4.rap +++ b/Examples/MUICaptionBar4/MUICaptionBar4.rap @@ -58,10 +58,10 @@ Menu=1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0 6=,104,2,Images\mui_close_10x10.ico [StringTable] [VerInf] -FV=0.0.4.0 -FileVersion=0.0.4.0 -PV=0.0.4.0 -ProductVersion=0.0.4.0 +FV=0.0.4.1 +FileVersion=0.0.4.1 +PV=0.0.4.1 +ProductVersion=0.0.4.1 Nme=VERINF1 ID=1 VerOS=0x00000004 @@ -91,13 +91,13 @@ AutoLoad=1,2,4 Settings=1279 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=2 +MilestoneEveryCurrent=3 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=20 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2016 MilestoneOnDateTimeMonth=5 MilestoneOnDateTimeDate=18 @@ -121,7 +121,7 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=39127188 +PTimer=39134360 [Size] 4=0,0,0,0 1=0,0,0,0,3264 diff --git a/Examples/MUICaptionBar4/Res/MUICaptionBar4Ver.rc b/Examples/MUICaptionBar4/Res/MUICaptionBar4Ver.rc index ccfa12a..5af0749 100644 --- a/Examples/MUICaptionBar4/Res/MUICaptionBar4Ver.rc +++ b/Examples/MUICaptionBar4/Res/MUICaptionBar4Ver.rc @@ -1,7 +1,7 @@ #define VERINF1 1 VERINF1 VERSIONINFO -FILEVERSION 0,0,4,0 -PRODUCTVERSION 0,0,4,0 +FILEVERSION 0,0,4,1 +PRODUCTVERSION 0,0,4,1 FILEOS 0x00000004 FILETYPE 0x00000001 BEGIN @@ -9,12 +9,12 @@ BEGIN BEGIN BLOCK "040904B0" BEGIN - VALUE "FileVersion", "0.0.4.0\0" + VALUE "FileVersion", "0.0.4.1\0" VALUE "FileDescription", "MUICaptionBar Example #4\0" VALUE "InternalName", "MUICaptionBar4\0" VALUE "OriginalFilename", "MUICaptionBar4\0" VALUE "ProductName", "MUICaptionBar4\0" - VALUE "ProductVersion", "0.0.4.0\0" + VALUE "ProductVersion", "0.0.4.1\0" END END BLOCK "VarFileInfo" diff --git a/Examples/MUIExample1/MUIExample1.asm b/Examples/MUIExample1/MUIExample1.asm index 848c4e1..b856e55 100644 --- a/Examples/MUIExample1/MUIExample1.asm +++ b/Examples/MUIExample1/MUIExample1.asm @@ -204,7 +204,7 @@ InitGUI PROC hWin:DWORD ; hCurrentPanel (for use with IsDialogMessage) Invoke MUISmartPanelSetCurrentPanel, hMUISmartPanel, 1, FALSE Invoke MUISmartPanelSetIsDlgMsgVar, hMUISmartPanel, Addr hCurrentPanel - ;Invoke MUISmartPanelSetProperty, hMUISmartPanel, @SmartPanelPanelsColor, MUI_RGBCOLOR(45,45,48) + Invoke MUISmartPanelSetProperty, hMUISmartPanel, @SmartPanelPanelsColor, MUI_RGBCOLOR(45,45,48) ;----------------------------------------------------------------------------------------------------- ; ModernUI_Text: Community Edition 2018 diff --git a/Examples/MUIExample1/MUIExample1.exe b/Examples/MUIExample1/MUIExample1.exe index 53b8f27..62cbf84 100644 Binary files a/Examples/MUIExample1/MUIExample1.exe and b/Examples/MUIExample1/MUIExample1.exe differ diff --git a/Examples/MUIExample1/MUIExample1.rap b/Examples/MUIExample1/MUIExample1.rap index 8a6b26b..f1eef34 100644 --- a/Examples/MUIExample1/MUIExample1.rap +++ b/Examples/MUIExample1/MUIExample1.rap @@ -88,7 +88,7 @@ Group=Assembly,Resources,Misc 8=2 9=2 [AutoLoad] -AutoLoad=1,4,5,2,6,7 +AutoLoad=1,4,5,2,6,7,8,9 [RADebugBP] 2= 1= @@ -105,7 +105,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=4 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2018 MilestoneOnDateTimeMonth=7 MilestoneOnDateTimeDate=28 @@ -129,18 +129,18 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=49612486 +PTimer=53006502 [Collapse] -1=7 +1=3 2= 3= 5= [Size] -1=0,0,0,0,4547 +1=0,0,0,0,8824 2=0,0,0,0,2211 4=0,0,0,0 3=0,0,0,0,28 -5=0,0,0,0,5045 +5=0,0,0,0,5549 6=0,0,0,0 7=0,0,0,0 8=0,0,0,0 diff --git a/Examples/MUIExample1/Panels.asm b/Examples/MUIExample1/Panels.asm index 45e7eb7..653c9b3 100644 --- a/Examples/MUIExample1/Panels.asm +++ b/Examples/MUIExample1/Panels.asm @@ -162,14 +162,14 @@ Panel1Proc PROC hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM ;----------------------------------------------------------------------------------------------------- ; ModernUI - Color background and border ;----------------------------------------------------------------------------------------------------- - .ELSEIF eax == WM_ERASEBKGND - mov eax, 1 - ret - - .ELSEIF eax == WM_PAINT - invoke MUIPaintBackground, hWin, MUI_RGBCOLOR(45,45,48), 0 - mov eax, 0 - ret +; .ELSEIF eax == WM_ERASEBKGND +; mov eax, 1 +; ret +; +; .ELSEIF eax == WM_PAINT +; invoke MUIPaintBackground, hWin, MUI_RGBCOLOR(45,45,48), 0 +; mov eax, 0 +; ret ;----------------------------------------------------------------------------------------------------- .ELSEIF eax==WM_CLOSE @@ -254,14 +254,14 @@ Panel2Proc PROC hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM ;----------------------------------------------------------------------------------------------------- ; ModernUI - Color background and border ;----------------------------------------------------------------------------------------------------- - .ELSEIF eax == WM_ERASEBKGND - mov eax, 1 - ret - - .ELSEIF eax == WM_PAINT - invoke MUIPaintBackground, hWin, MUI_RGBCOLOR(45,45,48), 0 - mov eax, 0 - ret +; .ELSEIF eax == WM_ERASEBKGND +; mov eax, 1 +; ret +; +; .ELSEIF eax == WM_PAINT +; invoke MUIPaintBackground, hWin, MUI_RGBCOLOR(45,45,48), 0 +; mov eax, 0 +; ret ;----------------------------------------------------------------------------------------------------- .ELSEIF eax==WM_CLOSE @@ -337,14 +337,14 @@ Panel3Proc PROC hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM ;----------------------------------------------------------------------------------------------------- ; ModernUI - Color background and border ;----------------------------------------------------------------------------------------------------- - .ELSEIF eax == WM_ERASEBKGND - mov eax, 1 - ret - - .ELSEIF eax == WM_PAINT - invoke MUIPaintBackground, hWin, MUI_RGBCOLOR(45,45,48), 0 - mov eax, 0 - ret +; .ELSEIF eax == WM_ERASEBKGND +; mov eax, 1 +; ret +; +; .ELSEIF eax == WM_PAINT +; invoke MUIPaintBackground, hWin, MUI_RGBCOLOR(45,45,48), 0 +; mov eax, 0 +; ret ;----------------------------------------------------------------------------------------------------- .ELSEIF eax==WM_CLOSE @@ -409,14 +409,14 @@ Panel4Proc PROC hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM ;----------------------------------------------------------------------------------------------------- ; ModernUI - Color background and border ;----------------------------------------------------------------------------------------------------- - .ELSEIF eax == WM_ERASEBKGND - mov eax, 1 - ret - - .ELSEIF eax == WM_PAINT - invoke MUIPaintBackground, hWin, MUI_RGBCOLOR(45,45,48), 0 - mov eax, 0 - ret +; .ELSEIF eax == WM_ERASEBKGND +; mov eax, 1 +; ret +; +; .ELSEIF eax == WM_PAINT +; invoke MUIPaintBackground, hWin, MUI_RGBCOLOR(45,45,48), 0 +; mov eax, 0 +; ret ;----------------------------------------------------------------------------------------------------- .ELSEIF eax==WM_CLOSE diff --git a/Examples/MUIExample2/MUIExample2.exe b/Examples/MUIExample2/MUIExample2.exe index 59ed445..08c3e4f 100644 Binary files a/Examples/MUIExample2/MUIExample2.exe and b/Examples/MUIExample2/MUIExample2.exe differ diff --git a/Examples/MUIExample2/MUIExample2.rap b/Examples/MUIExample2/MUIExample2.rap index f9b7e68..d8f5701 100644 --- a/Examples/MUIExample2/MUIExample2.rap +++ b/Examples/MUIExample2/MUIExample2.rap @@ -60,10 +60,10 @@ Menu=1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0 [StringTable] [Accel] [VerInf] -FV=1.0.0.1 -FileVersion=1.0.0.1 -PV=1.0.0.1 -ProductVersion=1.0.0.1 +FV=1.0.0.2 +FileVersion=1.0.0.2 +PV=1.0.0.2 +ProductVersion=1.0.0.2 Nme=VERINF1 ID=1 VerOS=0x00000004 @@ -94,13 +94,13 @@ AutoLoad=2,9,1,6,5,7,8,4 Settings=1279 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=0 +MilestoneEveryCurrent=1 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=7 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2018 MilestoneOnDateTimeMonth=8 MilestoneOnDateTimeDate=5 @@ -124,11 +124,11 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=15089525 +PTimer=17951124 [Collapse] 9=548 2= -1=4352 +1=256 [Size] 9=0,0,0,0,5304 8=0,0,0,0 @@ -137,7 +137,7 @@ PTimer=15089525 5=0,0,0,0 2=0,0,0,0,321 4=0,0,0,0 -1=0,0,0,0,7446 +1=0,0,0,0,2276 [GroupExpand] GroupExpand=1,0,1,0 [BookMark] diff --git a/Examples/MUIExample2/Res/MUIExample2Ver.rc b/Examples/MUIExample2/Res/MUIExample2Ver.rc index 746cc7b..c75f72e 100644 --- a/Examples/MUIExample2/Res/MUIExample2Ver.rc +++ b/Examples/MUIExample2/Res/MUIExample2Ver.rc @@ -1,7 +1,7 @@ #define VERINF1 1 VERINF1 VERSIONINFO -FILEVERSION 1,0,0,1 -PRODUCTVERSION 1,0,0,1 +FILEVERSION 1,0,0,2 +PRODUCTVERSION 1,0,0,2 FILEOS 0x00000004 FILETYPE 0x00000001 BEGIN @@ -9,11 +9,11 @@ BEGIN BEGIN BLOCK "040904B0" BEGIN - VALUE "FileVersion", "1.0.0.1\0" + VALUE "FileVersion", "1.0.0.2\0" VALUE "FileDescription", "MUIExample2\0" VALUE "InternalName", "MUIExample2\0" VALUE "ProductName", "MUIExample2\0" - VALUE "ProductVersion", "1.0.0.1\0" + VALUE "ProductVersion", "1.0.0.2\0" END END BLOCK "VarFileInfo" diff --git a/Examples/MUIMenu1/MUIMenu1.exe b/Examples/MUIMenu1/MUIMenu1.exe index 8bcd446..d24d369 100644 Binary files a/Examples/MUIMenu1/MUIMenu1.exe and b/Examples/MUIMenu1/MUIMenu1.exe differ diff --git a/Examples/MUIMenu1/MUIMenu1.rap b/Examples/MUIMenu1/MUIMenu1.rap index 221dc85..ee38f52 100644 --- a/Examples/MUIMenu1/MUIMenu1.rap +++ b/Examples/MUIMenu1/MUIMenu1.rap @@ -57,10 +57,10 @@ Menu=1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0 5=,103,2,Images\appbar.folder.ico [StringTable] [VerInf] -FV=0.0.4.3 -FileVersion=0.0.4.3 -PV=0.0.4.3 -ProductVersion=0.0.4.3 +FV=0.0.4.4 +FileVersion=0.0.4.4 +PV=0.0.4.4 +ProductVersion=0.0.4.4 Nme=VERINF1 ID=1 VerOS=0x00000004 @@ -90,13 +90,13 @@ AutoLoad=1,2,4 Settings=1279 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=3 +MilestoneEveryCurrent=4 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=30 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2016 MilestoneOnDateTimeMonth=8 MilestoneOnDateTimeDate=20 @@ -120,12 +120,12 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=11865374 +PTimer=13620678 [Collapse] 1= 2= [Size] -1=0,0,0,0,5222 +1=0,0,0,0,3840 2=0,0,0,0,1036 4=0,0,0,0 [GroupExpand] diff --git a/Examples/MUIMenu1/Res/MUIMenu1Ver.rc b/Examples/MUIMenu1/Res/MUIMenu1Ver.rc index b7a01cb..42cb364 100644 --- a/Examples/MUIMenu1/Res/MUIMenu1Ver.rc +++ b/Examples/MUIMenu1/Res/MUIMenu1Ver.rc @@ -1,7 +1,7 @@ #define VERINF1 1 VERINF1 VERSIONINFO -FILEVERSION 0,0,4,3 -PRODUCTVERSION 0,0,4,3 +FILEVERSION 0,0,4,4 +PRODUCTVERSION 0,0,4,4 FILEOS 0x00000004 FILETYPE 0x00000001 BEGIN @@ -9,12 +9,12 @@ BEGIN BEGIN BLOCK "040904B0" BEGIN - VALUE "FileVersion", "0.0.4.3\0" + VALUE "FileVersion", "0.0.4.4\0" VALUE "FileDescription", "MUIMenu Example #1\0" VALUE "InternalName", "MUIMenu1\0" VALUE "OriginalFilename", "MUIMenu1\0" VALUE "ProductName", "MUIMenu1\0" - VALUE "ProductVersion", "0.0.4.3\0" + VALUE "ProductVersion", "0.0.4.4\0" END END BLOCK "VarFileInfo" diff --git a/Examples/MUIProgressBar/MUIProgressBar.exe b/Examples/MUIProgressBar/MUIProgressBar.exe index dd22eb1..df6a70e 100644 Binary files a/Examples/MUIProgressBar/MUIProgressBar.exe and b/Examples/MUIProgressBar/MUIProgressBar.exe differ diff --git a/Examples/MUIProgressBar/MUIProgressBar.rap b/Examples/MUIProgressBar/MUIProgressBar.rap index a6a90ec..db5480b 100644 --- a/Examples/MUIProgressBar/MUIProgressBar.rap +++ b/Examples/MUIProgressBar/MUIProgressBar.rap @@ -88,13 +88,13 @@ AutoLoad=2,1,4 Settings=1148 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=9 +MilestoneEveryCurrent=3 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=7 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2016 MilestoneOnDateTimeMonth=7 MilestoneOnDateTimeDate=19 @@ -118,13 +118,13 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=65549002 +PTimer=71875820 [Collapse] 1=4096 2= [Size] -1=0,0,0,0,7015 -2=0,0,0,0,2680 +1=0,0,0,0,3061 +2=0,0,0,0,434 4=0,0,0,0 [GroupExpand] GroupExpand=1,0,1,0 diff --git a/Examples/MUIProgressBarPlus/MUIProgressBarPlus.exe b/Examples/MUIProgressBarPlus/MUIProgressBarPlus.exe index f773173..f8a7c6e 100644 Binary files a/Examples/MUIProgressBarPlus/MUIProgressBarPlus.exe and b/Examples/MUIProgressBarPlus/MUIProgressBarPlus.exe differ diff --git a/Examples/MUIProgressBarPlus/MUIProgressBarPlus.rap b/Examples/MUIProgressBarPlus/MUIProgressBarPlus.rap index af9c3f7..9b17f25 100644 --- a/Examples/MUIProgressBarPlus/MUIProgressBarPlus.rap +++ b/Examples/MUIProgressBarPlus/MUIProgressBarPlus.rap @@ -54,10 +54,10 @@ Menu=1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0 1=,1,8,MUIProgressBarPlus.xml [StringTable] [VerInf] -FV=0.1.5.5 -FileVersion=0.1.5.5 -PV=0.1.5.5 -ProductVersion=0.1.5.5 +FV=0.1.5.6 +FileVersion=0.1.5.6 +PV=0.1.5.6 +ProductVersion=0.1.5.6 Nme=VERINF1 ID=1 VerOS=0x00000004 @@ -89,13 +89,13 @@ AutoLoad=1,2,4 Settings=1279 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=1 +MilestoneEveryCurrent=2 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=6 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2016 MilestoneOnDateTimeMonth=7 MilestoneOnDateTimeDate=19 @@ -119,7 +119,7 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=53714967 +PTimer=53724686 [Collapse] 1= 2= diff --git a/Examples/MUIProgressBarPlus/Res/MUIProgressBarPlusVer.rc b/Examples/MUIProgressBarPlus/Res/MUIProgressBarPlusVer.rc index 13f76e6..64185f6 100644 --- a/Examples/MUIProgressBarPlus/Res/MUIProgressBarPlusVer.rc +++ b/Examples/MUIProgressBarPlus/Res/MUIProgressBarPlusVer.rc @@ -1,7 +1,7 @@ #define VERINF1 1 VERINF1 VERSIONINFO -FILEVERSION 0,1,5,5 -PRODUCTVERSION 0,1,5,5 +FILEVERSION 0,1,5,6 +PRODUCTVERSION 0,1,5,6 FILEOS 0x00000004 FILETYPE 0x00000001 BEGIN @@ -9,11 +9,11 @@ BEGIN BEGIN BLOCK "040904B0" BEGIN - VALUE "FileVersion", "0.1.5.5\0" + VALUE "FileVersion", "0.1.5.6\0" VALUE "FileDescription", "MUIProgressBarPlus Example #1\0" VALUE "InternalName", "MUIProgressBarPlus\0" VALUE "OriginalFilename", "MUIProgressBarPlus\0" - VALUE "ProductVersion", "0.1.5.5\0" + VALUE "ProductVersion", "0.1.5.6\0" END END BLOCK "VarFileInfo" diff --git a/Examples/MUIProgressDotsTest/MUIPDTest.asm b/Examples/MUIProgressDotsTest/MUIPDTest.asm index e5c97bf..b3e1c4f 100644 --- a/Examples/MUIProgressDotsTest/MUIPDTest.asm +++ b/Examples/MUIProgressDotsTest/MUIPDTest.asm @@ -137,7 +137,7 @@ WndProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM ret .ELSEIF eax == WM_PAINT - invoke MUIPaintBackground, hWin, MUI_RGBCOLOR(45,45,48), MUI_RGBCOLOR(12,12,12) + Invoke MUIPaintBackground, hWin, MUI_RGBCOLOR(45,45,48), MUI_RGBCOLOR(12,12,12) mov eax, 0 ret ;----------------------------------------------------------------------------------------------------- diff --git a/Examples/MUIProgressDotsTest/MUIPDTest.exe b/Examples/MUIProgressDotsTest/MUIPDTest.exe index d1d8c9b..47f31f7 100644 Binary files a/Examples/MUIProgressDotsTest/MUIPDTest.exe and b/Examples/MUIProgressDotsTest/MUIPDTest.exe differ diff --git a/Examples/MUIProgressDotsTest/MUIPDTest.rap b/Examples/MUIProgressDotsTest/MUIPDTest.rap index eecc779..bbcba98 100644 --- a/Examples/MUIProgressDotsTest/MUIPDTest.rap +++ b/Examples/MUIProgressDotsTest/MUIPDTest.rap @@ -55,10 +55,10 @@ Menu=1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0 3=,200,0,Images\RadasmStudio.bmp [StringTable] [VerInf] -FV=0.1.6.3 -FileVersion=0.1.6.3 -PV=0.1.6.3 -ProductVersion=0.1.6.3 +FV=0.1.6.4 +FileVersion=0.1.6.4 +PV=0.1.6.4 +ProductVersion=0.1.6.4 [Group] Group=Assembly,Resources,Misc 1=1 @@ -77,13 +77,13 @@ AutoLoad=1,4,2,3 Settings=1279 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=4 +MilestoneEveryCurrent=5 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=26 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2018 MilestoneOnDateTimeMonth=7 MilestoneOnDateTimeDate=28 @@ -107,14 +107,14 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=28252749 +PTimer=28931890 [Collapse] 1= 2= 3= [Size] -1=0,0,0,0,5241 -2=0,0,0,0,1385 +1=0,0,0,0,1038 +2=0,0,0,0,1647 4=0,0,0,0 3=0,0,0,0,0 5= diff --git a/Examples/MUIProgressDotsTest/Res/MUIPDTestVer.rc b/Examples/MUIProgressDotsTest/Res/MUIPDTestVer.rc index 4386e9c..7f36fe0 100644 --- a/Examples/MUIProgressDotsTest/Res/MUIPDTestVer.rc +++ b/Examples/MUIProgressDotsTest/Res/MUIPDTestVer.rc @@ -1,7 +1,7 @@ #define VERINF1 1 VERINF1 VERSIONINFO -FILEVERSION 0,1,6,3 -PRODUCTVERSION 0,1,6,3 +FILEVERSION 0,1,6,4 +PRODUCTVERSION 0,1,6,4 FILEOS 0x00000004 FILETYPE 0x00000000 BEGIN @@ -9,8 +9,8 @@ BEGIN BEGIN BLOCK "040904B0" BEGIN - VALUE "FileVersion", "0.1.6.3\0" - VALUE "ProductVersion", "0.1.6.3\0" + VALUE "FileVersion", "0.1.6.4\0" + VALUE "ProductVersion", "0.1.6.4\0" END END BLOCK "VarFileInfo" diff --git a/Examples/MUISpinner1/MUISpinner1.exe b/Examples/MUISpinner1/MUISpinner1.exe index e7db6db..7d5bf7a 100644 Binary files a/Examples/MUISpinner1/MUISpinner1.exe and b/Examples/MUISpinner1/MUISpinner1.exe differ diff --git a/Examples/MUISpinner1/MUISpinner1.rap b/Examples/MUISpinner1/MUISpinner1.rap index 78bbd46..a9178f5 100644 --- a/Examples/MUISpinner1/MUISpinner1.rap +++ b/Examples/MUISpinner1/MUISpinner1.rap @@ -132,13 +132,13 @@ AutoLoad=2,1,4 Settings=1148 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=1 +MilestoneEveryCurrent=2 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=22 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2016 MilestoneOnDateTimeMonth=5 MilestoneOnDateTimeDate=31 @@ -162,7 +162,7 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=122900017 +PTimer=122907314 [Collapse] 1= 2= diff --git a/Examples/MUIText/MUIText.dlg b/Examples/MUIText/MUIText.dlg index e8a4c8c..de1039c 100644 Binary files a/Examples/MUIText/MUIText.dlg and b/Examples/MUIText/MUIText.dlg differ diff --git a/Examples/MUIText/MUIText.exe b/Examples/MUIText/MUIText.exe index eaec1ca..4613748 100644 Binary files a/Examples/MUIText/MUIText.exe and b/Examples/MUIText/MUIText.exe differ diff --git a/Examples/MUIText/MUIText.rap b/Examples/MUIText/MUIText.rap index 8f0271d..331a6df 100644 --- a/Examples/MUIText/MUIText.rap +++ b/Examples/MUIText/MUIText.rap @@ -54,10 +54,10 @@ Menu=1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0 2=,100,2,MUIText.ico [StringTable] [VerInf] -FV=0.2.0.4 -FileVersion=0.2.0.4 -PV=0.2.0.4 -ProductVersion=0.2.0.4 +FV=0.2.2.1 +FileVersion=0.2.2.1 +PV=0.2.2.1 +ProductVersion=0.2.2.1 [Group] Group=Assembly,Resources,Misc 1=1 @@ -74,13 +74,13 @@ AutoLoad=4,1,2,3 Settings=1279 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=9 +MilestoneEveryCurrent=6 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=25 +MilestoneOnDateDate=19 MilestoneOnDateTimeYear=2018 MilestoneOnDateTimeMonth=1 MilestoneOnDateTimeDate=10 @@ -104,13 +104,13 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=65910528 +PTimer=68133792 [Collapse] 1= 2= 3= [Size] -1=0,0,0,0,1386 +1=0,0,0,0,2975 4=0,0,0,0 2=0,0,0,0,2230 3=0,0,0,0,0 diff --git a/Examples/MUIText/MUIText.res b/Examples/MUIText/MUIText.res index 3fb55a9..bb39e6c 100644 Binary files a/Examples/MUIText/MUIText.res and b/Examples/MUIText/MUIText.res differ diff --git a/Examples/MUIText/Res/MUITextDlg.Rc b/Examples/MUIText/Res/MUITextDlg.Rc index 96e059d..e550175 100644 --- a/Examples/MUIText/Res/MUITextDlg.Rc +++ b/Examples/MUIText/Res/MUITextDlg.Rc @@ -35,7 +35,7 @@ IDD_DIALOG DIALOGEX 6,6,777,385 FONT 8,"Segoe UI",400,0 CLASS "DLGCLASS" -STYLE 0x90000800 +STYLE 0x92000800 EXSTYLE 0x00000000 BEGIN CONTROL "Text",IDC_TEXT11,"ModernUI_Text",0x520080D0,6,200,184,176,0x00000000 diff --git a/Examples/MUIText/Res/MUITextVer.rc b/Examples/MUIText/Res/MUITextVer.rc index d5566f9..f1e816b 100644 --- a/Examples/MUIText/Res/MUITextVer.rc +++ b/Examples/MUIText/Res/MUITextVer.rc @@ -1,7 +1,7 @@ #define VERINF1 1 VERINF1 VERSIONINFO -FILEVERSION 0,2,0,4 -PRODUCTVERSION 0,2,0,4 +FILEVERSION 0,2,2,1 +PRODUCTVERSION 0,2,2,1 FILEOS 0x00000004 FILETYPE 0x00000000 BEGIN @@ -9,8 +9,8 @@ BEGIN BEGIN BLOCK "040904B0" BEGIN - VALUE "FileVersion", "0.2.0.4\0" - VALUE "ProductVersion", "0.2.0.4\0" + VALUE "FileVersion", "0.2.2.1\0" + VALUE "ProductVersion", "0.2.2.1\0" END END BLOCK "VarFileInfo" diff --git a/Examples/MUITrayMenu/MUITrayMenu.exe b/Examples/MUITrayMenu/MUITrayMenu.exe index 22db3ea..6aa858a 100644 Binary files a/Examples/MUITrayMenu/MUITrayMenu.exe and b/Examples/MUITrayMenu/MUITrayMenu.exe differ diff --git a/Examples/MUITrayMenu/MUITrayMenu.rap b/Examples/MUITrayMenu/MUITrayMenu.rap index 42bb88c..a05c06f 100644 --- a/Examples/MUITrayMenu/MUITrayMenu.rap +++ b/Examples/MUITrayMenu/MUITrayMenu.rap @@ -57,10 +57,10 @@ Menu=1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0 [StringTable] [Accel] [VerInf] -FV=0.0.5.8 -FileVersion=0.0.5.8 -PV=0.0.5.8 -ProductVersion=0.0.5.8 +FV=0.0.5.9 +FileVersion=0.0.5.9 +PV=0.0.5.9 +ProductVersion=0.0.5.9 Nme=VERINF1 ID=1 VerOS=0x00000004 @@ -87,13 +87,13 @@ AutoLoad=2,1,4 Settings=1279 Milestones=129 MilestoneEvery=10 -MilestoneEveryCurrent=2 +MilestoneEveryCurrent=3 MilestoneOnBuild=0.0.0.0 MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=21 +MilestoneOnDateDate=24 MilestoneOnDateTimeYear=2017 MilestoneOnDateTimeMonth=7 MilestoneOnDateTimeDate=21 @@ -117,7 +117,7 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=11741509 +PTimer=11760370 [Collapse] 1= 2= diff --git a/Examples/MUITrayMenu/Res/MUITrayMenuVer.rc b/Examples/MUITrayMenu/Res/MUITrayMenuVer.rc index 6875364..267586a 100644 --- a/Examples/MUITrayMenu/Res/MUITrayMenuVer.rc +++ b/Examples/MUITrayMenu/Res/MUITrayMenuVer.rc @@ -1,7 +1,7 @@ #define VERINF1 1 VERINF1 VERSIONINFO -FILEVERSION 0,0,5,8 -PRODUCTVERSION 0,0,5,8 +FILEVERSION 0,0,5,9 +PRODUCTVERSION 0,0,5,9 FILEOS 0x00000004 FILETYPE 0x00000001 BEGIN @@ -9,12 +9,12 @@ BEGIN BEGIN BLOCK "040904B0" BEGIN - VALUE "FileVersion", "0.0.5.8\0" + VALUE "FileVersion", "0.0.5.9\0" VALUE "FileDescription", "MUICaptionBar4\0" VALUE "InternalName", "MUICaptionBar4\0" VALUE "OriginalFilename", "MUICaptionBar4\0" VALUE "ProductName", "MUICaptionBar4\0" - VALUE "ProductVersion", "0.0.5.8\0" + VALUE "ProductVersion", "0.0.5.9\0" END END BLOCK "VarFileInfo" diff --git a/ModernUI/MUIAllocStructureMemory.asm b/ModernUI/MUIAllocStructureMemory.asm index 51cff1a..35afc04 100644 --- a/ModernUI/MUIAllocStructureMemory.asm +++ b/ModernUI/MUIAllocStructureMemory.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIApplyToDialog.asm b/ModernUI/MUIApplyToDialog.asm index 46f26d3..70fe0b9 100644 --- a/ModernUI/MUIApplyToDialog.asm +++ b/ModernUI/MUIApplyToDialog.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; @@ -33,14 +33,14 @@ MUI_ALIGN ; DS_CENTER, DS_CENTERMOUSE, WS_CLIPCHILDREN, WS_CLIPSIBLINGS, WS_MINIMIZE, ; WS_MAXIMIZE ;------------------------------------------------------------------------------ -MUIApplyToDialog PROC hWin:MUIWND, bDropShadow:BOOL, bClipping:BOOL +MUIApplyToDialogA PROC hWin:MUIWND, bDropShadow:BOOL, bClipping:BOOL LOCAL dwStyle:DWORD LOCAL dwNewStyle:DWORD LOCAL dwClassStyle:DWORD mov dwNewStyle, WS_POPUP - Invoke GetWindowLong, hWin, GWL_STYLE + Invoke GetWindowLongA, hWin, GWL_STYLE mov dwStyle, eax and eax, DS_CENTER @@ -81,11 +81,11 @@ MUIApplyToDialog PROC hWin:MUIWND, bDropShadow:BOOL, bClipping:BOOL or dwNewStyle, WS_CLIPCHILDREN .ENDIF - Invoke SetWindowLong, hWin, GWL_STYLE, dwNewStyle + Invoke SetWindowLongA, hWin, GWL_STYLE, dwNewStyle ; Set dropshadow on or off on our dialog - Invoke GetClassLong, hWin, GCL_STYLE + Invoke GetClassLongA, hWin, GCL_STYLE mov dwClassStyle, eax .IF bDropShadow == TRUE @@ -93,14 +93,14 @@ MUIApplyToDialog PROC hWin:MUIWND, bDropShadow:BOOL, bClipping:BOOL and eax, CS_DROPSHADOW .IF eax != CS_DROPSHADOW or dwClassStyle, CS_DROPSHADOW - Invoke SetClassLong, hWin, GCL_STYLE, dwClassStyle + Invoke SetClassLongA, hWin, GCL_STYLE, dwClassStyle .ENDIF .ELSE mov eax, dwClassStyle and eax, CS_DROPSHADOW .IF eax == CS_DROPSHADOW and dwClassStyle,(-1 xor CS_DROPSHADOW) - Invoke SetClassLong, hWin, GCL_STYLE, dwClassStyle + Invoke SetClassLongA, hWin, GCL_STYLE, dwClassStyle .ENDIF .ENDIF @@ -113,8 +113,97 @@ MUIApplyToDialog PROC hWin:MUIWND, bDropShadow:BOOL, bClipping:BOOL Invoke SetWindowPos, hWin, NULL, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or SWP_FRAMECHANGED ret -MUIApplyToDialog ENDP +MUIApplyToDialogA ENDP +MUI_ALIGN +;------------------------------------------------------------------------------ +; Applies the ModernUI style to a dialog to make it a captionless, borderless +; form. User can manually change a form in a resource editor to have the +; following style flags: WS_POPUP or WS_VISIBLE and optionally with +; DS_CENTER, DS_CENTERMOUSE, WS_CLIPCHILDREN, WS_CLIPSIBLINGS, WS_MINIMIZE, +; WS_MAXIMIZE +;------------------------------------------------------------------------------ +MUIApplyToDialogW PROC hWin:MUIWND, bDropShadow:BOOL, bClipping:BOOL + LOCAL dwStyle:DWORD + LOCAL dwNewStyle:DWORD + LOCAL dwClassStyle:DWORD + + mov dwNewStyle, WS_POPUP + + Invoke GetWindowLongW, hWin, GWL_STYLE + mov dwStyle, eax + + and eax, DS_CENTER + .IF eax == DS_CENTER + or dwNewStyle, DS_CENTER + .ENDIF + + mov eax, dwStyle + and eax, DS_CENTERMOUSE + .IF eax == DS_CENTERMOUSE + or dwNewStyle, DS_CENTERMOUSE + .ENDIF + + mov eax, dwStyle + and eax, WS_VISIBLE + .IF eax == WS_VISIBLE + or dwNewStyle, WS_VISIBLE + .ENDIF + + mov eax, dwStyle + and eax, WS_MINIMIZE + .IF eax == WS_MINIMIZE + or dwNewStyle, WS_MINIMIZE + .ENDIF + + mov eax, dwStyle + and eax, WS_MAXIMIZE + .IF eax == WS_MAXIMIZE + or dwNewStyle, WS_MAXIMIZE + .ENDIF + + .IF bClipping == TRUE + mov eax, dwStyle + and eax, WS_CLIPSIBLINGS + .IF eax == WS_CLIPSIBLINGS + or dwNewStyle, WS_CLIPSIBLINGS + .ENDIF + or dwNewStyle, WS_CLIPCHILDREN + .ENDIF + + Invoke SetWindowLongW, hWin, GWL_STYLE, dwNewStyle + + ; Set dropshadow on or off on our dialog + + Invoke GetClassLongW, hWin, GCL_STYLE + mov dwClassStyle, eax + + .IF bDropShadow == TRUE + mov eax, dwClassStyle + and eax, CS_DROPSHADOW + .IF eax != CS_DROPSHADOW + or dwClassStyle, CS_DROPSHADOW + Invoke SetClassLongW, hWin, GCL_STYLE, dwClassStyle + .ENDIF + .ELSE + mov eax, dwClassStyle + and eax, CS_DROPSHADOW + .IF eax == CS_DROPSHADOW + and dwClassStyle,(-1 xor CS_DROPSHADOW) + Invoke SetClassLongW, hWin, GCL_STYLE, dwClassStyle + .ENDIF + .ENDIF + + ; remove any menu that might have been assigned via class registration - for modern ui look + Invoke GetMenu, hWin + .IF eax != NULL + Invoke SetMenu, hWin, NULL + .ENDIF + + Invoke SetWindowPos, hWin, NULL, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or SWP_FRAMECHANGED + + ret +MUIApplyToDialogW ENDP MODERNUI_LIBEND diff --git a/ModernUI/MUICenterWindow.asm b/ModernUI/MUICenterWindow.asm index 26785ca..6a4b78a 100644 --- a/ModernUI/MUICenterWindow.asm +++ b/ModernUI/MUICenterWindow.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIChangeResolution.asm b/ModernUI/MUIChangeResolution.asm index 8467b6e..3df2955 100644 --- a/ModernUI/MUIChangeResolution.asm +++ b/ModernUI/MUIChangeResolution.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; @@ -50,11 +50,11 @@ MUIChangeScreenResolution PROC ScreenWidth:MUIVALUE, ScreenHeight:MUIVALUE, bits .ENDIF mov dmScreenSettings.dmBitsPerPel, eax - mov eax, (DM_BITSPERPEL or DM_PELSWIDTH or DM_PELSHEIGHT) ;; (040000h or 080000h or 0100000h) + ;mov eax, (DM_BITSPERPEL or DM_PELSWIDTH or DM_PELSHEIGHT) ;; (040000h or 080000h or 0100000h) mov dmScreenSettings.dmFields, DM_BITSPERPEL or DM_PELSWIDTH or DM_PELSHEIGHT or DM_DISPLAYFREQUENCY mov dmScreenSettings.dmDisplayFrequency, 60 - Invoke ChangeDisplaySettings, Addr dmScreenSettings, CDS_FULLSCREEN + Invoke ChangeDisplaySettings, Addr dmScreenSettings, CDS_FULLSCREEN .IF (eax != DISP_CHANGE_SUCCESSFUL) xor eax, eax .ELSE diff --git a/ModernUI/MUICreateBitmapFromMemory.asm b/ModernUI/MUICreateBitmapFromMemory.asm index 95a4e63..f64b83b 100644 --- a/ModernUI/MUICreateBitmapFromMemory.asm +++ b/ModernUI/MUICreateBitmapFromMemory.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; @@ -60,6 +60,37 @@ MUICreateBitmapFromMemory PROC USES ECX EDX pBitmapData:POINTER MUICreateBitmapFromMemory ENDP +MUI_ALIGN +;------------------------------------------------------------------------------ +; MUICreateBitmapFromMemory +; +;------------------------------------------------------------------------------ +MUICreateBitmapSectionFromMemory PROC USES ECX EDX pBitmapData:POINTER + LOCAL hDC:DWORD + LOCAL hBmp:DWORD + + ;Invoke GetDC,hWnd + Invoke CreateDC, Addr szMUIBitmapFromMemoryDisplayDC, NULL, NULL, NULL + test eax,eax + jz @f + mov hDC,eax + mov edx,pBitmapData + lea ecx,[edx + SIZEOF BITMAPFILEHEADER] ; start of the BITMAPINFOHEADER header + mov eax,BITMAPFILEHEADER.bfOffBits[edx] + add edx,eax + Invoke CreateDIBSection,hDC,ecx,CBM_INIT,edx,ecx,DIB_RGB_COLORS + + Invoke CreateDIBSection, hDC, ecx, DIB_RGB_COLORS, edx, NULL, 0 + + mov hBmp,eax + ;Invoke ReleaseDC,hWnd,hDC + Invoke DeleteDC, hDC + mov eax,hBmp +@@: + ret +MUICreateBitmapSectionFromMemory ENDP + + MODERNUI_LIBEND diff --git a/ModernUI/MUICreateCursorFromMemory.asm b/ModernUI/MUICreateCursorFromMemory.asm index b6772b3..ddbd3dd 100644 --- a/ModernUI/MUICreateCursorFromMemory.asm +++ b/ModernUI/MUICreateCursorFromMemory.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUICreateIconFromMemory.asm b/ModernUI/MUICreateIconFromMemory.asm index 3fd29d0..59b86c0 100644 --- a/ModernUI/MUICreateIconFromMemory.asm +++ b/ModernUI/MUICreateIconFromMemory.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGDIBlend.asm b/ModernUI/MUIGDIBlend.asm index 2304313..f669a14 100644 --- a/ModernUI/MUIGDIBlend.asm +++ b/ModernUI/MUIGDIBlend.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGDIBlendBitmaps.asm b/ModernUI/MUIGDIBlendBitmaps.asm index e786c90..21db1a3 100644 --- a/ModernUI/MUIGDIBlendBitmaps.asm +++ b/ModernUI/MUIGDIBlendBitmaps.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGDICreateBitmapMask.asm b/ModernUI/MUIGDICreateBitmapMask.asm index d4c9418..6fcb86b 100644 --- a/ModernUI/MUIGDICreateBitmapMask.asm +++ b/ModernUI/MUIGDICreateBitmapMask.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGDIPaintBrush.asm b/ModernUI/MUIGDIPaintBrush.asm index c1163e8..c19be70 100644 --- a/ModernUI/MUIGDIPaintBrush.asm +++ b/ModernUI/MUIGDIPaintBrush.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGDIPaintFill.asm b/ModernUI/MUIGDIPaintFill.asm index b42ad89..30fe0f2 100644 --- a/ModernUI/MUIGDIPaintFill.asm +++ b/ModernUI/MUIGDIPaintFill.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGDIPaintFrame.asm b/ModernUI/MUIGDIPaintFrame.asm index cee660e..82bfa74 100644 --- a/ModernUI/MUIGDIPaintFrame.asm +++ b/ModernUI/MUIGDIPaintFrame.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGDIPaintGradient.asm b/ModernUI/MUIGDIPaintGradient.asm index 4aaa495..7211f96 100644 --- a/ModernUI/MUIGDIPaintGradient.asm +++ b/ModernUI/MUIGDIPaintGradient.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; @@ -89,7 +89,6 @@ MUIGDIPaintGradient PROC USES EBX hdc:HDC, lpGradientRect:LPRECT, GradientColorF ;-------------------------------------------------------------------------- ; Seperate GradientFrom ColorRef to 3 dwords for Red, Green & Blue ;-------------------------------------------------------------------------- - xor eax, eax mov eax, GradientColorFrom xor ebx, ebx mov bh, al @@ -108,13 +107,13 @@ MUIGDIPaintGradient PROC USES EBX hdc:HDC, lpGradientRect:LPRECT, GradientColorF ; fill x from rect left mov ebx, lpGradientRect mov eax, [ebx].RECT.left - lea ebx, vertex + lea ebx, vertex ; point to 1st vertex mov [ebx].TRIVERTEX.x, eax ; fill y from rect top mov ebx, lpGradientRect mov eax, [ebx].RECT.top - lea ebx, vertex + lea ebx, vertex ; point to 1st vertex mov [ebx].TRIVERTEX.y, eax ; fill colors from seperated colorref @@ -129,7 +128,7 @@ MUIGDIPaintGradient PROC USES EBX hdc:HDC, lpGradientRect:LPRECT, GradientColorF ;-------------------------------------------------------------------------- ; Seperate GradientFrom ColorRef to 3 dwords for Red, Green & Blue ;-------------------------------------------------------------------------- - xor eax, eax + mov eax, GradientColorTo xor ebx, ebx mov bh, al @@ -149,14 +148,14 @@ MUIGDIPaintGradient PROC USES EBX hdc:HDC, lpGradientRect:LPRECT, GradientColorF mov ebx, lpGradientRect mov eax, [ebx].RECT.right lea ebx, vertex - add ebx, sizeof TRIVERTEX + add ebx, sizeof TRIVERTEX ; point to 2nd vertex mov [ebx].TRIVERTEX.x, eax ; fill x from rect right mov ebx, lpGradientRect mov eax, [ebx].RECT.bottom lea ebx, vertex - add ebx, sizeof TRIVERTEX + add ebx, sizeof TRIVERTEX ; point to 2nd vertex mov [ebx].TRIVERTEX.y, eax ; fill colors from seperated colorref diff --git a/ModernUI/MUIGDIPaintRectangle.asm b/ModernUI/MUIGDIPaintRectangle.asm new file mode 100644 index 0000000..cdf90e9 --- /dev/null +++ b/ModernUI/MUIGDIPaintRectangle.asm @@ -0,0 +1,118 @@ +;============================================================================== +; +; ModernUI Library +; +; Copyright (c) 2023 by fearless +; +; All Rights Reserved +; +; http://github.com/mrfearless/ModernUI +; +;============================================================================== +.686 +.MMX +.XMM +.model flat,stdcall +option casemap:none + +include windows.inc +include user32.inc +include kernel32.inc +include gdi32.inc +includelib user32.lib +includelib kernel32.lib +includelib gdi32.lib + +include ModernUI.inc + + +.CODE + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; MUIGDIPaintRectangle - Draws a draws a rectangle. The rectangle is outlined +; by using the specified outline color and filled by using the specified fill +; color. +; +; lpRect is a pointer to a RECT containing the bounding box of the frame +; FrameColor is an RGBCOLOR to paint the frame edges. If FrameColor is -1 +; then no outline painting occurs, just fill painting. +;------------------------------------------------------------------------------ +MUIGDIPaintRectangle PROC hdc:HDC, lpRect:LPRECT, FrameColor:MUICOLORRGB, FillColor:MUICOLORRGB + LOCAL hBrush:DWORD + LOCAL hBrushOld:DWORD + LOCAL hPen:DWORD + LOCAL hPenOld:DWORD + LOCAL rect:RECT + LOCAL pt:POINT + + .IF FrameColor == -1 && FillColor == -1 + ret + .ENDIF + + .IF FrameColor != -1 + + .IF FillColor != -1 + ;-------------------------------------------------------------- + ; Paint Frame and Fill + ;-------------------------------------------------------------- + Invoke CopyRect, Addr rect, lpRect + + ;-------------------------------------------------------------- + ; Create pen for outline + ;-------------------------------------------------------------- + Invoke CreatePen, PS_SOLID, 1, FrameColor + mov hPen, eax + Invoke SelectObject, hdc, hPen + mov hPenOld, eax + + ;-------------------------------------------------------------- + ; Create brush for fill + ;-------------------------------------------------------------- + Invoke CreateSolidBrush, FillColor + mov hBrush, eax + Invoke SelectObject, hdc, hBrush + mov hBrushOld, eax + + ;-------------------------------------------------------------- + ; Draw outlined and filled rectangle + ;-------------------------------------------------------------- + Invoke Rectangle, hdc, rect.left, rect.top, rect.right, rect.bottom + + ;-------------------------------------------------------------- + ; Tidy up + ;-------------------------------------------------------------- + .IF hPenOld != 0 + Invoke SelectObject, hdc, hPenOld + Invoke DeleteObject, hPenOld + .ENDIF + .IF hPen != 0 + Invoke DeleteObject, hPen + .ENDIF + .IF hBrushOld != 0 + Invoke SelectObject, hdc, hBrushOld + Invoke DeleteObject, hBrushOld + .ENDIF + .IF hBrush != 0 + Invoke DeleteObject, hBrush + .ENDIF + + .ELSE + ;-------------------------------------------------------------- + ; Paint frame only + ;-------------------------------------------------------------- + Invoke MUIGDIPaintFrame, hdc, lpRect, FrameColor, MUIPFS_ALL + .ENDIF + .ELSE + ;-------------------------------------------------------------- + ; Paint fill only + ;-------------------------------------------------------------- + Invoke MUIGDIPaintFill, hdc, lpRect, FillColor + .ENDIF + ret +MUIGDIPaintRectangle ENDP + + +MODERNUI_LIBEND + diff --git a/ModernUI/MUIGDIPlusPaintFill.asm b/ModernUI/MUIGDIPlusPaintFill.asm index af79f1c..c0c9749 100644 --- a/ModernUI/MUIGDIPlusPaintFill.asm +++ b/ModernUI/MUIGDIPlusPaintFill.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGDIPlusPaintFrame.asm b/ModernUI/MUIGDIPlusPaintFrame.asm index 5712f5e..f77b053 100644 --- a/ModernUI/MUIGDIPlusPaintFrame.asm +++ b/ModernUI/MUIGDIPlusPaintFrame.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGDIPlusRectToGdipRect.asm b/ModernUI/MUIGDIPlusRectToGdipRect.asm index 17209e9..88ccd75 100644 --- a/ModernUI/MUIGDIPlusRectToGdipRect.asm +++ b/ModernUI/MUIGDIPlusRectToGdipRect.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGDIPlusRotateCenterImage.asm b/ModernUI/MUIGDIPlusRotateCenterImage.asm index 1e8c3c8..801fa7d 100644 --- a/ModernUI/MUIGDIPlusRotateCenterImage.asm +++ b/ModernUI/MUIGDIPlusRotateCenterImage.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGDIRotateBitmap.asm b/ModernUI/MUIGDIRotateBitmap.asm index d77d0fa..e61d7d9 100644 --- a/ModernUI/MUIGDIRotateBitmap.asm +++ b/ModernUI/MUIGDIRotateBitmap.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGDIStretchBitmap.asm b/ModernUI/MUIGDIStretchBitmap.asm index 1014985..7b5ce52 100644 --- a/ModernUI/MUIGDIStretchBitmap.asm +++ b/ModernUI/MUIGDIStretchBitmap.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGDIStretchImage.asm b/ModernUI/MUIGDIStretchImage.asm index 0f6c8dc..0c49ca4 100644 --- a/ModernUI/MUIGDIStretchImage.asm +++ b/ModernUI/MUIGDIStretchImage.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGetImageSize.asm b/ModernUI/MUIGetImageSize.asm index 55e0b6a..ca44886 100644 --- a/ModernUI/MUIGetImageSize.asm +++ b/ModernUI/MUIGetImageSize.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGetImageSizeEx.asm b/ModernUI/MUIGetImageSizeEx.asm index 99ce0f7..6b675f4 100644 --- a/ModernUI/MUIGetImageSizeEx.asm +++ b/ModernUI/MUIGetImageSizeEx.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGetParentBackgroundBitmap.asm b/ModernUI/MUIGetParentBackgroundBitmap.asm index 1a47b6d..162d073 100644 --- a/ModernUI/MUIGetParentBackgroundBitmap.asm +++ b/ModernUI/MUIGetParentBackgroundBitmap.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGetParentBackgroundColor.asm b/ModernUI/MUIGetParentBackgroundColor.asm index a1a0ed6..5be20ba 100644 --- a/ModernUI/MUIGetParentBackgroundColor.asm +++ b/ModernUI/MUIGetParentBackgroundColor.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIGetParentRelativeWindowRect.asm b/ModernUI/MUIGetParentRelativeWindowRect.asm index a3b3307..346f299 100644 --- a/ModernUI/MUIGetParentRelativeWindowRect.asm +++ b/ModernUI/MUIGetParentRelativeWindowRect.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUILoadBitmapFromResource.asm b/ModernUI/MUILoadBitmapFromResource.asm index 9d3ce80..f504f17 100644 --- a/ModernUI/MUILoadBitmapFromResource.asm +++ b/ModernUI/MUILoadBitmapFromResource.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUILoadIconFromResource.asm b/ModernUI/MUILoadIconFromResource.asm index 42e0740..3cb2084 100644 --- a/ModernUI/MUILoadIconFromResource.asm +++ b/ModernUI/MUILoadIconFromResource.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUILoadImageFromResource.asm b/ModernUI/MUILoadImageFromResource.asm index 71bf465..bee7e1d 100644 --- a/ModernUI/MUILoadImageFromResource.asm +++ b/ModernUI/MUILoadImageFromResource.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUILoadPngFromResource.asm b/ModernUI/MUILoadPngFromResource.asm index d8c7918..94a751d 100644 --- a/ModernUI/MUILoadPngFromResource.asm +++ b/ModernUI/MUILoadPngFromResource.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUILoadRegionFromResource.asm b/ModernUI/MUILoadRegionFromResource.asm index 2bd7341..32c5643 100644 --- a/ModernUI/MUILoadRegionFromResource.asm +++ b/ModernUI/MUILoadRegionFromResource.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIModifyStyle.asm b/ModernUI/MUIModifyStyle.asm new file mode 100644 index 0000000..cc19aba --- /dev/null +++ b/ModernUI/MUIModifyStyle.asm @@ -0,0 +1,97 @@ +;============================================================================== +; +; ModernUI Library +; +; Copyright (c) 2023 by fearless +; +; All Rights Reserved +; +; http://github.com/mrfearless/ModernUI +; +;============================================================================== +.686 +.MMX +.XMM +.model flat,stdcall +option casemap:none + +include windows.inc +include user32.inc +includelib user32.lib + +include ModernUI.inc + + +.CODE + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Modifies the window styles of a Window to add and/or remove styles +; if bFrameChanged is TRUE then forces SWP_FRAMECHANGED call via SetWindowPos +;------------------------------------------------------------------------------ +MUIModifyStyleA PROC USES EBX hWin:MUIWND, dwRemove:MUIVALUE, dwAdd:MUIVALUE, bFrameChanged:BOOL + Invoke GetWindowLongA, hWin, GWL_STYLE + ; eax has current style + + ; Add dwAdd styles to current style with OR + mov ebx, dwAdd + or eax, ebx + + ; Remove dwRemove styles from current style with NOT (to invert dwRemove) and then AND together + mov ebx, dwRemove + not ebx + and eax, ebx + ; eax has new style + + Invoke SetWindowLongA, hWin, GWL_STYLE, eax + + .IF bFrameChanged == FALSE + ;Invoke SetWindowPos, hWin, NULL, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or SWP_NOACTIVATE + .ELSE + ; Applies new frame styles set using the SetWindowLong function + Invoke SetWindowPos, hWin, NULL, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or SWP_NOACTIVATE or SWP_FRAMECHANGED + .ENDIF + + xor eax, eax + ret +MUIModifyStyleA ENDP + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Modifies the window styles of a Window to add and/or remove styles +; if bFrameChanged is TRUE then forces SWP_FRAMECHANGED call via SetWindowPos +;------------------------------------------------------------------------------ +MUIModifyStyleW PROC USES EBX hWin:MUIWND, dwRemove:MUIVALUE, dwAdd:MUIVALUE, bFrameChanged:BOOL + Invoke GetWindowLongW, hWin, GWL_STYLE + ; eax has current style + + ; Add dwAdd styles to current style with OR + mov ebx, dwAdd + or eax, ebx + + ; Remove dwRemove styles from current style with NOT (to invert dwRemove) and then AND together + mov ebx, dwRemove + not ebx + and eax, ebx + ; eax has new style + + Invoke SetWindowLongW, hWin, GWL_STYLE, eax + + .IF bFrameChanged == FALSE + ;Invoke SetWindowPos, hWin, NULL, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or SWP_NOACTIVATE + .ELSE + ; Applies new frame styles set using the SetWindowLong function + Invoke SetWindowPos, hWin, NULL, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or SWP_NOACTIVATE or SWP_FRAMECHANGED + .ENDIF + + xor eax, eax + ret +MUIModifyStyleW ENDP + + + +MODERNUI_LIBEND + + + diff --git a/ModernUI/MUIModifyStyleEx.asm b/ModernUI/MUIModifyStyleEx.asm new file mode 100644 index 0000000..5340153 --- /dev/null +++ b/ModernUI/MUIModifyStyleEx.asm @@ -0,0 +1,97 @@ +;============================================================================== +; +; ModernUI Library +; +; Copyright (c) 2023 by fearless +; +; All Rights Reserved +; +; http://github.com/mrfearless/ModernUI +; +;============================================================================== +.686 +.MMX +.XMM +.model flat,stdcall +option casemap:none + +include windows.inc +include user32.inc +includelib user32.lib + +include ModernUI.inc + + +.CODE + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Modifies the extended window styles of a Window to add and/or remove styles +; if bFrameChanged is TRUE then forces SWP_FRAMECHANGED call via SetWindowPos +;------------------------------------------------------------------------------ +MUIModifyStyleExA PROC USES EBX hWin:MUIWND, dwRemove:MUIVALUE, dwAdd:MUIVALUE, bFrameChanged:BOOL + Invoke GetWindowLongA, hWin, GWL_EXSTYLE + ; eax has current extended style + + ; Add dwAdd styles to current extended style with OR + mov ebx, dwAdd + or eax, ebx + + ; Remove dwRemove styles from current extended style with NOT (to invert dwRemove) and then AND together + mov ebx, dwRemove + not ebx + and eax, ebx + ; eax has new style + + Invoke SetWindowLongA, hWin, GWL_EXSTYLE, eax + + .IF bFrameChanged == FALSE + ;Invoke SetWindowPos, hWin, NULL, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or SWP_NOACTIVATE + .ELSE + ; Applies new extended styles set using the SetWindowLong function + Invoke SetWindowPos, hWin, NULL, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or SWP_NOACTIVATE or SWP_FRAMECHANGED + .ENDIF + + xor eax, eax + ret +MUIModifyStyleExA ENDP + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Modifies the extended window styles of a Window to add and/or remove styles +; if bFrameChanged is TRUE then forces SWP_FRAMECHANGED call via SetWindowPos +;------------------------------------------------------------------------------ +MUIModifyStyleExW PROC USES EBX hWin:MUIWND, dwRemove:MUIVALUE, dwAdd:MUIVALUE, bFrameChanged:BOOL + Invoke GetWindowLongW, hWin, GWL_EXSTYLE + ; eax has current extended style + + ; Add dwAdd styles to current extended style with OR + mov ebx, dwAdd + or eax, ebx + + ; Remove dwRemove styles from current extended style with NOT (to invert dwRemove) and then AND together + mov ebx, dwRemove + not ebx + and eax, ebx + ; eax has new style + + Invoke SetWindowLongW, hWin, GWL_EXSTYLE, eax + + .IF bFrameChanged == FALSE + ;Invoke SetWindowPos, hWin, NULL, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or SWP_NOACTIVATE + .ELSE + ; Applies new extended styles set using the SetWindowLong function + Invoke SetWindowPos, hWin, NULL, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or SWP_NOACTIVATE or SWP_FRAMECHANGED + .ENDIF + + xor eax, eax + ret +MUIModifyStyleExW ENDP + + +MODERNUI_LIBEND + + + diff --git a/ModernUI/MUIPaintBackground.asm b/ModernUI/MUIPaintBackground.asm index 2e97401..4db1a7e 100644 --- a/ModernUI/MUIPaintBackground.asm +++ b/ModernUI/MUIPaintBackground.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIPaintBackgroundImage.asm b/ModernUI/MUIPaintBackgroundImage.asm index 78fc1bc..ab2d3da 100644 --- a/ModernUI/MUIPaintBackgroundImage.asm +++ b/ModernUI/MUIPaintBackgroundImage.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIPaintBorder.asm b/ModernUI/MUIPaintBorder.asm index 13d86b4..38b168d 100644 --- a/ModernUI/MUIPaintBorder.asm +++ b/ModernUI/MUIPaintBorder.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUIPointSizeToLogicalUnit.asm b/ModernUI/MUIPointSizeToLogicalUnit.asm index e979561..84d74f1 100644 --- a/ModernUI/MUIPointSizeToLogicalUnit.asm +++ b/ModernUI/MUIPointSizeToLogicalUnit.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; @@ -33,6 +33,7 @@ MUI_ALIGN ;------------------------------------------------------------------------------ ; Convert font point size eg '12' to logical unit size for use with CreateFont, ; CreateFontIndirect +; Corresponds to value passsed to nHeight (logical height of font) parameter ;------------------------------------------------------------------------------ MUIPointSizeToLogicalUnit PROC hWin:MUIWND, PointSize:MUIVALUE LOCAL hdc:HDC diff --git a/ModernUI/MUIRegister.asm b/ModernUI/MUIRegister.asm new file mode 100644 index 0000000..ce165e2 --- /dev/null +++ b/ModernUI/MUIRegister.asm @@ -0,0 +1,164 @@ +;============================================================================== +; +; ModernUI Library +; +; Copyright (c) 2023 by fearless +; +; All Rights Reserved +; +; http://github.com/mrfearless/ModernUI +; +;============================================================================== +.686 +.MMX +.XMM +.model flat,stdcall +option casemap:none + +include windows.inc +include user32.inc +include kernel32.inc + +includelib user32.lib +includelib Kernel32.Lib + +include ModernUI.inc + + +.CONST + + +.CODE + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Register a windows class (ANSI version) +; +; lpszClassName - string containing the class name to register +; lpClassWndProc - pointer to the main window procedure to use for the class +; lpCursorName - id as LoadCursor to use for cursor, or IDC_ARROW as default +; cbWndExtra - amount of extra bytes needed for the class - for MUI controls +; typically 8 bytes, first dword for internal properties +; structure allocated in memory via MUIAllocMemProperties, +; and second dword for external properties structure +; allocated in memory via MUIAllocMemProperties. +; +;------------------------------------------------------------------------------ +MUIRegisterA PROC lpszClassName:MUILPSTRING, lpClassWndProc:POINTER, lpCursorName:MUIVALUE, cbWndExtra:MUIVALUE + LOCAL wc:WNDCLASSEX + LOCAL hinstance:DWORD + + .IF lpszClassName == NULL || lpClassWndProc == NULL + mov eax, FALSE + ret + .ENDIF + + Invoke GetModuleHandleA, NULL + mov hinstance, eax + + mov wc.cbSize, SIZEOF WNDCLASSEX + Invoke GetClassInfoExA, hinstance, lpszClassName, Addr wc + .IF eax == 0 ; if class not already registered do so + mov wc.cbSize, SIZEOF WNDCLASSEX + mov eax, lpszClassName + mov wc.lpszClassName, eax + mov eax, hinstance + mov wc.hInstance, eax + mov eax, lpClassWndProc + mov wc.lpfnWndProc, eax + .IF lpCursorName != NULL + Invoke LoadCursorA, NULL, lpCursorName + .ELSE + Invoke LoadCursorA, NULL, IDC_ARROW + .ENDIF + mov wc.hCursor, eax + mov wc.hIcon, 0 + mov wc.hIconSm, 0 + mov wc.lpszMenuName, NULL + mov wc.hbrBackground, NULL + mov wc.style, NULL + mov wc.cbClsExtra, 0 + mov eax, cbWndExtra + mov wc.cbWndExtra, eax + Invoke RegisterClassExA, Addr wc + .IF eax == FALSE + .ELSE + mov eax, TRUE + .ENDIF + .ELSE + mov eax, TRUE + .ENDIF + ret +MUIRegisterA ENDP + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Register a windows class (UNICODE version) +; +; lpszClassName - string containing the class name to register +; lpClassWndProc - pointer to the main window procedure to use for the class +; lpCursorName - id as LoadCursor to use for cursor, or IDC_ARROW as default +; cbWndExtra - amount of extra bytes needed for the class - for MUI controls +; typically 8 bytes, first dword for internal properties +; structure allocated in memory via MUIAllocMemProperties, +; and second dword for external properties structure +; allocated in memory via MUIAllocMemProperties. +; +;------------------------------------------------------------------------------ +MUIRegisterW PROC lpszClassName:MUILPSTRING, lpClassWndProc:POINTER, lpCursorName:MUIVALUE, cbWndExtra:MUIVALUE + LOCAL wc:WNDCLASSEX + LOCAL hinstance:DWORD + + .IF lpszClassName == NULL || lpClassWndProc == NULL + mov eax, FALSE + ret + .ENDIF + + Invoke GetModuleHandleW, NULL + mov hinstance, eax + + mov wc.cbSize, SIZEOF WNDCLASSEX + Invoke GetClassInfoExW, hinstance, lpszClassName, Addr wc + .IF eax == 0 ; if class not already registered do so + mov wc.cbSize, SIZEOF WNDCLASSEX + mov eax, lpszClassName + mov wc.lpszClassName, eax + mov eax, hinstance + mov wc.hInstance, eax + mov eax, lpClassWndProc + mov wc.lpfnWndProc, eax + .IF lpCursorName != NULL + Invoke LoadCursorW, NULL, lpCursorName + .ELSE + Invoke LoadCursorW, NULL, IDC_ARROW + .ENDIF + mov wc.hCursor, eax + mov wc.hIcon, 0 + mov wc.hIconSm, 0 + mov wc.lpszMenuName, NULL + mov wc.hbrBackground, NULL + mov wc.style, NULL + mov wc.cbClsExtra, 0 + mov eax, cbWndExtra + mov wc.cbWndExtra, eax + Invoke RegisterClassExW, Addr wc + .IF eax == FALSE + .ELSE + mov eax, TRUE + .ENDIF + .ELSE + mov eax, TRUE + .ENDIF + ret +MUIRegisterW ENDP + + + + + + + +MODERNUI_LIBEND + + diff --git a/ModernUI/MUISetRegionFromResource.asm b/ModernUI/MUISetRegionFromResource.asm index 7e42922..e31843c 100644 --- a/ModernUI/MUISetRegionFromResource.asm +++ b/ModernUI/MUISetRegionFromResource.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/MUISuperclass.asm b/ModernUI/MUISuperclass.asm new file mode 100644 index 0000000..fef7207 --- /dev/null +++ b/ModernUI/MUISuperclass.asm @@ -0,0 +1,240 @@ +;============================================================================== +; +; ModernUI Library +; +; Copyright (c) 2023 by fearless +; +; All Rights Reserved +; +; http://github.com/mrfearless/ModernUI +; +;============================================================================== +.686 +.MMX +.XMM +.model flat,stdcall +option casemap:none + +include windows.inc +include user32.inc +include kernel32.inc + +includelib user32.lib +includelib Kernel32.Lib + +include ModernUI.inc + + +.CONST + +.DATA +ExistingClassWndProc DD 0 + +.CODE + + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Superclass an existing control and registers the new superclass (ANSI version) +; https://learn.microsoft.com/en-us/windows/win32/winmsg/about-window-procedures#window-procedure-superclassing +; +; lpszExistingClassName - string containing the existing class name to superclass +; lpdwExistingClassWndProc - pointer to a dword to store the existing class's +; main window procedure +; lpszSuperclassName - string containing the new superclass name to register +; lpSuperclassWndProc - pointer to the main window procedure to use for the +; new superclass +; lpSuperclassCursorName - id as LoadCursor to use for cursor, or IDC_ARROW +; as default +; cbSuperclassWndExtra - amount of extra bytes needed for the superclass. +; For MUI controls typically 8 bytes, first dword +; for internal properties structure allocated in +; memory via MUIAllocMemProperties, and second dword +; for external properties structure allocated in +; memory via MUIAllocMemProperties. +; lpcbWndExtraOffset - pointer to a dword to store the cbWndExtra bytes +; used by the base existing class. Use MUIGetProperty +; and MUISetProperty functions and add the extra +; base class bytes to the cbWndExtraOffset parameter +; +;------------------------------------------------------------------------------ +MUISuperclassA PROC USES EBX lpszExistingClassName:MUILPSTRING, lpdwExistingClassWndProc:POINTER, lpszSuperclassName:MUILPSTRING, lpSuperclassWndProc:POINTER, lpSuperclassCursorName:MUIVALUE, cbSuperclassWndExtra:MUIVALUE, lpcbWndExtraOffset:LPMUIVALUE + LOCAL wc:WNDCLASSEX + LOCAL hinstance:DWORD + + .IF lpszExistingClassName == NULL || lpdwExistingClassWndProc == NULL || lpszSuperclassName == NULL || lpSuperclassWndProc == NULL + mov eax, FALSE + ret + .ENDIF + + Invoke GetModuleHandleA, NULL + mov hinstance, eax + + mov wc.cbSize, SIZEOF WNDCLASSEX + Invoke GetClassInfoExA, hinstance, lpszSuperclassName, Addr wc + .IF eax == 0 ; if class not already registered do so + mov wc.cbSize, SIZEOF WNDCLASSEX + ; get existing class information first + Invoke GetClassInfoExA, hinstance, lpszExistingClassName, Addr wc + mov wc.cbSize, SIZEOF WNDCLASSEX + ; Change to our superclass + mov eax, lpszSuperclassName + mov wc.lpszClassName, eax + mov eax, hinstance + mov wc.hInstance, eax + .IF lpdwExistingClassWndProc != NULL + ; ideally return the old window proc + mov eax, wc.lpfnWndProc + mov ebx, lpdwExistingClassWndProc + mov [ebx], eax + .ELSE + ; else store old window proc in our global var + mov eax, wc.lpfnWndProc + mov ExistingClassWndProc, eax + .ENDIF + ; point to our superclass proc to use instead + mov eax, lpSuperclassWndProc + mov wc.lpfnWndProc, eax + ; Load a custom cursor if specified + .IF lpSuperclassCursorName != NULL + Invoke LoadCursorA, NULL, lpSuperclassCursorName + .ELSE + Invoke LoadCursorA, NULL, IDC_ARROW + .ENDIF + mov wc.hCursor, eax + mov wc.hIcon, 0 + mov wc.hIconSm, 0 + mov wc.lpszMenuName, NULL + mov wc.hbrBackground, NULL + mov wc.style, NULL + mov wc.cbClsExtra, 0 + ; Find out the base bytes used by the existing class in cbWndExtra + mov eax, wc.cbWndExtra + .IF lpcbWndExtraOffset != NULL + ; store the base bytes used by the existing class as an offset into cbWndExtra + mov ebx, lpcbWndExtraOffset + mov [ebx], eax + .ENDIF + ; Add our own extra bytes required + add eax, cbSuperclassWndExtra + mov wc.cbWndExtra, eax + Invoke RegisterClassExA, Addr wc + .IF eax == FALSE + .ELSE + mov eax, TRUE + .ENDIF + .ELSE + mov eax, TRUE + .ENDIF + + ret +MUISuperclassA ENDP + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Superclass an existing control and registers the new superclass (UNICODE version) +; https://learn.microsoft.com/en-us/windows/win32/winmsg/about-window-procedures#window-procedure-superclassing +; +; lpszExistingClassName - string containing the existing class name to superclass +; lpdwExistingClassWndProc - pointer to a dword to store the existing class's +; main window procedure +; lpszSuperclassName - string containing the new superclass name to register +; lpSuperclassWndProc - pointer to the main window procedure to use for the +; new superclass +; lpSuperclassCursorName - id as LoadCursor to use for cursor, or IDC_ARROW +; as default +; cbSuperclassWndExtra - amount of extra bytes needed for the superclass. +; For MUI controls typically 8 bytes, first dword +; for internal properties structure allocated in +; memory via MUIAllocMemProperties, and second dword +; for external properties structure allocated in +; memory via MUIAllocMemProperties. +; lpcbWndExtraOffset - pointer to a dword to store the cbWndExtra bytes +; used by the base existing class. Use MUIGetProperty +; and MUISetProperty functions and add the extra +; base class bytes to the cbWndExtraOffset parameter +; +;------------------------------------------------------------------------------ +MUISuperclassW PROC USES EBX lpszExistingClassName:MUILPSTRING, lpdwExistingClassWndProc:POINTER, lpszSuperclassName:MUILPSTRING, lpSuperclassWndProc:POINTER, lpSuperclassCursorName:MUIVALUE, cbSuperclassWndExtra:MUIVALUE, lpcbWndExtraOffset:LPMUIVALUE + LOCAL wc:WNDCLASSEX + LOCAL hinstance:DWORD + + .IF lpszExistingClassName == NULL || lpdwExistingClassWndProc == NULL || lpszSuperclassName == NULL || lpSuperclassWndProc == NULL + mov eax, FALSE + ret + .ENDIF + + Invoke GetModuleHandleW, NULL + mov hinstance, eax + + mov wc.cbSize, SIZEOF WNDCLASSEX + Invoke GetClassInfoExW, hinstance, lpszSuperclassName, Addr wc + .IF eax == 0 ; if class not already registered do so + mov wc.cbSize, SIZEOF WNDCLASSEX + ; get existing class information first + Invoke GetClassInfoExW, hinstance, lpszExistingClassName, Addr wc + mov wc.cbSize, SIZEOF WNDCLASSEX + ; Change to our superclass + mov eax, lpszSuperclassName + mov wc.lpszClassName, eax + mov eax, hinstance + mov wc.hInstance, eax + .IF lpdwExistingClassWndProc != NULL + ; ideally return the old window proc + mov eax, wc.lpfnWndProc + mov ebx, lpdwExistingClassWndProc + mov [ebx], eax + .ELSE + ; else store old window proc in our global var + mov eax, wc.lpfnWndProc + mov ExistingClassWndProc, eax + .ENDIF + ; point to our superclass proc to use instead + mov eax, lpSuperclassWndProc + mov wc.lpfnWndProc, eax + ; Load a custom cursor if specified + .IF lpSuperclassCursorName != NULL + Invoke LoadCursorW, NULL, lpSuperclassCursorName + .ELSE + Invoke LoadCursorW, NULL, IDC_ARROW + .ENDIF + mov wc.hCursor, eax + mov wc.hIcon, 0 + mov wc.hIconSm, 0 + mov wc.lpszMenuName, NULL + mov wc.hbrBackground, NULL + mov wc.style, NULL + mov wc.cbClsExtra, 0 + ; Find out the base bytes used by the existing class in cbWndExtra + mov eax, wc.cbWndExtra + .IF lpcbWndExtraOffset != NULL + ; store the base bytes used by the existing class as an offset into cbWndExtra + mov ebx, lpcbWndExtraOffset + mov [ebx], eax + .ENDIF + ; Add our own extra bytes required + add eax, cbSuperclassWndExtra + mov wc.cbWndExtra, eax + Invoke RegisterClassExW, Addr wc + .IF eax == FALSE + .ELSE + mov eax, TRUE + .ENDIF + .ELSE + mov eax, TRUE + .ENDIF + + ret +MUISuperclassW ENDP + + + + + + +MODERNUI_LIBEND + + + + diff --git a/ModernUI/ModernUI.h b/ModernUI/ModernUI.h index a02517e..bdf1055 100644 --- a/ModernUI/ModernUI.h +++ b/ModernUI/ModernUI.h @@ -2,7 +2,7 @@ ModernUI Library - Copyright (c) 2019 by fearless + Copyright (c) 2023 by fearless All Rights Reserved @@ -30,6 +30,8 @@ typedef size_t MUIPROPERTY; // Typedef for MUI(Get/Set)(Int/Ext)Property typedef size_t MUIPROPERTYVALUE; // Typedef for MUISetIntProperty/MUISetExtProperty PropertyValue parameter typedef size_t MUIVALUE; // QWORD in x64 typedef MUIVALUE * LPMUIVALUE; // Pointer to MUIVALUE +typedef MUIVALUE * MUILPVALUE; // Pointer to MUIVALUE +typedef size_t * MUILPSTRING; // Pointer to zero terminated string typedef size_t MUIIT; // Image type typedef size_t MUIIL; // Image location typedef size_t MUIPFS; // Paint frame style @@ -57,7 +59,7 @@ typedef size_t RESID; // Resource ID #define MUI_EXTERNAL_PROPERTIES 8 // cbWndExtra offset for external properties pointer #define MUI_INTERNAL_PROPERTIES_EXTRA 16 // cbWndExtra offset for extra internal properties pointer #define MUI_EXTERNAL_PROPERTIES_EXTRA 24 // cbWndExtra offset for extra external properties pointer -#define MUI_PROPERTY_ADDRESS 0x80000000 // OR with Property in MUIGetIntProperty/MUIGetExtProperty to return address of property +#define MUI_PROPERTY_ADDRESS 0x8000000000000000 // OR with Property in MUIGetIntProperty/MUIGetExtProperty to return address of property #else // WIN32 x86 #define MUI_INTERNAL_PROPERTIES 0 // cbWndExtra offset for internal properties pointer #define MUI_EXTERNAL_PROPERTIES 4 // cbWndExtra offset for external properties pointer @@ -127,20 +129,39 @@ typedef GDIPRECT * LPGDIPRECT; // Pointer to GDIPRECT // ModernUI Prototypes //----------------------------------------------------------------------------*/ // ModernUI Base Functions: -MUIPROPERTY MUI_EXPORT MUIGetExtProperty(MUIWND hWin, MUIPROPERTY Property); -MUIPROPERTY MUI_EXPORT MUISetExtProperty(MUIWND hWin, MUIPROPERTY Property, MUIPROPERTYVALUE PropertyValue); -MUIPROPERTY MUI_EXPORT MUIGetIntProperty(MUIWND hWin, MUIPROPERTY Property); -MUIPROPERTY MUI_EXPORT MUISetIntProperty(MUIWND hWin, MUIPROPERTY Property, MUIPROPERTYVALUE PropertyValue); - -MUIPROPERTY MUI_EXPORT MUIGetExtPropertyEx(MUIWND hWin, MUIPROPERTY Property, ParentProperty MUIPROPERTY); -MUIPROPERTY MUI_EXPORT MUISetExtPropertyEx(MUIWND hWin, MUIPROPERTY Property, ParentProperty MUIPROPERTY, ChildProperty MUIPROPERTYVALUE); -MUIPROPERTY MUI_EXPORT MUIGetIntPropertyEx(MUIWND hWin, MUIPROPERTY Property, ParentProperty MUIPROPERTY); -MUIPROPERTY MUI_EXPORT MUISetIntPropertyEx(MUIWND hWin, MUIPROPERTY Property, ParentProperty MUIPROPERTY, ChildProperty MUIPROPERTYVALUE); - -MUIPROPERTY MUI_EXPORT MUIGetExtPropertyExtra(MUIWND hWin, MUIPROPERTY Property); -MUIPROPERTY MUI_EXPORT MUISetExtPropertyExtra(MUIWND hWin, MUIPROPERTY Property, MUIPROPERTYVALUE PropertyValue); -MUIPROPERTY MUI_EXPORT MUIGetIntPropertyExtra(MUIWND hWin, MUIPROPERTY Property); -MUIPROPERTY MUI_EXPORT MUISetIntPropertyExtra(MUIWND hWin, MUIPROPERTY Property, MUIPROPERTYVALUE PropertyValue); +MUIVALUE MUI_EXPORT MUIGetPropertyA(MUIWND hWin, MUIPROPERTIES cbWndExtraOffset, MUIPROPERTYVALUE PropertyValue); +MUIVALUE MUI_EXPORT MUISetPropertyA(MUIWND hWin, MUIPROPERTIES cbWndExtraOffset, MUIPROPERTY Property, MUIPROPERTYVALUE PropertyValue); +MUIVALUE MUI_EXPORT MUIGetExtPropertyA(MUIWND hWin, MUIPROPERTY Property); +MUIVALUE MUI_EXPORT MUISetExtPropertyA(MUIWND hWin, MUIPROPERTY Property, MUIPROPERTYVALUE PropertyValue); +MUIVALUE MUI_EXPORT MUIGetIntPropertyA(MUIWND hWin, MUIPROPERTY Property); +MUIVALUE MUI_EXPORT MUISetIntPropertyA(MUIWND hWin, MUIPROPERTY Property, MUIPROPERTYVALUE PropertyValue); + +MUIVALUE MUI_EXPORT MUIGetExtPropertyExA(MUIWND hWin, MUIPROPERTY Property, ParentProperty MUIPROPERTY); +MUIVALUE MUI_EXPORT MUISetExtPropertyExA(MUIWND hWin, MUIPROPERTY Property, ParentProperty MUIPROPERTY, ChildProperty MUIPROPERTYVALUE); +MUIVALUE MUI_EXPORT MUIGetIntPropertyExA(MUIWND hWin, MUIPROPERTY Property, ParentProperty MUIPROPERTY); +MUIVALUE MUI_EXPORT MUISetIntPropertyExA(MUIWND hWin, MUIPROPERTY Property, ParentProperty MUIPROPERTY, ChildProperty MUIPROPERTYVALUE); + +MUIVALUE MUI_EXPORT MUIGetExtPropertyExtraA(MUIWND hWin, MUIPROPERTY Property); +MUIVALUE MUI_EXPORT MUISetExtPropertyExtraA(MUIWND hWin, MUIPROPERTY Property, MUIPROPERTYVALUE PropertyValue); +MUIVALUE MUI_EXPORT MUIGetIntPropertyExtraA(MUIWND hWin, MUIPROPERTY Property); +MUIVALUE MUI_EXPORT MUISetIntPropertyExtraA(MUIWND hWin, MUIPROPERTY Property, MUIPROPERTYVALUE PropertyValue); + +MUIVALUE MUI_EXPORT MUIGetPropertyW(MUIWND hWin, MUIPROPERTIES cbWndExtraOffset, MUIPROPERTYVALUE PropertyValue); +MUIVALUE MUI_EXPORT MUISetPropertyW(MUIWND hWin, MUIPROPERTIES cbWndExtraOffset, MUIPROPERTY Property, MUIPROPERTYVALUE PropertyValue); +MUIVALUE MUI_EXPORT MUIGetExtPropertyW(MUIWND hWin, MUIPROPERTY Property); +MUIVALUE MUI_EXPORT MUISetExtPropertyW(MUIWND hWin, MUIPROPERTY Property, MUIPROPERTYVALUE PropertyValue); +MUIVALUE MUI_EXPORT MUIGetIntPropertyW(MUIWND hWin, MUIPROPERTY Property); +MUIVALUE MUI_EXPORT MUISetIntPropertyW(MUIWND hWin, MUIPROPERTY Property, MUIPROPERTYVALUE PropertyValue); + +MUIVALUE MUI_EXPORT MUIGetExtPropertyExW(MUIWND hWin, MUIPROPERTY Property, ParentProperty MUIPROPERTY); +MUIVALUE MUI_EXPORT MUISetExtPropertyExW(MUIWND hWin, MUIPROPERTY Property, ParentProperty MUIPROPERTY, ChildProperty MUIPROPERTYVALUE); +MUIVALUE MUI_EXPORT MUIGetIntPropertyExW(MUIWND hWin, MUIPROPERTY Property, ParentProperty MUIPROPERTY); +MUIVALUE MUI_EXPORT MUISetIntPropertyExW(MUIWND hWin, MUIPROPERTY Property, ParentProperty MUIPROPERTY, ChildProperty MUIPROPERTYVALUE); + +MUIVALUE MUI_EXPORT MUIGetExtPropertyExtraW(MUIWND hWin, MUIPROPERTY Property); +MUIVALUE MUI_EXPORT MUISetExtPropertyExtraW(MUIWND hWin, MUIPROPERTY Property, MUIPROPERTYVALUE PropertyValue); +MUIVALUE MUI_EXPORT MUIGetIntPropertyExtraW(MUIWND hWin, MUIPROPERTY Property); +MUIVALUE MUI_EXPORT MUISetIntPropertyExtraW(MUIWND hWin, MUIPROPERTY Property, MUIPROPERTYVALUE PropertyValue); // ModernUI Memory Functions bool MUI_EXPORT MUIAllocMemProperties(MUIWND hWin, MUIPROPERTIES cbWndExtraOffset, MUIVALUE SizeToAllocate); @@ -157,6 +178,7 @@ MUIIMAGE MUI_EXPORT MUIGDIStretchImage(MUIIMAGE hImage, MUIIT ImageHandleType, R HBITMAP MUI_EXPORT MUIGDIRotateCenterBitmap(MUIWND hWin, HBITMAP hBitmap, MUIVALUE Angle, MUICOLORRGB BackColor); void MUI_EXPORT MUIGDIPaintFill(HDC hdc, RECT *lpFillRect, MUICOLORRGB FillColor); void MUI_EXPORT MUIGDIPaintFrame(HDC hdc, RECT *lpFrameRect, MUICOLORRGB FrameColor, MUIPFS FrameStyle); +void MUI_EXPORT MUIGDIPaintRectangle(HDC hdc, LPRECT *lpRect, MUICOLORRGB FrameColor, MUICOLORRGB FillColor); // ModernUI GDIPlus Functions void MUI_EXPORT MUIGDIPlusStart(); @@ -191,10 +213,17 @@ MUICOLORRGB MUI_EXPORT MUIGetParentBackgroundColor(MUIWND hWin); HBITMAP MUI_EXPORT MUIGetParentBackgroundBitmap(MUIWND hWin); // ModernUI Window/Dialog Functions -void MUI_EXPORT MUIApplyToDialog(MUIWND hWin, BOOL bDropShadow, BOOL bClipping); void MUI_EXPORT MUICenterWindow(hWndChild MUIWND, hWndParent MUIWND); void MUI_EXPORT MUIGetParentRelativeWindowRect(MUIWND hWin, RECT *lpRectControl); +void MUI_EXPORT MUIApplyToDialogA(MUIWND hWin, BOOL bDropShadow, BOOL bClipping); +void MUI_EXPORT MUIModifyStyleA(MUIWND hWin, MUIVALUE dwRemove, MUIVALUE dwAdd, BOOL bFrameChanged); +void MUI_EXPORT MUIModifyStyleExA(MUIWND hWin, MUIVALUE dwRemove, MUIVALUE dwAdd, BOOL bFrameChanged); + +void MUI_EXPORT MUIApplyToDialogW(MUIWND hWin, BOOL bDropShadow, BOOL bClipping); +void MUI_EXPORT MUIModifyStyleW(MUIWND hWin, MUIVALUE dwRemove, MUIVALUE dwAdd, BOOL bFrameChanged); +void MUI_EXPORT MUIModifyStyleExW(MUIWND hWin, MUIVALUE dwRemove, MUIVALUE dwAdd, BOOL bFrameChanged); + // ModernUI Region Functions bool MUI_EXPORT MUILoadRegionFromResource(HINSTANCE hInst, RESID idRgnRes, POINTER *lpRegionData, MUIVALUE *lpSizeRegionData); bool MUI_EXPORT MUISetRegionFromResource(MUIWND hWin, RESID idRgnRes, MUIVALUE lpCopyRgnHandle, BOOL bRedraw); @@ -223,6 +252,60 @@ void MUI_EXPORT MUIDPIScaleFont(HFONT hFont); void MUI_EXPORT MUIDPIScaledScreen(MUIVALUE * lpScreenWidth, MUIVALUE * lpScreenHeight); bool MUI_EXPORT MUIDPISetDPIAware(); +// ModernUI Class Functions +bool MUI_EXPORT MUIRegisterA(MUILPSTRING *lpszClassName, POINTER *lpClassWndProc, MUIVALUE lpCursorName, MUIVALUE cbWndExtra); +bool MUI_EXPORT MUISuperclassA(MUILPSTRING *lpszExistingClassName, POINTER *lpdwExistingClassWndProc, MUILPSTRING *lpszSuperclassName, POINTER *lpSuperclassWndProc, MUIVALUE lpSuperclassCursorName, cbSuperclassWndExtra:MUIVALUE, LPMUIVALUE lpcbWndExtraOffset); + +bool MUI_EXPORT MUIRegisterW(MUILPSTRING *lpszClassName, POINTER *lpClassWndProc, MUIVALUE lpCursorName, MUIVALUE cbWndExtra); +bool MUI_EXPORT MUISuperclassW(MUILPSTRING *lpszExistingClassName, POINTER *lpdwExistingClassWndProc, MUILPSTRING *lpszSuperclassName, POINTER *lpSuperclassWndProc, MUIVALUE lpSuperclassCursorName, cbSuperclassWndExtra:MUIVALUE, LPMUIVALUE lpcbWndExtraOffset); + + +#ifdef UNICODE +#define MUIGetProperty MUIGetPropertyW +#define MUISetProperty MUISetPropertyW +#define MUIGetExtProperty MUIGetExtPropertyW +#define MUISetExtProperty MUISetExtPropertyW +#define MUIGetIntProperty MUIGetIntPropertyW +#define MUISetIntProperty MUISetIntPropertyW +#define MUIGetExtPropertyEx MUIGetExtPropertyExW +#define MUISetExtPropertyEx MUISetExtPropertyExW +#define MUIGetIntPropertyEx MUIGetIntPropertyExW +#define MUISetIntPropertyEx MUISetIntPropertyExW +#define MUIGetExtPropertyExtra MUIGetExtPropertyExtraW +#define MUISetExtPropertyExtra MUISetExtPropertyExtraW +#define MUIGetIntPropertyExtra MUIGetIntPropertyExtraW +#define MUISetIntPropertyExtra MUISetIntPropertyExtraW +#define MUIApplyToDialog MUIApplyToDialogW +#define MUIModifyStyle MUIModifyStyleW +#define MUIModifyStyleEx MUIModifyStyleExW +#define MUIDPIScaleFont MUIDPIScaleFontW +#define MUIDPISetDPIAware MUIDPISetDPIAwareW +#define MUIRegister MUIRegisterW +#define MUISuperclass MUISuperclassW +#else +#define MUIGetProperty MUIGetPropertyA +#define MUISetProperty MUISetPropertyA +#define MUIGetExtProperty MUIGetExtPropertyA +#define MUISetExtProperty MUISetExtPropertyA +#define MUIGetIntProperty MUIGetIntPropertyA +#define MUISetIntProperty MUISetIntPropertyA +#define MUIGetExtPropertyEx MUIGetExtPropertyExA +#define MUISetExtPropertyEx MUISetExtPropertyExA +#define MUIGetIntPropertyEx MUIGetIntPropertyExA +#define MUISetIntPropertyEx MUISetIntPropertyExA +#define MUIGetExtPropertyExtra MUIGetExtPropertyExtraA +#define MUISetExtPropertyExtra MUISetExtPropertyExtraA +#define MUIGetIntPropertyExtra MUIGetIntPropertyExtraA +#define MUISetIntPropertyExtra MUISetIntPropertyExtraA +#define MUIDPIScaleFont MUIDPIScaleFontA +#define MUIDPISetDPIAware MUIDPISetDPIAwareA +#define MUIApplyToDialog MUIApplyToDialogA +#define MUIModifyStyle MUIModifyStyleA +#define MUIModifyStyleEx MUIModifyStyleExA +#define MUIRegister MUIRegisterA +#define MUISuperclass MUISuperclassA +#endif // !UNICODE + /*----------------------------------------- ; Notes diff --git a/ModernUI/ModernUI.inc b/ModernUI/ModernUI.inc index b7a45b1..90f2ddc 100644 --- a/ModernUI/ModernUI.inc +++ b/ModernUI/ModernUI.inc @@ -1,11 +1,11 @@ ;============================================================================== ; -; ModernUI Library v0.0.0.6 +; ModernUI Library v0.0.0.7 ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved -; +; ; http://github.com/mrfearless/ModernUI ; ; @@ -50,6 +50,8 @@ MUIPROPERTY TYPEDEF QWORD ; Typedef for MUIGetIntPrope MUIPROPERTYVALUE TYPEDEF QWORD ; Typedef for MUISetIntProperty/MUISetExtProperty PropertyValue parameter MUIVALUE TYPEDEF QWORD ; QWORD in x64 LPMUIVALUE TYPEDEF PTR MUIVALUE; Pointer to MUIVALUE +MUILPVALUE TYPEDEF PTR MUIVALUE; Pointer to MUIVALUE +MUILPSTRING TYPEDEF QWORD ; Pointer to zero terminated string MUIIT TYPEDEF QWORD ; Image type MUIIL TYPEDEF QWORD ; Image location MUIPFS TYPEDEF QWORD ; Paint frame style @@ -77,6 +79,8 @@ MUIPROPERTY TYPEDEF DWORD ; Typedef for MUIGetIntPrope MUIPROPERTYVALUE TYPEDEF DWORD ; Typedef for MUISetIntProperty/MUISetExtProperty PropertyValue parameter MUIVALUE TYPEDEF DWORD ; DWORD in x86 LPMUIVALUE TYPEDEF PTR MUIVALUE; Pointer to MUIVALUE +MUILPVALUE TYPEDEF PTR MUIVALUE; Pointer to MUIVALUE +MUILPSTRING TYPEDEF DWORD ; Pointer to zero terminated string MUIIT TYPEDEF DWORD ; Image type MUIIL TYPEDEF DWORD ; Image location MUIPFS TYPEDEF DWORD ; Paint frame style @@ -98,6 +102,25 @@ POINTER TYPEDEF DWORD ; DWORD in x86 RESID TYPEDEF DWORD ; Resource ID ENDIF +;------------------------------------------------------------------------------------ +; UNICODE SUPPORT +;------------------------------------------------------------------------------------ +; To explicitly enable unicode support uncomment the define for MUI_UNICODE below +; This will force all controls that are built to use the unicode versions of the +; ModernUI Library functions. +; +; If you wish to just compile one specific control as unicode, add the MUI_UNICODE +; define in the control's source before the include ModernUI.inc like below: +;------------------------------------------------------------------------------------ +;MUI_UNICODE TEXTEQU <__UNICODE__> +;IFDEF MUI_UNICODE +;__UNICODE__ EQU 1 +;ECHO ModernUI UNICODE +;ELSE +;ECHO ModernUI ANSI +;ENDIF +;------------------------------------------------------------------------------------ + .CONST ;------------------------------------------ ; Conditional for ModernUI DLL compiling @@ -123,11 +146,11 @@ ENDIF ; ModernUI Property Constants ;------------------------------------------ IFDEF _WIN64 -MUI_INTERNAL_PROPERTIES EQU 0 ; cbWndExtra offset for internal properties pointer -MUI_EXTERNAL_PROPERTIES EQU 8 ; cbWndExtra offset for external properties pointer -MUI_INTERNAL_PROPERTIES_EXTRA EQU 16 ; cbWndExtra offset for extra internal properties pointer -MUI_EXTERNAL_PROPERTIES_EXTRA EQU 24 ; cbWndExtra offset for extra external properties pointer -MUI_PROPERTY_ADDRESS EQU 80000000h ; OR with Property in MUIGetIntProperty/MUIGetExtProperty to return address of property +;MUI_INTERNAL_PROPERTIES EQU 0 ; cbWndExtra offset for internal properties pointer +;MUI_EXTERNAL_PROPERTIES EQU 8 ; cbWndExtra offset for external properties pointer +;MUI_INTERNAL_PROPERTIES_EXTRA EQU 16 ; cbWndExtra offset for extra internal properties pointer +;MUI_EXTERNAL_PROPERTIES_EXTRA EQU 24 ; cbWndExtra offset for extra external properties pointer +;MUI_PROPERTY_ADDRESS EQU 8000000000000000h ; OR with Property in MUIGetIntProperty/MUIGetExtProperty to return address of property ELSE ; WIN32 x86 MUI_INTERNAL_PROPERTIES EQU 0 ; cbWndExtra offset for internal properties pointer MUI_EXTERNAL_PROPERTIES EQU 4 ; cbWndExtra offset for external properties pointer @@ -218,20 +241,39 @@ LPGDIPRECT TYPEDEF PTR GDIPRECT; Pointer to GDIPRECT ; ModernUI Prototypes ;------------------------------------------------------------------------------ ; ModernUI Base Functions: -MUIGetExtProperty PROTO hWin:MUIWND, Property:MUIPROPERTY -MUISetExtProperty PROTO hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE -MUIGetIntProperty PROTO hWin:MUIWND, Property:MUIPROPERTY -MUISetIntProperty PROTO hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE - -MUIGetExtPropertyEx PROTO hWin:MUIWND, Property:MUIPROPERTY, ParentProperty:MUIPROPERTY -MUISetExtPropertyEx PROTO hWin:MUIWND, Property:MUIPROPERTY, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTYVALUE -MUIGetIntPropertyEx PROTO hWin:MUIWND, Property:MUIPROPERTY, ParentProperty:MUIPROPERTY -MUISetIntPropertyEx PROTO hWin:MUIWND, Property:MUIPROPERTY, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTYVALUE - -MUIGetExtPropertyExtra PROTO hWin:MUIWND, Property:MUIPROPERTY -MUISetExtPropertyExtra PROTO hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE -MUIGetIntPropertyExtra PROTO hWin:MUIWND, Property:MUIPROPERTY -MUISetIntPropertyExtra PROTO hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE +MUIGetPropertyA PROTO hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY +MUISetPropertyA PROTO hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE +MUIGetExtPropertyA PROTO hWin:MUIWND, Property:MUIPROPERTY +MUISetExtPropertyA PROTO hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE +MUIGetIntPropertyA PROTO hWin:MUIWND, Property:MUIPROPERTY +MUISetIntPropertyA PROTO hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + +MUIGetExtPropertyExA PROTO hWin:MUIWND, Property:MUIPROPERTY, ParentProperty:MUIPROPERTY +MUISetExtPropertyExA PROTO hWin:MUIWND, Property:MUIPROPERTY, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTYVALUE +MUIGetIntPropertyExA PROTO hWin:MUIWND, Property:MUIPROPERTY, ParentProperty:MUIPROPERTY +MUISetIntPropertyExA PROTO hWin:MUIWND, Property:MUIPROPERTY, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTYVALUE + +MUIGetExtPropertyExtraA PROTO hWin:MUIWND, Property:MUIPROPERTY +MUISetExtPropertyExtraA PROTO hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE +MUIGetIntPropertyExtraA PROTO hWin:MUIWND, Property:MUIPROPERTY +MUISetIntPropertyExtraA PROTO hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + +MUIGetPropertyW PROTO hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY +MUISetPropertyW PROTO hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE +MUIGetExtPropertyW PROTO hWin:MUIWND, Property:MUIPROPERTY +MUISetExtPropertyW PROTO hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE +MUIGetIntPropertyW PROTO hWin:MUIWND, Property:MUIPROPERTY +MUISetIntPropertyW PROTO hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + +MUIGetExtPropertyExW PROTO hWin:MUIWND, Property:MUIPROPERTY, ParentProperty:MUIPROPERTY +MUISetExtPropertyExW PROTO hWin:MUIWND, Property:MUIPROPERTY, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTYVALUE +MUIGetIntPropertyExW PROTO hWin:MUIWND, Property:MUIPROPERTY, ParentProperty:MUIPROPERTY +MUISetIntPropertyExW PROTO hWin:MUIWND, Property:MUIPROPERTY, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTYVALUE + +MUIGetExtPropertyExtraW PROTO hWin:MUIWND, Property:MUIPROPERTY +MUISetExtPropertyExtraW PROTO hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE +MUIGetIntPropertyExtraW PROTO hWin:MUIWND, Property:MUIPROPERTY +MUISetIntPropertyExtraW PROTO hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE ; ModernUI Memory Functions: MUIAllocMemProperties PROTO hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, SizeToAllocate:MUIVALUE @@ -248,6 +290,7 @@ MUIGDIStretchImage PROTO hImage:MUIIMAGE, ImageHandleType:MUIIT, lp MUIGDIRotateCenterBitmap PROTO hWin:MUIWND, hBitmap:HBITMAP, Angle:MUIVALUE, BackColor:MUICOLORRGB MUIGDIPaintFill PROTO hdc:HDC, lpFillRect:LPRECT, FillColor:MUICOLORRGB MUIGDIPaintFrame PROTO hdc:HDC, lpFrameRect:LPRECT, FrameColor:MUICOLORRGB, FrameStyle:MUIPFS +MUIGDIPaintRectangle PROTO hdc:HDC, lpRect:LPRECT, FrameColor:MUICOLORRGB, FillColor:MUICOLORRGB MUIGDIPaintBrush PROTO hdc:HDC, lpBrushRect:LPRECT, hBrushBitmap:HBITMAP, dwBrushOrgX:MUIVALUE, dwBrushOrgY:MUIVALUE MUIGDIPaintGradient PROTO hdc:HDC, lpGradientRect:LPRECT, GradientColorFrom:MUICOLORRGB, GradientColorTo:MUICOLORRGB, HorzVertGradient:MUIPGS MUIGDICreateBitmapMask PROTO hBitmap:HBITMAP, TransparentColor:MUICOLORRGB @@ -286,11 +329,18 @@ MUIGetParentBackgroundColor PROTO hWin:MUIWND MUIGetParentBackgroundBitmap PROTO hWin:MUIWND ; ModernUI Window/Dialog Functions: -MUIApplyToDialog PROTO hWin:MUIWND, bDropShadow:BOOL, bClipping:BOOL MUICenterWindow PROTO hWndChild:MUIWND, hWndParent:MUIWND MUIGetParentRelativeWindowRect PROTO hWin:MUIWND, lpRectControl:LPRECT MUIChangeScreenResolution PROTO ScreenWidth:MUIVALUE, ScreenHeight:MUIVALUE, bitsPerPixel:MUIVALUE +MUIApplyToDialogA PROTO hWin:MUIWND, bDropShadow:BOOL, bClipping:BOOL +MUIModifyStyleA PROTO hWin:MUIWND, dwRemove:MUIVALUE, dwAdd:MUIVALUE, bFrameChanged:BOOL +MUIModifyStyleExA PROTO hWin:MUIWND, dwRemove:MUIVALUE, dwAdd:MUIVALUE, bFrameChanged:BOOL + +MUIApplyToDialogW PROTO hWin:MUIWND, bDropShadow:BOOL, bClipping:BOOL +MUIModifyStyleW PROTO hWin:MUIWND, dwRemove:MUIVALUE, dwAdd:MUIVALUE, bFrameChanged:BOOL +MUIModifyStyleExW PROTO hWin:MUIWND, dwRemove:MUIVALUE, dwAdd:MUIVALUE, bFrameChanged:BOOL + ; ModernUI Region Functions: MUILoadRegionFromResource PROTO hInst:HINSTANCE, idRgnRes:RESID, lpRegionData:POINTER, lpSizeRegionData:LPMUIVALUE MUISetRegionFromResource PROTO hWin:MUIWND, idRgnRes:RESID, lpCopyRgnHandle:LPMUIVALUE, bRedraw:BOOL @@ -315,9 +365,70 @@ MUIDPIScaleY PROTO ValueY:MUIVALUE MUIDPIScaleRect PROTO lpRect:LPRECT MUIDPIScaleControl PROTO lpLeft:LPMUIVALUE, lpTop:LPMUIVALUE, lpWidth:LPMUIVALUE, lpHeight:LPMUIVALUE MUIDPIScaleFontSize PROTO PointSize:MUIVALUE -MUIDPIScaleFont PROTO hFontToScale:HFONT MUIDPIScaledScreen PROTO lpScreenWidth:LPMUIVALUE, lpScreenHeight:LPMUIVALUE -MUIDPISetDPIAware PROTO + +MUIDPIScaleFontA PROTO hFontToScale:HFONT +MUIDPISetDPIAwareA PROTO + +MUIDPIScaleFontW PROTO hFontToScale:HFONT +MUIDPISetDPIAwareW PROTO + +; ModernUI Class Functions +MUIRegisterA PROTO lpszClassName:MUILPSTRING, lpClassWndProc:POINTER, lpCursorName:MUIVALUE, cbWndExtra:MUIVALUE +MUISuperclassA PROTO lpszExistingClassName:MUILPSTRING, lpdwExistingClassWndProc:POINTER, lpszSuperclassName:MUILPSTRING, lpSuperclassWndProc:POINTER, lpSuperclassCursorName:MUIVALUE, cbSuperclassWndExtra:MUIVALUE, lpcbWndExtraOffset:LPMUIVALUE + +MUIRegisterW PROTO lpszClassName:MUILPSTRING, lpClassWndProc:POINTER, lpCursorName:MUIVALUE, cbWndExtra:MUIVALUE +MUISuperclassW PROTO lpszExistingClassName:MUILPSTRING, lpdwExistingClassWndProc:POINTER, lpszSuperclassName:MUILPSTRING, lpSuperclassWndProc:POINTER, lpSuperclassCursorName:MUIVALUE, cbSuperclassWndExtra:MUIVALUE, lpcbWndExtraOffset:LPMUIVALUE + + + +IFNDEF MUI_UNICODE +MUIGetProperty EQU +MUISetProperty EQU +MUIGetExtProperty EQU +MUISetExtProperty EQU +MUIGetIntProperty EQU +MUISetIntProperty EQU +MUIGetExtPropertyEx EQU +MUISetExtPropertyEx EQU +MUIGetIntPropertyEx EQU +MUISetIntPropertyEx EQU +MUIGetExtPropertyExtra EQU +MUISetExtPropertyExtra EQU +MUIGetIntPropertyExtra EQU +MUISetIntPropertyExtra EQU +MUIDPIScaleFont EQU +MUIDPISetDPIAware EQU +MUIApplyToDialog EQU +MUIModifyStyle EQU +MUIModifyStyleEx EQU +MUIRegister EQU +MUISuperclass EQU +ENDIF + +IFDEF MUI_UNICODE +MUIGetProperty EQU +MUISetProperty EQU +MUIGetExtProperty EQU +MUISetExtProperty EQU +MUIGetIntProperty EQU +MUISetIntProperty EQU +MUIGetExtPropertyEx EQU +MUISetExtPropertyEx EQU +MUIGetIntPropertyEx EQU +MUISetIntPropertyEx EQU +MUIGetExtPropertyExtra EQU +MUISetExtPropertyExtra EQU +MUIGetIntPropertyExtra EQU +MUISetIntPropertyExtra EQU +MUIApplyToDialog EQU +MUIModifyStyle EQU +MUIModifyStyleEx EQU +MUIDPIScaleFont EQU +MUIDPISetDPIAware EQU +MUIRegister EQU +MUISuperclass EQU +ENDIF ;------------------------------------------ @@ -350,15 +461,7 @@ MUIDPISetDPIAware PROTO ;------------------------------------------ -;------------------------------------------ -; Remove comment to include unicode support -;------------------------------------------ -;MUI_UNICODE TEXTEQU <__UNICODE__> -;IFDEF MUI_UNICODE -;__UNICODE__ EQU 1 -;ECHO MUI_UNICODE BUILD -;ENDIF -;------------------------------------------ + diff --git a/ModernUI/ModernUI.lib b/ModernUI/ModernUI.lib index 36296eb..3707f89 100644 Binary files a/ModernUI/ModernUI.lib and b/ModernUI/ModernUI.lib differ diff --git a/ModernUI/ModernUI.rap b/ModernUI/ModernUI.rap index 28da019..17581de 100644 --- a/ModernUI/ModernUI.rap +++ b/ModernUI/ModernUI.rap @@ -55,6 +55,11 @@ Debug=0 46=MUIPaintBorder.asm 47=MUIGDIPaintGradient.asm 48=MUIChangeResolution.asm +49=MUISuperclass.asm +50=MUIGDIPaintRectangle.asm +51=MUIModifyStyle.asm +52=MUIModifyStyleEx.asm +53=MUIRegister.asm [MakeFiles] 0=ModernUI.rap 1=ModernUI.rc @@ -94,106 +99,116 @@ Menu=0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0 [Accel] [VerInf] [Group] -Group=Misc,Modules,..Painting,..Base,..Region,..DPI,..Image,..Font,..Window,..Memory,..GDIPlus,..GDI,Assembly -1=10 -2=13 -3=4 -4=12 -5=11 -6=5 -7=5 -8=10 -9=8 -10=7 -11=7 -12=7 +Group=Misc,Modules,..Class,..Painting,..Base,..Region,..DPI,..Image,..Font,..Window,..Memory,..GDIPlus,..GDI,Assembly +1=11 +2=14 +3=5 +4=13 +5=12 +6=6 +7=6 +8=11 +9=9 +10=8 +11=8 +12=8 13=2 -14=7 -15=9 -16=9 -17=3 -18=3 -19=3 -20=3 -21=6 -22=9 -23=13 -24=12 -25=12 -26=7 -27=7 -28=12 -29=7 -30=11 -31=7 -32=12 +14=8 +15=10 +16=10 +17=4 +18=4 +19=4 +20=4 +21=7 +22=10 +23=14 +24=13 +25=13 +26=8 +27=8 +28=13 +29=8 +30=12 +31=8 +32=13 33=1 -34=12 +34=13 35=1 36=1 -37=12 -38=12 -39=11 -40=11 -41=11 -42=11 -43=11 -44=12 -45=12 -46=3 -47=12 -48=9 +37=13 +38=13 +39=12 +40=12 +41=12 +42=12 +43=12 +44=13 +45=13 +46=4 +47=13 +48=10 +49=3 +50=13 +51=10 +52=10 +53=3 [AutoLoad] -AutoLoad=2,37,15,48,16,22,14,4,31,34,11,10 +AutoLoad=2,23,35,36 [Size] -5=0,0,0,0,1934 -4=0,0,0,0,4668 -3=0,0,0,0,8469 -2=0,0,0,0,13483 -1=0,0,0,0,4238 -6=0,0,0,0,509 +5=0,0,0,0,105 +4=0,0,0,0,105 +3=0,0,0,0,105 +2=0,0,0,0,171 +1=0,0,0,0,105 +6=0,0,0,0,105 13=0,0,0,0,10132 -11=0,0,0,0,1562 -9=0,0,0,0,926 -12=0,0,0,0,4932 -10=0,0,0,0,845 -7=0,0,0,0,1032 -8=0,0,0,0,1410 -14=0,0,0,0,464 -18=0,0,0,0,2301 -17=0,0,0,0,1684 -19=0,0,0,0,1278 -20=0,0,0,0,1905 -16=0,0,0,0,792 -15=0,0,0,0,2187 -21=0,0,0,0,11303 -22=0,0,0,0,664 -23=0,0,1248,579,7939 -24=0,0,0,0,2814 -25=0,0,0,0,604 -26=0,0,0,0,690 -27=0,0,0,0,686 -28=0,0,0,0,1187 -29=0,0,0,0,579 -30=0,0,0,0,6606 -31=0,0,0,0,485 -32=0,0,0,0,669 -33=0,0,0,0,1145 -34=0,0,0,0,1309 -36=0,0,0,0,853 -35=0,0,0,0,3219 -37=0,0,0,0,1107 -38=0,0,0,0,1773 -39=0,0,0,0,967 -40=0,0,0,0,1809 -43=0,0,0,0,981 -42=0,0,0,0,4782 -41=0,0,0,0,1874 -44=0,0,0,0,1179 -45=0,0,0,0,0 -46=0,0,0,0,508 -47=0,0,0,0,0 -48=0,0,0,0,484 +11=0,0,0,0,105 +9=0,0,0,0,105 +12=0,0,0,0,105 +10=0,0,0,0,105 +7=0,0,0,0,105 +8=0,0,0,0,105 +14=0,0,0,0,105 +18=0,0,0,0,105 +17=0,0,0,0,1492 +19=0,0,0,0,105 +20=0,0,0,0,105 +16=0,0,0,0,105 +15=0,0,0,0,105 +21=0,0,0,0,105 +22=0,0,0,0,105 +23=0,0,1248,579,119 +24=0,0,0,0,105 +25=0,0,0,0,105 +26=0,0,0,0,105 +27=0,0,0,0,105 +28=0,0,0,0,105 +29=0,0,0,0,105 +30=0,0,0,0,105 +31=0,0,0,0,105 +32=0,0,0,0,105 +33=0,0,0,0,524 +34=0,0,0,0,105 +36=0,0,0,0,7327 +35=0,0,0,0,5213 +37=0,0,0,0,105 +38=0,0,0,0,105 +39=0,0,0,0,105 +40=0,0,0,0,105 +43=0,0,0,0,105 +42=0,0,0,0,105 +41=0,0,0,0,105 +44=0,0,0,0,105 +45=0,0,0,0,105 +46=0,0,0,0,105 +47=0,0,0,0,105 +48=0,0,0,0,105 +49=0,0,0,0,105 +50=0,0,0,0,1140 +52=0,0,0,0,105 +51=0,0,0,0,105 +53=0,0,0,0,105 [RADebugBP] 1= 2= @@ -239,6 +254,11 @@ AutoLoad=2,37,15,48,16,22,14,4,31,34,11,10 46= 47= 48= +49= +50= +51= +52= +53= [VersionControl] Settings=1278 Milestones=129 @@ -249,7 +269,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=5 +MilestoneOnDateDate=18 MilestoneOnDateTimeYear=2016 MilestoneOnDateTimeMonth=5 MilestoneOnDateTimeDate=16 @@ -273,16 +293,16 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=334163418 +PTimer=392537480 [Collapse] -2=30 +2=24 1= -3= +3=, 5= 6= 4= 13= -11=1 +11= 9= 12= 10= @@ -295,14 +315,14 @@ PTimer=334163418 20= 16= 15= -21=134348816,2396162 +21=589824,1208027136,36 22= 23= -24=1 +24= 25= 26= 27= -28=1024 +28= 29= 30= 31= @@ -323,8 +343,13 @@ PTimer=334163418 46= 47= 48= +49=64 +50= +52= +51= +53= [GroupExpand] -GroupExpand=1,1,1,1,1,1,1,1,1,1,1,1,1,0 +GroupExpand=1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 [BookMark] 0= 1= @@ -339,13 +364,13 @@ GroupExpand=1,1,1,1,1,1,1,1,1,1,1,1,1,0 [BreakPoint] 0= [Find] -1="EXTER" -2="ImageType" -3="dw" -4="dwPropertyValue" -5="dwProperty" -6="hControl" -7="," -8="pGraphics GPGRAPHICS" -9="PropertyValue MUIPROPERTYVALUE" -10="hWin MUIWND" +1="Copyright (c) 2019" +2="WS_X" +3="^M" +4=""^M" +5="EXTER" +6="ImageType" +7="dw" +8="dwPropertyValue" +9="dwProperty" +10="hControl" diff --git a/ModernUI/ModernUI_DPI.asm b/ModernUI/ModernUI_DPI.asm index 299d91c..e51a53e 100644 --- a/ModernUI/ModernUI_DPI.asm +++ b/ModernUI/ModernUI_DPI.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; @@ -301,7 +301,7 @@ MUI_ALIGN ; Set DPI aware try for per monitor v2 and depending on OS try each possible ; option from SetProcessDpiAwarenessContext down to basic SetProcessDpiAware ;------------------------------------------------------------------------------ -MUIDPISetDPIAware PROC +MUIDPISetDPIAwareA PROC LOCAL hUser32:DWORD LOCAL setDPIAware:DWORD LOCAL setDPIAwareness:DWORD @@ -310,7 +310,7 @@ MUIDPISetDPIAware PROC LOCAL getAwarenessFromDpiAwarenessContext:DWORD LOCAL dwResult:DWORD - Invoke LoadLibrary, Addr szMUIDPIUser32DLL + Invoke LoadLibraryA, Addr szMUIDPIUser32DLL .IF eax == 0 mov eax, FALSE @@ -388,7 +388,7 @@ MUIDPISetDPIAware PROC Invoke FreeLibrary, hUser32 mov eax, dwResult ret -MUIDPISetDPIAware ENDP +MUIDPISetDPIAwareA ENDP MUI_ALIGN ;------------------------------------------------------------------------------ @@ -427,7 +427,10 @@ MUIDPIScaleFontSize PROC PointSize:MUIVALUE MUIDPIScaleFontSize ENDP MUI_ALIGN -MUIDPIScaleFont PROC hFontToScale:HFONT +;------------------------------------------------------------------------------ +; +;------------------------------------------------------------------------------ +MUIDPIScaleFontA PROC hFontToScale:HFONT LOCAL lf:LOGFONT .IF hFontToScale == 0 @@ -435,19 +438,139 @@ MUIDPIScaleFont PROC hFontToScale:HFONT ret .ENDIF - Invoke GetObject, hFontToScale, SIZEOF LOGFONT, Addr lf + Invoke GetObjectA, hFontToScale, SIZEOF LOGFONT, Addr lf mov eax, lf.lfHeight Invoke MUIDPIScaleFontSize, eax mov lf.lfHeight, eax - Invoke CreateFontIndirect, Addr lf + Invoke CreateFontIndirectA, Addr lf ret -MUIDPIScaleFont ENDP +MUIDPIScaleFontA ENDP + + +;============================================================================== +; UNICODE +;============================================================================== + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Set DPI aware try for per monitor v2 and depending on OS try each possible +; option from SetProcessDpiAwarenessContext down to basic SetProcessDpiAware +;------------------------------------------------------------------------------ +MUIDPISetDPIAwareW PROC + LOCAL hUser32:DWORD + LOCAL setDPIAware:DWORD + LOCAL setDPIAwareness:DWORD + LOCAL setDPIAwarenessContext:DWORD + LOCAL getThreadDpiAwarenessContext:DWORD + LOCAL getAwarenessFromDpiAwarenessContext:DWORD + LOCAL dwResult:DWORD + + Invoke LoadLibraryW, Addr szMUIDPIUser32DLL + + .IF eax == 0 + mov eax, FALSE + ret + .ENDIF + mov hUser32, eax + + Invoke GetProcAddress, hUser32, Addr szMUIDPISPDA + mov setDPIAware, eax + + Invoke GetProcAddress, hUser32, Addr szMUIDPISPDAS + mov setDPIAwareness, eax + + Invoke GetProcAddress, hUser32, Addr szMUIDPISPDAC + mov setDPIAwarenessContext, eax + Invoke GetProcAddress, hUser32, Addr szMUIDPIGTDAC + mov getThreadDpiAwarenessContext, eax + + Invoke GetProcAddress, hUser32, Addr szMUIDPIGAFDAC + mov getAwarenessFromDpiAwarenessContext, eax + + .IF getThreadDpiAwarenessContext != 0 + call getThreadDpiAwarenessContext + mov DPI_AWARENESS_CONTEXT, eax + .IF getAwarenessFromDpiAwarenessContext != 0 + push DPI_AWARENESS_CONTEXT + call getAwarenessFromDpiAwarenessContext + .IF eax > 0 ; already set + mov eax, TRUE + ret + .ENDIF + .ENDIF + .ENDIF + + .IF setDPIAwarenessContext != 0 + push DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 + call setDPIAwarenessContext + .IF eax == FALSE + push DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE + call setDPIAwarenessContext + .IF eax == FALSE + .IF setDPIAwareness != 0 + push PROCESS_PER_MONITOR_DPI_AWARE + call setDPIAwareness + .IF eax == FALSE + .IF setDPIAware != 0 + call setDPIAware + .ENDIF + .ENDIF + .ENDIF + .ENDIF + .ENDIF + mov dwResult, eax + + .ELSEIF setDPIAwareness != 0 + push PROCESS_PER_MONITOR_DPI_AWARE + call setDPIAwareness + .IF eax == FALSE + .IF setDPIAware != 0 + call setDPIAware + .ENDIF + .ENDIF + mov dwResult, eax + + .ELSEIF setDPIAware != 0 + call setDPIAware + mov dwResult, eax + + .ELSE + mov dwResult, FALSE + + .ENDIF + + Invoke FreeLibrary, hUser32 + mov eax, dwResult + ret +MUIDPISetDPIAwareW ENDP + +MUI_ALIGN +;------------------------------------------------------------------------------ +; +;------------------------------------------------------------------------------ +MUIDPIScaleFontW PROC hFontToScale:HFONT + LOCAL lf:LOGFONT + + .IF hFontToScale == 0 + mov eax, 0 + ret + .ENDIF + + Invoke GetObjectW, hFontToScale, SIZEOF LOGFONT, Addr lf + mov eax, lf.lfHeight + Invoke MUIDPIScaleFontSize, eax + mov lf.lfHeight, eax + Invoke CreateFontIndirectW, Addr lf + ret +MUIDPIScaleFontW ENDP MODERNUI_LIBEND + + ;// Definition: relative pixel = 1 pixel at 96 DPI and scaled based on actual DPI. ;class CDPI ;{ diff --git a/ModernUI/_ModernUI_Base.asm b/ModernUI/_ModernUI_Base.asm index 89a3acb..b7c1535 100644 --- a/ModernUI/_ModernUI_Base.asm +++ b/ModernUI/_ModernUI_Base.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; @@ -23,12 +23,19 @@ include ModernUI.inc ; Prototypes for internal use -_MUIGetProperty PROTO hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY -_MUISetProperty PROTO hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE +_MUIGetPropertyA PROTO hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY +_MUISetPropertyA PROTO hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE +_MUIGetPropertyW PROTO hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY +_MUISetPropertyW PROTO hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + .CODE +;============================================================================== +; ANSI +;============================================================================== + MUI_ALIGN ;------------------------------------------------------------------------------ ; Gets the pointer to memory allocated to control at startup and stored in @@ -37,7 +44,7 @@ MUI_ALIGN ; ; Properties are defined as constants, which are used as offsets in memory to ; the; data alloc'd, for example: @MouseOver EQU 0, @SelectedState EQU 4 -; we might specify 4 in cbWndExtra and then GlobalAlloc 8 bytes of data to +; we might specify 8 in cbWndExtra and then GlobalAlloc 8 bytes of data to ; control at startup and store this pointer with: ; ; Invoke SetWindowLong, hWin, 0, pMem @@ -51,8 +58,8 @@ MUI_ALIGN ; ; ;------------------------------------------------------------------------------ -_MUIGetProperty PROC USES EBX hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY - Invoke GetWindowLong, hWin, cbWndExtraOffset +_MUIGetPropertyA PROC USES EBX hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY + Invoke GetWindowLongA, hWin, cbWndExtraOffset .IF eax == 0 ret .ENDIF @@ -61,21 +68,21 @@ _MUIGetProperty PROC USES EBX hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Prope mov eax, Property and eax, MUI_PROPERTY_ADDRESS .IF eax == MUI_PROPERTY_ADDRESS - mov eax, ebx ; address of property in eax + mov eax, ebx ; return address of the property in eax .ELSE - mov eax, [ebx] ; contents of property at address in ebx + mov eax, [ebx] ; return in eax the contents of the property at address in rbx .ENDIF ret -_MUIGetProperty ENDP +_MUIGetPropertyA ENDP MUI_ALIGN ;------------------------------------------------------------------------------ ; Sets property value and returns previous value in eax. ;------------------------------------------------------------------------------ -_MUISetProperty PROC USES EBX hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE +_MUISetPropertyA PROC USES EBX hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE LOCAL dwPrevValue:DWORD - Invoke GetWindowLong, hWin, cbWndExtraOffset + Invoke GetWindowLongA, hWin, cbWndExtraOffset .IF eax == 0 ret .ENDIF @@ -87,47 +94,89 @@ _MUISetProperty PROC USES EBX hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Prope mov [ebx], eax mov eax, dwPrevValue ret -_MUISetProperty ENDP +_MUISetPropertyA ENDP +MUI_ALIGN +;------------------------------------------------------------------------------ +; Gets the pointer to memory allocated to control at startup and stored in +; cbWinExtra adds the offset to property to this pointer and fetches value at +; this location and returns it in eax. +; +; Properties are defined as constants, which are used as offsets in memory to +; the; data alloc'd, for example: @MouseOver EQU 0, @SelectedState EQU 4 +; we might specify 8 in cbWndExtra and then GlobalAlloc 8 bytes of data to +; control at startup and store this pointer with: +; +; Invoke SetWindowLong, hWin, 0, pMem +; +; pMem is our pointer to our 8 bytes of storage, of which first four bytes +; (dword) is used for our @MouseOver property and the next dword for +; @SelectedState +; +; Added extra option to check if Property is OR'd with MUI_PROPERTY_ADDRESS +; then return address of property +; +; Added public versions of these to allow for adjustment of the base address +; to fetch the internal or external property structures from. This is for +; example where we have to deal with a superclassed control based on an existing +; control that has its own cbWndExtra bytes, which we must preserve. +; Use GetClassInfoEx to determine the offset to account for theses bytes to +; add to the cbWndExtraOffset parameter to correctly address alloc mem. +; MUIAllocMemProperties also must be adjusted by this offset to preserve the +; extra bytes for the base class being superclassed +;------------------------------------------------------------------------------ +MUIGetPropertyA PROC hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY + Invoke _MUIGetPropertyA, hWin, cbWndExtraOffset, Property ; get properties + ret +MUIGetPropertyA ENDP + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Sets property value and returns previous value in eax. +;------------------------------------------------------------------------------ +MUISetPropertyA PROC hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + Invoke _MUISetPropertyA, hWin, cbWndExtraOffset, Property, PropertyValue ; set properties + ret +MUISetPropertyA ENDP MUI_ALIGN ;------------------------------------------------------------------------------ ; Gets external property value and returns it in eax ;------------------------------------------------------------------------------ -MUIGetExtProperty PROC hWin:MUIWND, Property:MUIPROPERTY - Invoke _MUIGetProperty, hWin, MUI_EXTERNAL_PROPERTIES, Property ; get external properties +MUIGetExtPropertyA PROC hWin:MUIWND, Property:MUIPROPERTY + Invoke _MUIGetPropertyA, hWin, MUI_EXTERNAL_PROPERTIES, Property ; get external properties ret -MUIGetExtProperty ENDP +MUIGetExtPropertyA ENDP MUI_ALIGN ;------------------------------------------------------------------------------ ; Sets external property value and returns previous value in eax. ;------------------------------------------------------------------------------ -MUISetExtProperty PROC hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE - Invoke _MUISetProperty, hWin, MUI_EXTERNAL_PROPERTIES, Property, PropertyValue ; set external properties +MUISetExtPropertyA PROC hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + Invoke _MUISetPropertyA, hWin, MUI_EXTERNAL_PROPERTIES, Property, PropertyValue ; set external properties ret -MUISetExtProperty ENDP +MUISetExtPropertyA ENDP MUI_ALIGN ;------------------------------------------------------------------------------ ; Gets internal property value and returns it in eax ;------------------------------------------------------------------------------ -MUIGetIntProperty PROC hWin:MUIWND, Property:MUIPROPERTY - Invoke _MUIGetProperty, hWin, MUI_INTERNAL_PROPERTIES, Property ; get internal properties +MUIGetIntPropertyA PROC hWin:MUIWND, Property:MUIPROPERTY + Invoke _MUIGetPropertyA, hWin, MUI_INTERNAL_PROPERTIES, Property ; get internal properties ret -MUIGetIntProperty ENDP +MUIGetIntPropertyA ENDP MUI_ALIGN ;------------------------------------------------------------------------------ ; Sets internal property value and returns previous value in eax. ;------------------------------------------------------------------------------ -MUISetIntProperty PROC hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE - Invoke _MUISetProperty, hWin, MUI_INTERNAL_PROPERTIES, Property, PropertyValue ; set internal properties +MUISetIntPropertyA PROC hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + Invoke _MUISetPropertyA, hWin, MUI_INTERNAL_PROPERTIES, Property, PropertyValue ; set internal properties ret -MUISetIntProperty ENDP +MUISetIntPropertyA ENDP @@ -137,25 +186,25 @@ MUI_ALIGN ; For properties (parent) in main ModernUI controls that store pointers to ; another (child) defined properties structure ;------------------------------------------------------------------------------ -MUIGetExtPropertyEx PROC hWin:MUIWND, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTY - Invoke _MUIGetProperty, hWin, MUI_EXTERNAL_PROPERTIES, ParentProperty ; get parent external properties +MUIGetExtPropertyExA PROC hWin:MUIWND, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTY + Invoke _MUIGetPropertyA, hWin, MUI_EXTERNAL_PROPERTIES, ParentProperty ; get parent external properties .IF eax != 0 add eax, ChildProperty mov eax, [eax] .ENDIF ret -MUIGetExtPropertyEx ENDP +MUIGetExtPropertyExA ENDP MUI_ALIGN ;------------------------------------------------------------------------------ -; Gets child external property value and returns it in eax +; Sets child external property value ; For properties (parent) in main ModernUI controls that store pointers to ; another (child) defined properties structure ;------------------------------------------------------------------------------ -MUISetExtPropertyEx PROC USES EBX hWin:MUIWND, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE +MUISetExtPropertyExA PROC USES EBX hWin:MUIWND, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE LOCAL dwPrevValue:DWORD - Invoke _MUIGetProperty, hWin, MUI_EXTERNAL_PROPERTIES, ParentProperty ; get parent external properties + Invoke _MUIGetPropertyA, hWin, MUI_EXTERNAL_PROPERTIES, ParentProperty ; get parent external properties .IF eax != 0 mov ebx, eax add ebx, ChildProperty @@ -166,7 +215,7 @@ MUISetExtPropertyEx PROC USES EBX hWin:MUIWND, ParentProperty:MUIPROPERTY, Child mov eax, dwPrevValue .ENDIF ret -MUISetExtPropertyEx ENDP +MUISetExtPropertyExA ENDP MUI_ALIGN @@ -175,14 +224,262 @@ MUI_ALIGN ; For properties (parent) in main ModernUI controls that store pointers to ; another (child) defined properties structure ;------------------------------------------------------------------------------ -MUIGetIntPropertyEx PROC hWin:MUIWND, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTY - Invoke _MUIGetProperty, hWin, MUI_INTERNAL_PROPERTIES, ParentProperty ; get parent internal properties +MUIGetIntPropertyExA PROC hWin:MUIWND, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTY + Invoke _MUIGetPropertyA, hWin, MUI_INTERNAL_PROPERTIES, ParentProperty ; get parent internal properties + .IF eax != 0 + add eax, ChildProperty + mov eax, [eax] + .ENDIF + ret +MUIGetIntPropertyExA ENDP + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Sets child internal property value +; For properties (parent) in main ModernUI controls that store pointers to +; another (child) defined properties structure +;------------------------------------------------------------------------------ +MUISetIntPropertyExA PROC USES EBX hWin:MUIWND, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + LOCAL dwPrevValue:DWORD + Invoke _MUIGetPropertyA, hWin, MUI_INTERNAL_PROPERTIES, ParentProperty ; get parent internal properties + .IF eax != 0 + mov ebx, eax + add ebx, ChildProperty + mov eax, [eax] + mov dwPrevValue, eax + mov eax, PropertyValue + mov [ebx], eax + mov eax, dwPrevValue + .ENDIF + ret +MUISetIntPropertyExA ENDP + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Gets Extra external property value and returns it in eax +;------------------------------------------------------------------------------ +MUIGetExtPropertyExtraA PROC hWin:MUIWND, Property:MUIPROPERTY + Invoke _MUIGetPropertyA, hWin, MUI_EXTERNAL_PROPERTIES_EXTRA, Property ; get extra external properties + ret +MUIGetExtPropertyExtraA ENDP + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Sets Extra external property value and returns previous value in eax. +;------------------------------------------------------------------------------ +MUISetExtPropertyExtraA PROC hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + Invoke _MUISetPropertyA, hWin, MUI_EXTERNAL_PROPERTIES_EXTRA, Property, PropertyValue ; set extra external properties + ret +MUISetExtPropertyExtraA ENDP + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Gets Extra internal property value and returns it in eax +;------------------------------------------------------------------------------ +MUIGetIntPropertyExtraA PROC hWin:MUIWND, Property:MUIPROPERTY + Invoke _MUIGetPropertyA, hWin, MUI_INTERNAL_PROPERTIES_EXTRA, Property ; get extra internal properties + ret +MUIGetIntPropertyExtraA ENDP + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Sets Extra internal property value and returns previous value in eax. +;------------------------------------------------------------------------------ +MUISetIntPropertyExtraA PROC hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + Invoke _MUISetPropertyA, hWin, MUI_INTERNAL_PROPERTIES_EXTRA, Property, PropertyValue ; set extra internal properties + ret +MUISetIntPropertyExtraA ENDP + + +;============================================================================== +; UNICODE +;============================================================================== + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Gets the pointer to memory allocated to control at startup and stored in +; cbWinExtra adds the offset to property to this pointer and fetches value at +; this location and returns it in eax. +; +; Properties are defined as constants, which are used as offsets in memory to +; the; data alloc'd, for example: @MouseOver EQU 0, @SelectedState EQU 4 +; we might specify 8 in cbWndExtra and then GlobalAlloc 8 bytes of data to +; control at startup and store this pointer with: +; +; Invoke SetWindowLong, hWin, 0, pMem +; +; pMem is our pointer to our 8 bytes of storage, of which first four bytes +; (dword) is used for our @MouseOver property and the next dword for +; @SelectedState +; +; Added extra option to check if Property is OR'd with MUI_PROPERTY_ADDRESS +; then return address of property +; +; +;------------------------------------------------------------------------------ +_MUIGetPropertyW PROC USES EBX hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY + Invoke GetWindowLongW, hWin, cbWndExtraOffset + .IF eax == 0 + ret + .ENDIF + mov ebx, eax + add ebx, Property + mov eax, Property + and eax, MUI_PROPERTY_ADDRESS + .IF eax == MUI_PROPERTY_ADDRESS + mov eax, ebx ; return address of the property in eax + .ELSE + mov eax, [ebx] ; return in eax the contents of the property at address in ebx + .ENDIF + ret +_MUIGetPropertyW ENDP + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Sets property value and returns previous value in eax. +;------------------------------------------------------------------------------ +_MUISetPropertyW PROC USES EBX hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + LOCAL dwPrevValue:DWORD + Invoke GetWindowLongW, hWin, cbWndExtraOffset + .IF eax == 0 + ret + .ENDIF + mov ebx, eax + add ebx, Property + mov eax, [ebx] + mov dwPrevValue, eax + mov eax, PropertyValue + mov [ebx], eax + mov eax, dwPrevValue + ret +_MUISetPropertyW ENDP + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Gets the pointer to memory allocated to control at startup and stored in +; cbWinExtra adds the offset to property to this pointer and fetches value at +; this location and returns it in eax. +; +; Properties are defined as constants, which are used as offsets in memory to +; the; data alloc'd, for example: @MouseOver EQU 0, @SelectedState EQU 4 +; we might specify 8 in cbWndExtra and then GlobalAlloc 8 bytes of data to +; control at startup and store this pointer with: +; +; Invoke SetWindowLong, hWin, 0, pMem +; +; pMem is our pointer to our 8 bytes of storage, of which first four bytes +; (dword) is used for our @MouseOver property and the next dword for +; @SelectedState +; +; Added extra option to check if Property is OR'd with MUI_PROPERTY_ADDRESS +; then return address of property +; +; Added public versions of these to allow for adjustment of the base address +; to fetch the internal or external property structures from. This is for +; example where we have to deal with a superclassed control based on an existing +; control that has its own cbWndExtra bytes, which we must preserve. +; Use GetClassInfoEx to determine the offset to account for theses bytes to +; add to the cbWndExtraOffset parameter to correctly address alloc mem. +; MUIAllocMemProperties also must be adjusted by this offset to preserve the +; extra bytes for the base class being superclassed +;------------------------------------------------------------------------------ +MUIGetPropertyW PROC hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY + Invoke _MUIGetPropertyW, hWin, cbWndExtraOffset, Property ; get properties + ret +MUIGetPropertyW ENDP + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Sets property value and returns previous value in eax. +;------------------------------------------------------------------------------ +MUISetPropertyW PROC hWin:MUIWND, cbWndExtraOffset:MUIPROPERTIES, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + Invoke _MUISetPropertyW, hWin, cbWndExtraOffset, Property, PropertyValue ; set properties + ret +MUISetPropertyW ENDP + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Gets external property value and returns it in eax +;------------------------------------------------------------------------------ +MUIGetExtPropertyW PROC hWin:MUIWND, Property:MUIPROPERTY + Invoke _MUIGetPropertyW, hWin, MUI_EXTERNAL_PROPERTIES, Property ; get external properties + ret +MUIGetExtPropertyW ENDP + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Sets external property value and returns previous value in eax. +;------------------------------------------------------------------------------ +MUISetExtPropertyW PROC hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + Invoke _MUISetPropertyW, hWin, MUI_EXTERNAL_PROPERTIES, Property, PropertyValue ; set external properties + ret +MUISetExtPropertyW ENDP + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Gets internal property value and returns it in eax +;------------------------------------------------------------------------------ +MUIGetIntPropertyW PROC hWin:MUIWND, Property:MUIPROPERTY + Invoke _MUIGetPropertyW, hWin, MUI_INTERNAL_PROPERTIES, Property ; get internal properties + ret +MUIGetIntPropertyW ENDP + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Sets internal property value and returns previous value in eax. +;------------------------------------------------------------------------------ +MUISetIntPropertyW PROC hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + Invoke _MUISetPropertyW, hWin, MUI_INTERNAL_PROPERTIES, Property, PropertyValue ; set internal properties + ret +MUISetIntPropertyW ENDP + + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Gets child external property value and returns it in eax +; For properties (parent) in main ModernUI controls that store pointers to +; another (child) defined properties structure +;------------------------------------------------------------------------------ +MUIGetExtPropertyExW PROC hWin:MUIWND, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTY + Invoke _MUIGetPropertyW, hWin, MUI_EXTERNAL_PROPERTIES, ParentProperty ; get parent external properties .IF eax != 0 add eax, ChildProperty mov eax, [eax] .ENDIF ret -MUIGetIntPropertyEx ENDP +MUIGetExtPropertyExW ENDP + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Sets child external property value +; For properties (parent) in main ModernUI controls that store pointers to +; another (child) defined properties structure +;------------------------------------------------------------------------------ +MUISetExtPropertyExW PROC USES EBX hWin:MUIWND, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + LOCAL dwPrevValue:DWORD + Invoke _MUIGetPropertyW, hWin, MUI_EXTERNAL_PROPERTIES, ParentProperty ; get parent external properties + .IF eax != 0 + mov ebx, eax + add ebx, ChildProperty + mov eax, [eax] + mov dwPrevValue, eax + mov eax, PropertyValue + mov [ebx], eax + mov eax, dwPrevValue + .ENDIF + ret +MUISetExtPropertyExW ENDP MUI_ALIGN @@ -191,9 +488,25 @@ MUI_ALIGN ; For properties (parent) in main ModernUI controls that store pointers to ; another (child) defined properties structure ;------------------------------------------------------------------------------ -MUISetIntPropertyEx PROC USES EBX hWin:MUIWND, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE +MUIGetIntPropertyExW PROC hWin:MUIWND, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTY + Invoke _MUIGetPropertyW, hWin, MUI_INTERNAL_PROPERTIES, ParentProperty ; get parent internal properties + .IF eax != 0 + add eax, ChildProperty + mov eax, [eax] + .ENDIF + ret +MUIGetIntPropertyExW ENDP + + +MUI_ALIGN +;------------------------------------------------------------------------------ +; Sets child internal property value +; For properties (parent) in main ModernUI controls that store pointers to +; another (child) defined properties structure +;------------------------------------------------------------------------------ +MUISetIntPropertyExW PROC USES EBX hWin:MUIWND, ParentProperty:MUIPROPERTY, ChildProperty:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE LOCAL dwPrevValue:DWORD - Invoke _MUIGetProperty, hWin, MUI_INTERNAL_PROPERTIES, ParentProperty ; get parent internal properties + Invoke _MUIGetPropertyW, hWin, MUI_INTERNAL_PROPERTIES, ParentProperty ; get parent internal properties .IF eax != 0 mov ebx, eax add ebx, ChildProperty @@ -204,47 +517,49 @@ MUISetIntPropertyEx PROC USES EBX hWin:MUIWND, ParentProperty:MUIPROPERTY, Child mov eax, dwPrevValue .ENDIF ret -MUISetIntPropertyEx ENDP +MUISetIntPropertyExW ENDP MUI_ALIGN ;------------------------------------------------------------------------------ ; Gets Extra external property value and returns it in eax ;------------------------------------------------------------------------------ -MUIGetExtPropertyExtra PROC hWin:MUIWND, Property:MUIPROPERTY - Invoke _MUIGetProperty, hWin, MUI_EXTERNAL_PROPERTIES_EXTRA, Property ; get external properties +MUIGetExtPropertyExtraW PROC hWin:MUIWND, Property:MUIPROPERTY + Invoke _MUIGetPropertyW, hWin, MUI_EXTERNAL_PROPERTIES_EXTRA, Property ; get extra external properties ret -MUIGetExtPropertyExtra ENDP +MUIGetExtPropertyExtraW ENDP MUI_ALIGN ;------------------------------------------------------------------------------ ; Sets Extra external property value and returns previous value in eax. ;------------------------------------------------------------------------------ -MUISetExtPropertyExtra PROC hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE - Invoke _MUISetProperty, hWin, MUI_EXTERNAL_PROPERTIES_EXTRA, Property, PropertyValue ; set external properties +MUISetExtPropertyExtraW PROC hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + Invoke _MUISetPropertyW, hWin, MUI_EXTERNAL_PROPERTIES_EXTRA, Property, PropertyValue ; set extra external properties ret -MUISetExtPropertyExtra ENDP +MUISetExtPropertyExtraW ENDP MUI_ALIGN ;------------------------------------------------------------------------------ ; Gets Extra internal property value and returns it in eax ;------------------------------------------------------------------------------ -MUIGetIntPropertyExtra PROC hWin:MUIWND, Property:MUIPROPERTY - Invoke _MUIGetProperty, hWin, MUI_INTERNAL_PROPERTIES_EXTRA, Property ; get internal properties +MUIGetIntPropertyExtraW PROC hWin:MUIWND, Property:MUIPROPERTY + Invoke _MUIGetPropertyW, hWin, MUI_INTERNAL_PROPERTIES_EXTRA, Property ; get extra internal properties ret -MUIGetIntPropertyExtra ENDP +MUIGetIntPropertyExtraW ENDP MUI_ALIGN ;------------------------------------------------------------------------------ ; Sets Extra internal property value and returns previous value in eax. ;------------------------------------------------------------------------------ -MUISetIntPropertyExtra PROC hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE - Invoke _MUISetProperty, hWin, MUI_INTERNAL_PROPERTIES_EXTRA, Property, PropertyValue ; set internal properties +MUISetIntPropertyExtraW PROC hWin:MUIWND, Property:MUIPROPERTY, PropertyValue:MUIPROPERTYVALUE + Invoke _MUISetPropertyW, hWin, MUI_INTERNAL_PROPERTIES_EXTRA, Property, PropertyValue ; set extra internal properties ret -MUISetIntPropertyExtra ENDP +MUISetIntPropertyExtraW ENDP + + MODERNUI_LIBEND diff --git a/ModernUI/_ModernUI_GDIDoubleBuffer.asm b/ModernUI/_ModernUI_GDIDoubleBuffer.asm index eaa5004..c760b07 100644 --- a/ModernUI/_ModernUI_GDIDoubleBuffer.asm +++ b/ModernUI/_ModernUI_GDIDoubleBuffer.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/_ModernUI_GDIPlus.asm b/ModernUI/_ModernUI_GDIPlus.asm index f7a4c21..a9be40f 100644 --- a/ModernUI/_ModernUI_GDIPlus.asm +++ b/ModernUI/_ModernUI_GDIPlus.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/_ModernUI_GDIPlusDoubleBuffer.asm b/ModernUI/_ModernUI_GDIPlusDoubleBuffer.asm index 285a0dd..d0cd44e 100644 --- a/ModernUI/_ModernUI_GDIPlusDoubleBuffer.asm +++ b/ModernUI/_ModernUI_GDIPlusDoubleBuffer.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/_ModernUI_Memory.asm b/ModernUI/_ModernUI_Memory.asm index 363b511..8e1cce2 100644 --- a/ModernUI/_ModernUI_Memory.asm +++ b/ModernUI/_ModernUI_Memory.asm @@ -2,7 +2,7 @@ ; ; ModernUI Library ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUI/masmApiCall.api.txt b/ModernUI/masmApiCall.api.txt index 1a3b88b..c0fde04 100644 --- a/ModernUI/masmApiCall.api.txt +++ b/ModernUI/masmApiCall.api.txt @@ -6,6 +6,8 @@ ; Paste this text at the end of \Radasm\Masm\masmApiCall.api to add to Radasm ; ;------------------------------------------------------------------------------ +MUIGetProperty,hWin,cbWndExtraOffset,Property +MUISetProperty,hWin,cbWndExtraOffset,Property,PropertyValue MUIGetExtProperty,hWin,Property MUISetExtProperty,hWin,Property,PropertyValue MUIGetIntProperty,hWin,Property @@ -18,6 +20,34 @@ MUIGetExtPropertyExtra,hWin,Property MUISetExtPropertyExtra,hWin,Property,PropertyValue MUIGetIntPropertyExtra,hWin,Property MUISetIntPropertyExtra,hWin,Property,PropertyValue +MUIGetPropertyA,hWin,cbWndExtraOffset,Property +MUISetPropertyA,hWin,cbWndExtraOffset,Property,PropertyValue +MUIGetExtPropertyA,hWin,Property +MUISetExtPropertyA,hWin,Property,PropertyValue +MUIGetIntPropertyA,hWin,Property +MUISetIntPropertyA,hWin,Property,PropertyValue +MUIGetExtPropertyExA,hWin,ParentProperty,ChildProperty +MUISetExtPropertyExA,hWin,ParentProperty,ChildProperty,PropertyValue +MUIGetIntPropertyExA,hWin,ParentProperty,ChildProperty +MUISetIntPropertyExA,hWin,ParentProperty,ChildProperty,PropertyValue +MUIGetExtPropertyExtraA,hWin,Property +MUISetExtPropertyExtraA,hWin,Property,PropertyValue +MUIGetIntPropertyExtraA,hWin,Property +MUISetIntPropertyExtraA,hWin,Property,PropertyValue +MUIGetPropertyW,hWin,cbWndExtraOffset,Property +MUISetPropertyW,hWin,cbWndExtraOffset,Property,PropertyValue +MUIGetExtPropertyW,hWin,Property +MUISetExtPropertyW,hWin,Property,PropertyValue +MUIGetIntPropertyW,hWin,Property +MUISetIntPropertyW,hWin,Property,PropertyValue +MUIGetExtPropertyExW,hWin,ParentProperty,ChildProperty +MUISetExtPropertyExW,hWin,ParentProperty,ChildProperty,PropertyValue +MUIGetIntPropertyExW,hWin,ParentProperty,ChildProperty +MUISetIntPropertyExW,hWin,ParentProperty,ChildProperty,PropertyValue +MUIGetExtPropertyExtraW,hWin,Property +MUISetExtPropertyExtraW,hWin,Property,PropertyValue +MUIGetIntPropertyExtraW,hWin,Property +MUISetIntPropertyExtraW,hWin,Property,PropertyValue MUIAllocMemProperties,hWin,cbWndExtraOffset,SizeToAllocate MUIFreeMemProperties,hWin,cbWndExtraOffset MUIAllocStructureMemory,PtrStructMem,TotalItems,ItemSize @@ -29,6 +59,7 @@ MUIGDIStretchBitmap,hBitmap,lpBoundsRect,lpBitmapWidth,lpBitmapHeight,lpBitmapX, MUIGDIRotateCenterBitmap,hWin,hBitmap,Angle,BackColor MUIGDIPaintFill,hdc,lpFillRect,FillColor MUIGDIPaintFrame,hdc,lpFrameRect,FrameColor,FrameStyle +MUIGDIPaintRectangle,hdc,lpRect,FrameColor,FillColor MUIGDIPaintBrush,hdc,lpBrushRect,hBrushBitmap,dwBrushOrgX,dwBrushOrgY MUIGDIPaintGradient,hdc,lpGradientRect,GradientColorFrom,GradientColorTo,HorzVertGradient MUIGDICreateBitmapMask,hBitmap,TransparentColor @@ -62,9 +93,17 @@ MUIPaintBackgroundImage,hDialogWindow,BackColor,BorderColor,hImage,ImageHandleTy MUIPaintBorder,hWin,BorderColor MUIGetParentBackgroundColor,hWin MUIGetParentBackgroundBitmap,hWin -MUIApplyToDialog,hDialogWindow,bDropShadow,bClipping MUICenterWindow,hWndChild,hWndParent MUIGetParentRelativeWindowRect,hWin,lpRectControl +MUIApplyToDialog,hDialogWindow,bDropShadow,bClipping +MUIModifyStyle,hWin,dwRemove,dwAdd,bFrameChanged +MUIModifyStyleEx,hWin,dwRemove,dwAdd,bFrameChanged +MUIApplyToDialogA,hDialogWindow,bDropShadow,bClipping +MUIModifyStyleA,hWin,dwRemove,dwAdd,bFrameChanged +MUIModifyStyleExA,hWin,dwRemove,dwAdd,bFrameChanged +MUIApplyToDialogW,hDialogWindow,bDropShadow,bClipping +MUIModifyStyleW,hWin,dwRemove,dwAdd,bFrameChanged +MUIModifyStyleExW,hWin,dwRemove,dwAdd,bFrameChanged MUILoadRegionFromResource,hInstance,idRgnRes,lpRegionData,lpSizeRegionData MUISetRegionFromResource,hWin,idRgnRes,lpCopyRgnHandle,bRedraw MUIPointSizeToLogicalUnit,hWin,PointSize @@ -79,6 +118,16 @@ MUIDPIScaleY,ValueY MUIDPIScaleRect,lpRect MUIDPIScaleControl,lpLeft,lpTop,lpWidth,lpHeight MUIDPIScaleFontSize,PointSize -MUIDPIScaleFont,hFont MUIDPIScaledScreen,lpScreenWidth,lpScreenHeight -MUIDPISetDPIAware \ No newline at end of file +MUIDPIScaleFont,hFont +MUIDPISetDPIAware +MUIDPIScaleFontA,hFont +MUIDPISetDPIAwareA +MUIDPIScaleFontW,hFont +MUIDPISetDPIAwareW +MUIRegister,lpszClassName,lpClassWndProc,lpCursorName,cbWndExtra +MUISuperclass,lpszExistingClassName,lpdwExistingClassWndProc,lpszSuperclassName,lpSuperclassWndProc,lpSuperclassCursorName,cbSuperclassWndExtra,lpcbWndExtraOffset +MUIRegisterA,lpszClassName,lpClassWndProc,lpCursorName,cbWndExtra +MUISuperclassA,lpszExistingClassName,lpdwExistingClassWndProc,lpszSuperclassName,lpSuperclassWndProc,lpSuperclassCursorName,cbSuperclassWndExtra,lpcbWndExtraOffset +MUIRegisterW,lpszClassName,lpClassWndProc,lpCursorName,cbWndExtra +MUISuperclassW,lpszExistingClassName,lpdwExistingClassWndProc,lpszSuperclassName,lpSuperclassWndProc,lpSuperclassCursorName,cbSuperclassWndExtra,lpcbWndExtraOffset \ No newline at end of file diff --git a/ModernUI/masmApiConst.api.txt b/ModernUI/masmApiConst.api.txt index 28b1e13..c446dc1 100644 --- a/ModernUI/masmApiConst.api.txt +++ b/ModernUI/masmApiConst.api.txt @@ -6,20 +6,44 @@ ; Paste this text at the end of \Radasm\Masm\masmApiConst.api to add to Radasm ; ;------------------------------------------------------------------------------ -2MUIAllocMemProperties,MUI_INTERNAL_PROPERTIES,MUI_EXTERNAL_PROPERTIES -2MUIFreeMemProperties,MUI_INTERNAL_PROPERTIES,MUI_EXTERNAL_PROPERTIES +2MUIGetProperty,MUI_INTERNAL_PROPERTIES,MUI_EXTERNAL_PROPERTIES,MUI_INTERNAL_PROPERTIES_EXTRA,MUI_EXTERNAL_PROPERTIES_EXTRA,MUI_PROPERTY_ADDRESS +2MUISetProperty,MUI_INTERNAL_PROPERTIES,MUI_EXTERNAL_PROPERTIES,MUI_INTERNAL_PROPERTIES_EXTRA,MUI_EXTERNAL_PROPERTIES_EXTRA,MUI_PROPERTY_ADDRESS +2MUIGetPropertyA,MUI_INTERNAL_PROPERTIES,MUI_EXTERNAL_PROPERTIES,MUI_INTERNAL_PROPERTIES_EXTRA,MUI_EXTERNAL_PROPERTIES_EXTRA,MUI_PROPERTY_ADDRESS +2MUISetPropertyA,MUI_INTERNAL_PROPERTIES,MUI_EXTERNAL_PROPERTIES,MUI_INTERNAL_PROPERTIES_EXTRA,MUI_EXTERNAL_PROPERTIES_EXTRA,MUI_PROPERTY_ADDRESS +2MUIGetPropertyW,MUI_INTERNAL_PROPERTIES,MUI_EXTERNAL_PROPERTIES,MUI_INTERNAL_PROPERTIES_EXTRA,MUI_EXTERNAL_PROPERTIES_EXTRA,MUI_PROPERTY_ADDRESS +2MUISetPropertyW,MUI_INTERNAL_PROPERTIES,MUI_EXTERNAL_PROPERTIES,MUI_INTERNAL_PROPERTIES_EXTRA,MUI_EXTERNAL_PROPERTIES_EXTRA,MUI_PROPERTY_ADDRESS +2MUIAllocMemProperties,MUI_INTERNAL_PROPERTIES,MUI_EXTERNAL_PROPERTIES,MUI_INTERNAL_PROPERTIES_EXTRA,MUI_EXTERNAL_PROPERTIES_EXTRA +2MUIFreeMemProperties,MUI_INTERNAL_PROPERTIES,MUI_EXTERNAL_PROPERTIES,MUI_INTERNAL_PROPERTIES_EXTRA,MUI_EXTERNAL_PROPERTIES_EXTRA 2MUIApplyToDialog,TRUE,FALSE 3MUIApplyToDialog,TRUE,FALSE +2MUIApplyToDialogA,TRUE,FALSE +3MUIApplyToDialogA,TRUE,FALSE +2MUIApplyToDialogW,TRUE,FALSE +3MUIApplyToDialogW,TRUE,FALSE +2MUIModifyStyle,WS_BORDER,WS_CAPTION,WS_CHILD,WS_CHILDWINDOW,WS_CLIPCHILDREN,WS_CLIPSIBLINGS,WS_DISABLED,WS_DLGFRAME,WS_GROUP,WS_HSCROLL,WS_ICONIC,WS_MAXIMIZE,WS_MAXIMIZEBOX,WS_MINIMIZE,WS_MINIMIZEBOX,WS_OVERLAPPED,WS_OVERLAPPEDWINDOW,WS_POPUP,WS_POPUPWINDOW,WS_SIZEBOX,WS_SYSMENU,WS_TABSTOP,WS_THICKFRAME,WS_TILED,WS_TILEDWINDOW,WS_VISIBLE,WS_VSCROLL +3MUIModifyStyle,WS_BORDER,WS_CAPTION,WS_CHILD,WS_CHILDWINDOW,WS_CLIPCHILDREN,WS_CLIPSIBLINGS,WS_DISABLED,WS_DLGFRAME,WS_GROUP,WS_HSCROLL,WS_ICONIC,WS_MAXIMIZE,WS_MAXIMIZEBOX,WS_MINIMIZE,WS_MINIMIZEBOX,WS_OVERLAPPED,WS_OVERLAPPEDWINDOW,WS_POPUP,WS_POPUPWINDOW,WS_SIZEBOX,WS_SYSMENU,WS_TABSTOP,WS_THICKFRAME,WS_TILED,WS_TILEDWINDOW,WS_VISIBLE,WS_VSCROLL +2MUIModifyStyleEx,WS_EX_ACCEPTFILES,WS_EX_APPWINDOW,WS_EX_CLIENTEDGE,WS_EX_COMPOSITED,WS_EX_CONTEXTHELP,WS_EX_CONTROLPARENT,WS_EX_DLGMODALFRAME,WS_EX_LAYERED,WS_EX_LAYOUTRTL,WS_EX_LEFT,WS_EX_EFTSCROLLBAR,WS_EX_LTRREADING,WS_EX_MDICHILD,WS_EX_NOACTIVATE,WS_EX_NOINHERITLAYOUT,WS_EX_NOPARENTNOTIFY,WS_EX_NOREDIRECTIONBITMAP,WS_EX_OVERLAPPEDWINDOW,WS_EX_PALETTEWINDOW,WS_EX_RIGHT,WS_EX_RIGHTSCROLLBAR,WS_EX_RTLREADING,WS_EX_STATICEDGE,WS_EX_TOOLWINDOW,WS_EX_TOPMOST,WS_EX_TRANSPARENT,WS_EX_WINDOWEDGE +3MUIModifyStyleEx,WS_EX_ACCEPTFILES,WS_EX_APPWINDOW,WS_EX_CLIENTEDGE,WS_EX_COMPOSITED,WS_EX_CONTEXTHELP,WS_EX_CONTROLPARENT,WS_EX_DLGMODALFRAME,WS_EX_LAYERED,WS_EX_LAYOUTRTL,WS_EX_LEFT,WS_EX_EFTSCROLLBAR,WS_EX_LTRREADING,WS_EX_MDICHILD,WS_EX_NOACTIVATE,WS_EX_NOINHERITLAYOUT,WS_EX_NOPARENTNOTIFY,WS_EX_NOREDIRECTIONBITMAP,WS_EX_OVERLAPPEDWINDOW,WS_EX_PALETTEWINDOW,WS_EX_RIGHT,WS_EX_RIGHTSCROLLBAR,WS_EX_RTLREADING,WS_EX_STATICEDGE,WS_EX_TOOLWINDOW,WS_EX_TOPMOST,WS_EX_TRANSPARENT,WS_EX_WINDOWEDGE +2MUIModifyStyleA,WS_BORDER,WS_CAPTION,WS_CHILD,WS_CHILDWINDOW,WS_CLIPCHILDREN,WS_CLIPSIBLINGS,WS_DISABLED,WS_DLGFRAME,WS_GROUP,WS_HSCROLL,WS_ICONIC,WS_MAXIMIZE,WS_MAXIMIZEBOX,WS_MINIMIZE,WS_MINIMIZEBOX,WS_OVERLAPPED,WS_OVERLAPPEDWINDOW,WS_POPUP,WS_POPUPWINDOW,WS_SIZEBOX,WS_SYSMENU,WS_TABSTOP,WS_THICKFRAME,WS_TILED,WS_TILEDWINDOW,WS_VISIBLE,WS_VSCROLL +3MUIModifyStyleA,WS_BORDER,WS_CAPTION,WS_CHILD,WS_CHILDWINDOW,WS_CLIPCHILDREN,WS_CLIPSIBLINGS,WS_DISABLED,WS_DLGFRAME,WS_GROUP,WS_HSCROLL,WS_ICONIC,WS_MAXIMIZE,WS_MAXIMIZEBOX,WS_MINIMIZE,WS_MINIMIZEBOX,WS_OVERLAPPED,WS_OVERLAPPEDWINDOW,WS_POPUP,WS_POPUPWINDOW,WS_SIZEBOX,WS_SYSMENU,WS_TABSTOP,WS_THICKFRAME,WS_TILED,WS_TILEDWINDOW,WS_VISIBLE,WS_VSCROLL +2MUIModifyStyleExA,WS_EX_ACCEPTFILES,WS_EX_APPWINDOW,WS_EX_CLIENTEDGE,WS_EX_COMPOSITED,WS_EX_CONTEXTHELP,WS_EX_CONTROLPARENT,WS_EX_DLGMODALFRAME,WS_EX_LAYERED,WS_EX_LAYOUTRTL,WS_EX_LEFT,WS_EX_EFTSCROLLBAR,WS_EX_LTRREADING,WS_EX_MDICHILD,WS_EX_NOACTIVATE,WS_EX_NOINHERITLAYOUT,WS_EX_NOPARENTNOTIFY,WS_EX_NOREDIRECTIONBITMAP,WS_EX_OVERLAPPEDWINDOW,WS_EX_PALETTEWINDOW,WS_EX_RIGHT,WS_EX_RIGHTSCROLLBAR,WS_EX_RTLREADING,WS_EX_STATICEDGE,WS_EX_TOOLWINDOW,WS_EX_TOPMOST,WS_EX_TRANSPARENT,WS_EX_WINDOWEDGE +3MUIModifyStyleExA,WS_EX_ACCEPTFILES,WS_EX_APPWINDOW,WS_EX_CLIENTEDGE,WS_EX_COMPOSITED,WS_EX_CONTEXTHELP,WS_EX_CONTROLPARENT,WS_EX_DLGMODALFRAME,WS_EX_LAYERED,WS_EX_LAYOUTRTL,WS_EX_LEFT,WS_EX_EFTSCROLLBAR,WS_EX_LTRREADING,WS_EX_MDICHILD,WS_EX_NOACTIVATE,WS_EX_NOINHERITLAYOUT,WS_EX_NOPARENTNOTIFY,WS_EX_NOREDIRECTIONBITMAP,WS_EX_OVERLAPPEDWINDOW,WS_EX_PALETTEWINDOW,WS_EX_RIGHT,WS_EX_RIGHTSCROLLBAR,WS_EX_RTLREADING,WS_EX_STATICEDGE,WS_EX_TOOLWINDOW,WS_EX_TOPMOST,WS_EX_TRANSPARENT,WS_EX_WINDOWEDGE +2MUIModifyStyleW,WS_BORDER,WS_CAPTION,WS_CHILD,WS_CHILDWINDOW,WS_CLIPCHILDREN,WS_CLIPSIBLINGS,WS_DISABLED,WS_DLGFRAME,WS_GROUP,WS_HSCROLL,WS_ICONIC,WS_MAXIMIZE,WS_MAXIMIZEBOX,WS_MINIMIZE,WS_MINIMIZEBOX,WS_OVERLAPPED,WS_OVERLAPPEDWINDOW,WS_POPUP,WS_POPUPWINDOW,WS_SIZEBOX,WS_SYSMENU,WS_TABSTOP,WS_THICKFRAME,WS_TILED,WS_TILEDWINDOW,WS_VISIBLE,WS_VSCROLL +3MUIModifyStyleW,WS_BORDER,WS_CAPTION,WS_CHILD,WS_CHILDWINDOW,WS_CLIPCHILDREN,WS_CLIPSIBLINGS,WS_DISABLED,WS_DLGFRAME,WS_GROUP,WS_HSCROLL,WS_ICONIC,WS_MAXIMIZE,WS_MAXIMIZEBOX,WS_MINIMIZE,WS_MINIMIZEBOX,WS_OVERLAPPED,WS_OVERLAPPEDWINDOW,WS_POPUP,WS_POPUPWINDOW,WS_SIZEBOX,WS_SYSMENU,WS_TABSTOP,WS_THICKFRAME,WS_TILED,WS_TILEDWINDOW,WS_VISIBLE,WS_VSCROLL +2MUIModifyStyleExW,WS_EX_ACCEPTFILES,WS_EX_APPWINDOW,WS_EX_CLIENTEDGE,WS_EX_COMPOSITED,WS_EX_CONTEXTHELP,WS_EX_CONTROLPARENT,WS_EX_DLGMODALFRAME,WS_EX_LAYERED,WS_EX_LAYOUTRTL,WS_EX_LEFT,WS_EX_EFTSCROLLBAR,WS_EX_LTRREADING,WS_EX_MDICHILD,WS_EX_NOACTIVATE,WS_EX_NOINHERITLAYOUT,WS_EX_NOPARENTNOTIFY,WS_EX_NOREDIRECTIONBITMAP,WS_EX_OVERLAPPEDWINDOW,WS_EX_PALETTEWINDOW,WS_EX_RIGHT,WS_EX_RIGHTSCROLLBAR,WS_EX_RTLREADING,WS_EX_STATICEDGE,WS_EX_TOOLWINDOW,WS_EX_TOPMOST,WS_EX_TRANSPARENT,WS_EX_WINDOWEDGE +3MUIModifyStyleExW,WS_EX_ACCEPTFILES,WS_EX_APPWINDOW,WS_EX_CLIENTEDGE,WS_EX_COMPOSITED,WS_EX_CONTEXTHELP,WS_EX_CONTROLPARENT,WS_EX_DLGMODALFRAME,WS_EX_LAYERED,WS_EX_LAYOUTRTL,WS_EX_LEFT,WS_EX_EFTSCROLLBAR,WS_EX_LTRREADING,WS_EX_MDICHILD,WS_EX_NOACTIVATE,WS_EX_NOINHERITLAYOUT,WS_EX_NOPARENTNOTIFY,WS_EX_NOREDIRECTIONBITMAP,WS_EX_OVERLAPPEDWINDOW,WS_EX_PALETTEWINDOW,WS_EX_RIGHT,WS_EX_RIGHTSCROLLBAR,WS_EX_RTLREADING,WS_EX_STATICEDGE,WS_EX_TOOLWINDOW,WS_EX_TOPMOST,WS_EX_TRANSPARENT,WS_EX_WINDOWEDGE 2MUIPaintBackground,MUI_RGBCOLOR -3MUIPaintBackground,MUI_RGBCOLOR +3MUIPaintBackground,-1,MUI_RGBCOLOR 2MUIPaintBackgroundImage,MUI_RGBCOLOR -3MUIPaintBackgroundImage,MUI_RGBCOLOR +3MUIPaintBackgroundImage,-1,MUI_RGBCOLOR 5MUIPaintBackgroundImage,MUIIT_BMP,MUIIT_ICO,MUIIT_PNG,MUIIT_NONE 6MUIPaintBackgroundImage,MUIIL_CENTER,MUIIL_BOTTOMLEFT,MUIIL_BOTTOMRIGHT,MUIIL_TOPLEFT,MUIIL_TOPRIGHT,MUIIL_TOPCENTER,MUIIL_BOTTOMCENTER -2UIPaintBorder,MUI_RGBCOLOR +2UIPaintBorder,MUI_RGBCOLOR,-1 3MUIGDIPaintFill,MUI_RGBCOLOR 3MUIGDIPaintFrame,MUI_RGBCOLOR 4MUIGDIPaintFrame,MUIPFS_ALL,MUIPFS_LEFT,MUIPFS_TOP,MUIPFS_BOTTOM,MUIPFS_RIGHT +3MUIGDIPaintRectangle,MUI_RGBCOLOR,-1 +4MUIGDIPaintRectangle,MUI_RGBCOLOR,-1 3MUIGDIPaintGradient,MUI_RGBCOLOR 4MUIGDIPaintGradient,MUI_RGBCOLOR 5MUIGDIPaintGradient,MUIPGS_HORZ,MUIPGS_VERT @@ -39,4 +63,5 @@ 3MUIGetImageSizeEx,MUIIT_BMP,MUIIT_ICO,MUIIT_PNG,MUIIT_NONE 4UISetRegionFromResource,TRUE,FALSE 3MUIGDIBlend,MUI_RGBCOLOR -3MUIGDIBlendBitmaps,MUI_RGBCOLOR \ No newline at end of file +3MUIGDIBlendBitmaps,MUI_RGBCOLOR +1MUISuperclass,#32768,#32769,#32770,#32771,#32772,AfxControlBar,Button,ComboBox,ComboBoxEx32,ComboLBox,DDEMLEvent,Edit,HTML_Internet Explorer,Internet Explorer_Server,ListBox,MDIClient,MSTaskSwWClass,Message,MfcDialogBar,MfcFrame,MfcFrameMDI,MfcFrameMDIChild,MfcFrameMini,MfcFrameMiniDock,MfcSplitter,MfcView,MfcWnd,NativeFontCtl,OCHost,OpenListView,ReBarWindow32,RichEdit20W,RichEdit20a,RichEdit50W,Richedit,SHELLDLL_DefView,Scrollbar,Shell DocObject View,Shell Embedding,Static,SysAnimate32,SysDateTimePick32,SysHeader32,SysIPAddress32,SysLink,SysListView32,SysMonthCal32,SysPager,SysTabControl32,SysTreeView32,ThumbnailVwExtWnd32,ToolbarWindow32,TrayClockWClass,TrayNotifyWnd,commctrl_DragListMsg,msctls_hotkey32,msctls_progress32,msctls_statusbar32,msctls_trackbar32,msctls_updown,msctls_updown32,tooltips_class,tooltips_class32 diff --git a/ModernUI/masmType.api.txt b/ModernUI/masmType.api.txt index cb48f6a..e465629 100644 --- a/ModernUI/masmType.api.txt +++ b/ModernUI/masmType.api.txt @@ -5,6 +5,13 @@ ; ; Paste this text at the end of \Radasm\Masm\masmType.api to add to Radasm ; +; To add types to masm.ini c6 section: +; +; ^LPGDIPRECT ^LPGPGRAPHICS ^LPGPIMAGE ^LPGPRECT ^LPHBITMAP ^LPHDC ^LPMUIIMAGE +; ^LPMUIVALUE ^MUILPVALUE ^MUILPSTRING ^LPRECT ^MUICOLORARGB ^MUICOLORRGB ^MUIIL +; ^MUIIMAGE ^MUIIT ^MUIPFS ^MUIPROPERTIES ^MUIPROPERTY ^MUIPROPERTYVALUE +; ^MUIVALUE ^MUIWND +; ;------------------------------------------------------------------------------ MUIWND,4,Alias for HWND window handle for a ModernUI control handle, typically defined as hWin MUIPROPERTIES,4,Enum for cbWndExtraOffset parameter of MUIAllocMemProperties and MUIFreeMemProperties functions @@ -12,6 +19,8 @@ MUIPROPERTY,4,Enum for a specific ModernUI Control MUIPROPERTYVALUE,4,Value of specific ModernUI Control’s property, using the PropertyValue parameter of MUISetIntProperty or MUISetExtProperty functions MUIVALUE,4,A value, a constant or typically an unsigned integer used in certain ModernUI function parameters LPMUIVALUE,4,A pointer to a MUIVALUE value +MUILPVALUE,4,A pointer to a MUIVALUE value +MUILPSTRING,4,Pointer to zero terminated string MUIIT,4,Image type enum MUIIL,4,Image location enum MUIPFS,4,Paint frame style enum for the FrameStyle parameter of the MUIGDIPaintFrame function diff --git a/ModernUIDLL/ModernUIDLL.asm b/ModernUIDLL/ModernUIDLL.asm index 887f045..d51dd93 100644 --- a/ModernUIDLL/ModernUIDLL.asm +++ b/ModernUIDLL/ModernUIDLL.asm @@ -1,8 +1,8 @@ ;============================================================================== ; -; ModernUI Library v0.0.0.6 +; ModernUI Library v0.0.0.7 ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; @@ -75,6 +75,10 @@ Include .\..\ModernUI\ModernUI.inc ; Base Include .\..\ModernUI\_ModernUI_Base.asm +; Class +Include .\..\ModernUI\MUIRegister.asm +Include .\..\ModernUI\MUISuperclass.asm + ; DPI Include .\..\ModernUI\ModernUI_DPI.asm @@ -86,10 +90,11 @@ Include .\..\ModernUI\_ModernUI_GDIDoubleBuffer.asm Include .\..\ModernUI\MUIGDIBlend.asm Include .\..\ModernUI\MUIGDIBlendBitmaps.asm Include .\..\ModernUI\MUIGDICreateBitmapMask.asm +Include .\..\ModernUI\MUIGDIPaintBrush.asm Include .\..\ModernUI\MUIGDIPaintFill.asm Include .\..\ModernUI\MUIGDIPaintFrame.asm -Include .\..\ModernUI\MUIGDIPaintBrush.asm Include .\..\ModernUI\MUIGDIPaintGradient.asm +Include .\..\ModernUI\MUIGDIPaintRectangle.asm Include .\..\ModernUI\MUIGDIRotateBitmap.asm Include .\..\ModernUI\MUIGDIStretchBitmap.asm Include .\..\ModernUI\MUIGDIStretchImage.asm @@ -124,14 +129,16 @@ Include .\..\ModernUI\MUIPaintBackground.asm Include .\..\ModernUI\MUIPaintBackgroundImage.asm Include .\..\ModernUI\MUIPaintBorder.asm +;Region +Include .\..\ModernUI\MUILoadRegionFromResource.asm +Include .\..\ModernUI\MUISetRegionFromResource.asm + ; Window Include .\..\ModernUI\MUIApplyToDialog.asm Include .\..\ModernUI\MUICenterWindow.asm Include .\..\ModernUI\MUIGetParentRelativeWindowRect.asm - -;Region -Include .\..\ModernUI\MUILoadRegionFromResource.asm -Include .\..\ModernUI\MUISetRegionFromResource.asm +Include .\..\ModernUI\MUIModifyStyle.asm +Include .\..\ModernUI\MUIModifyStyleEx.asm ;-------------------------------------- ; ModernUI Controls: diff --git a/ModernUIDLL/ModernUIDLL.rap b/ModernUIDLL/ModernUIDLL.rap index ea077b7..4ebaf28 100644 --- a/ModernUIDLL/ModernUIDLL.rap +++ b/ModernUIDLL/ModernUIDLL.rap @@ -81,7 +81,7 @@ MilestoneOnTime=2 MilestoneOnDate=0 MilestoneOnDateWhen=1 MilestoneOnDateStatus=0 -MilestoneOnDateDate=27 +MilestoneOnDateDate=18 MilestoneOnDateTimeYear=2019 MilestoneOnDateTimeMonth=6 MilestoneOnDateTimeDate=3 @@ -105,7 +105,7 @@ ProductVer2Range=0 ProductVer3Range=0 ProductVer4Range=0 [PTimer] -PTimer=8819191 +PTimer=11947831 [Collapse] 4= 2= @@ -113,9 +113,9 @@ PTimer=8819191 3= 5= [Size] -4=0,0,0,0,1863 -2=0,0,0,0,1899 -1=0,0,0,0,3845 +4=0,0,0,0,4039 +2=0,0,0,0,132 +1=0,0,0,0,4654 3=0,0,0,0,0 5=0,0,0,0,405 [GroupExpand] diff --git a/ModernUIDLL/ModernUIx86.def b/ModernUIDLL/ModernUIx86.def index 1fb6331..0b18316 100644 --- a/ModernUIDLL/ModernUIx86.def +++ b/ModernUIDLL/ModernUIx86.def @@ -1,8 +1,8 @@ ;============================================================================== ; -; ModernUI Library v0.0.0.6 +; ModernUI Library v0.0.0.7 ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; @@ -43,35 +43,67 @@ EXPORTS ; ModernUI Library ;-------------------------------------- ; ModernUI Base Functions: - MUIGetExtProperty - MUISetExtProperty - MUIGetIntProperty - MUISetIntProperty - MUIGetExtPropertyEx - MUISetExtPropertyEx - MUIGetIntPropertyEx - MUISetIntPropertyEx - MUIGetExtPropertyExtra - MUISetExtPropertyExtra - MUIGetIntPropertyExtra - MUISetIntPropertyExtra - ; ModernUI Memory Functions: - MUIAllocMemProperties - MUIFreeMemProperties - MUIAllocStructureMemory + MUIGetPropertyA + MUISetPropertyA + MUIGetExtPropertyA + MUISetExtPropertyA + MUIGetIntPropertyA + MUISetIntPropertyA + MUIGetExtPropertyExA + MUISetExtPropertyExA + MUIGetIntPropertyExA + MUISetIntPropertyExA + MUIGetExtPropertyExtraA + MUISetExtPropertyExtraA + MUIGetIntPropertyExtraA + MUISetIntPropertyExtraA + MUIGetPropertyW + MUISetPropertyW + MUIGetExtPropertyW + MUISetExtPropertyW + MUIGetIntPropertyW + MUISetIntPropertyW + MUIGetExtPropertyExW + MUISetExtPropertyExW + MUIGetIntPropertyExW + MUISetIntPropertyExW + MUIGetExtPropertyExtraW + MUISetExtPropertyExtraW + MUIGetIntPropertyExtraW + MUISetIntPropertyExtraW + ; ModernUI Class Functions: + MUIRegisterA + MUISuperclassA + MUIRegisterW + MUISuperclassW + ; ModernUI DPI & Scaling Functions: + MUIDPI + MUIDPIScaleX + MUIDPIScaleY + MUIDPIScaleRect + MUIDPIScaleControl + MUIDPIScaleFontSize + MUIDPIScaledScreen + MUIDPIScaleFontA + MUIDPISetDPIAwareA + MUIDPIScaleFontW + MUIDPISetDPIAwareW + ; ModernUI Font Functions: + MUIPointSizeToLogicalUnit ; ModernUI GDI Functions: - MUIGDIDoubleBufferStart - MUIGDIDoubleBufferFinish MUIGDIBlend MUIGDIBlendBitmaps - MUIGDIStretchBitmap - MUIGDIStretchImage - MUIGDIRotateCenterBitmap + MUIGDICreateBitmapMask + MUIGDIDoubleBufferStart + MUIGDIDoubleBufferFinish + MUIGDIPaintBrush MUIGDIPaintFill MUIGDIPaintFrame - MUIGDIPaintBrush MUIGDIPaintGradient - MUIGDICreateBitmapMask + MUIGDIPaintRectangle + MUIGDIRotateCenterBitmap + MUIGDIStretchBitmap + MUIGDIStretchImage ; ModernUI GDIPlus Functions: MUIGDIPlusStart MUIGDIPlusFinish @@ -84,40 +116,38 @@ EXPORTS MUIGDIPlusPaintFrameI MUILoadPngFromResource MUIGDIPlusRectToGdipRect + ; ModernUI Image Functions: + MUICreateBitmapFromMemory + MUICreateCursorFromMemory + MUICreateIconFromMemory + MUIGetImageSize + MUIGetImageSizeEx + MUILoadBitmapFromResource + MUILoadIconFromResource + MUILoadImageFromResource + ; ModernUI Memory Functions: + MUIAllocMemProperties + MUIFreeMemProperties + MUIAllocStructureMemory ; ModernUI Painting & Color Functions: + MUIGetParentBackgroundBitmap + MUIGetParentBackgroundColor MUIPaintBackground MUIPaintBackgroundImage MUIPaintBorder - MUIGetParentBackgroundColor - MUIGetParentBackgroundBitmap - ; ModernUI Window/Dialog Functions: - MUIApplyToDialog - MUICenterWindow - MUIGetParentRelativeWindowRect ; ModernUI Region Functions: MUILoadRegionFromResource MUISetRegionFromResource - ; ModernUI Font Functions: - MUIPointSizeToLogicalUnit - ; ModernUI Image Functions: - MUIGetImageSize - MUIGetImageSizeEx - MUICreateIconFromMemory - MUICreateCursorFromMemory - MUICreateBitmapFromMemory - MUILoadImageFromResource - MUILoadBitmapFromResource - MUILoadIconFromResource - ; ModernUI DPI & Scaling Functions: - MUIDPI - MUIDPIScaleX - MUIDPIScaleY - MUIDPIScaleRect - MUIDPIScaleControl - MUIDPIScaleFontSize - MUIDPIScaleFont - MUIDPIScaledScreen - MUIDPISetDPIAware + ; ModernUI Window/Dialog Functions: + MUIApplyToDialogA + MUIApplyToDialogW + MUICenterWindow + MUIGetParentRelativeWindowRect + MUIModifyStyleA + MUIModifyStyleExA + MUIModifyStyleW + MUIModifyStyleExW + ;-------------------------------------- ; ModernUI_Button Control ;-------------------------------------- @@ -256,3 +286,5 @@ EXPORTS MUITrayIconSetTooltipText MUITrayIconShowNotification MUITrayIconSetTrayIconText + + \ No newline at end of file diff --git a/ModernUIDLL/ModernUIx86.dll b/ModernUIDLL/ModernUIx86.dll index a13afe3..1e7707a 100644 Binary files a/ModernUIDLL/ModernUIx86.dll and b/ModernUIDLL/ModernUIx86.dll differ diff --git a/ModernUIDLL/ModernUIx86.inc b/ModernUIDLL/ModernUIx86.inc index 7399cd0..83a600f 100644 --- a/ModernUIDLL/ModernUIx86.inc +++ b/ModernUIDLL/ModernUIx86.inc @@ -1,8 +1,8 @@ ;============================================================================== ; -; ModernUI Library v0.0.0.6 +; ModernUI Library v0.0.0.7 ; -; Copyright (c) 2019 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; diff --git a/ModernUIDLL/ModernUIx86.lib b/ModernUIDLL/ModernUIx86.lib index 9b05a97..94f7381 100644 Binary files a/ModernUIDLL/ModernUIx86.lib and b/ModernUIDLL/ModernUIx86.lib differ diff --git a/Release/MUIAnim1.zip b/Release/MUIAnim1.zip index b90e756..7f97e5f 100644 Binary files a/Release/MUIAnim1.zip and b/Release/MUIAnim1.zip differ diff --git a/Release/MUIButton1.zip b/Release/MUIButton1.zip index 0ef2469..e0a6dd3 100644 Binary files a/Release/MUIButton1.zip and b/Release/MUIButton1.zip differ diff --git a/Release/MUIButtonGradient1.zip b/Release/MUIButtonGradient1.zip index 3d65ce8..0e9e2fe 100644 Binary files a/Release/MUIButtonGradient1.zip and b/Release/MUIButtonGradient1.zip differ diff --git a/Release/MUIButtonTSOptions.zip b/Release/MUIButtonTSOptions.zip index 4bb935f..6facbd5 100644 Binary files a/Release/MUIButtonTSOptions.zip and b/Release/MUIButtonTSOptions.zip differ diff --git a/Release/MUICaptionBar1.zip b/Release/MUICaptionBar1.zip index f975ba3..74aaff5 100644 Binary files a/Release/MUICaptionBar1.zip and b/Release/MUICaptionBar1.zip differ diff --git a/Release/MUICaptionBar2.zip b/Release/MUICaptionBar2.zip index 454fe25..2cd7de9 100644 Binary files a/Release/MUICaptionBar2.zip and b/Release/MUICaptionBar2.zip differ diff --git a/Release/MUICaptionBar3.zip b/Release/MUICaptionBar3.zip index 6f548cd..2d4df91 100644 Binary files a/Release/MUICaptionBar3.zip and b/Release/MUICaptionBar3.zip differ diff --git a/Release/MUICaptionBar4.zip b/Release/MUICaptionBar4.zip index eaa0ffa..77bfc72 100644 Binary files a/Release/MUICaptionBar4.zip and b/Release/MUICaptionBar4.zip differ diff --git a/Release/MUICheckbox.zip b/Release/MUICheckbox.zip index a7f2c2b..b93594c 100644 Binary files a/Release/MUICheckbox.zip and b/Release/MUICheckbox.zip differ diff --git a/Release/MUIExample1.zip b/Release/MUIExample1.zip index dffc434..679e698 100644 Binary files a/Release/MUIExample1.zip and b/Release/MUIExample1.zip differ diff --git a/Release/MUIExample2.zip b/Release/MUIExample2.zip index b6df99b..2a81f5b 100644 Binary files a/Release/MUIExample2.zip and b/Release/MUIExample2.zip differ diff --git a/Release/MUIMenu1.zip b/Release/MUIMenu1.zip index 1b9bb25..7edf930 100644 Binary files a/Release/MUIMenu1.zip and b/Release/MUIMenu1.zip differ diff --git a/Release/MUIProgressBar.zip b/Release/MUIProgressBar.zip index 06b9ced..91b4ca0 100644 Binary files a/Release/MUIProgressBar.zip and b/Release/MUIProgressBar.zip differ diff --git a/Release/MUIProgressDotsTest.zip b/Release/MUIProgressDotsTest.zip index e25f941..4205878 100644 Binary files a/Release/MUIProgressDotsTest.zip and b/Release/MUIProgressDotsTest.zip differ diff --git a/Release/MUISpinner1.zip b/Release/MUISpinner1.zip index 1ac803d..f071e7d 100644 Binary files a/Release/MUISpinner1.zip and b/Release/MUISpinner1.zip differ diff --git a/Release/MUIText.zip b/Release/MUIText.zip index 45a4d21..6ceeb56 100644 Binary files a/Release/MUIText.zip and b/Release/MUIText.zip differ diff --git a/Release/MUITrayInfo.zip b/Release/MUITrayInfo.zip index f607da5..e8602db 100644 Binary files a/Release/MUITrayInfo.zip and b/Release/MUITrayInfo.zip differ diff --git a/Release/MUITrayMenu.zip b/Release/MUITrayMenu.zip index 1b611b8..f27f45d 100644 Binary files a/Release/MUITrayMenu.zip and b/Release/MUITrayMenu.zip differ diff --git a/Release/ModernUI.zip b/Release/ModernUI.zip index 249f620..8eec7d3 100644 Binary files a/Release/ModernUI.zip and b/Release/ModernUI.zip differ diff --git a/Release/ModernUI_AllControls.zip b/Release/ModernUI_AllControls.zip index 89e6c41..8e50af0 100644 Binary files a/Release/ModernUI_AllControls.zip and b/Release/ModernUI_AllControls.zip differ diff --git a/Release/ModernUI_Animation.zip b/Release/ModernUI_Animation.zip index dc893d7..557f461 100644 Binary files a/Release/ModernUI_Animation.zip and b/Release/ModernUI_Animation.zip differ diff --git a/Release/ModernUI_Animation_Source.zip b/Release/ModernUI_Animation_Source.zip index ee2186b..dcf6eec 100644 Binary files a/Release/ModernUI_Animation_Source.zip and b/Release/ModernUI_Animation_Source.zip differ diff --git a/Release/ModernUI_Button.zip b/Release/ModernUI_Button.zip index bfae972..99e2ee2 100644 Binary files a/Release/ModernUI_Button.zip and b/Release/ModernUI_Button.zip differ diff --git a/Release/ModernUI_Button_Source.zip b/Release/ModernUI_Button_Source.zip index 77bf118..4d34b05 100644 Binary files a/Release/ModernUI_Button_Source.zip and b/Release/ModernUI_Button_Source.zip differ diff --git a/Release/ModernUI_CaptionBar.zip b/Release/ModernUI_CaptionBar.zip index 9fcbbfe..cf08a42 100644 Binary files a/Release/ModernUI_CaptionBar.zip and b/Release/ModernUI_CaptionBar.zip differ diff --git a/Release/ModernUI_CaptionBar_Source.zip b/Release/ModernUI_CaptionBar_Source.zip index 868d4c5..da29662 100644 Binary files a/Release/ModernUI_CaptionBar_Source.zip and b/Release/ModernUI_CaptionBar_Source.zip differ diff --git a/Release/ModernUI_Checkbox.zip b/Release/ModernUI_Checkbox.zip index 392e6f2..7f4f316 100644 Binary files a/Release/ModernUI_Checkbox.zip and b/Release/ModernUI_Checkbox.zip differ diff --git a/Release/ModernUI_Checkbox_Source.zip b/Release/ModernUI_Checkbox_Source.zip index ea9b893..ea597ce 100644 Binary files a/Release/ModernUI_Checkbox_Source.zip and b/Release/ModernUI_Checkbox_Source.zip differ diff --git a/Release/ModernUI_ProgressBar.zip b/Release/ModernUI_ProgressBar.zip index a22c1a0..3123602 100644 Binary files a/Release/ModernUI_ProgressBar.zip and b/Release/ModernUI_ProgressBar.zip differ diff --git a/Release/ModernUI_ProgressBar_Source.zip b/Release/ModernUI_ProgressBar_Source.zip index 588069f..87996fc 100644 Binary files a/Release/ModernUI_ProgressBar_Source.zip and b/Release/ModernUI_ProgressBar_Source.zip differ diff --git a/Release/ModernUI_ProgressDots.zip b/Release/ModernUI_ProgressDots.zip index 6c225ac..c678678 100644 Binary files a/Release/ModernUI_ProgressDots.zip and b/Release/ModernUI_ProgressDots.zip differ diff --git a/Release/ModernUI_ProgressDots_Source.zip b/Release/ModernUI_ProgressDots_Source.zip index 3bf7fbd..6267ed8 100644 Binary files a/Release/ModernUI_ProgressDots_Source.zip and b/Release/ModernUI_ProgressDots_Source.zip differ diff --git a/Release/ModernUI_Region.zip b/Release/ModernUI_Region.zip index 886f8dd..e82c311 100644 Binary files a/Release/ModernUI_Region.zip and b/Release/ModernUI_Region.zip differ diff --git a/Release/ModernUI_Region_Source.zip b/Release/ModernUI_Region_Source.zip index 3109110..99f4310 100644 Binary files a/Release/ModernUI_Region_Source.zip and b/Release/ModernUI_Region_Source.zip differ diff --git a/Release/ModernUI_SmartPanel.zip b/Release/ModernUI_SmartPanel.zip index 0b7a01f..41e18a9 100644 Binary files a/Release/ModernUI_SmartPanel.zip and b/Release/ModernUI_SmartPanel.zip differ diff --git a/Release/ModernUI_SmartPanel_Source.zip b/Release/ModernUI_SmartPanel_Source.zip index 3299ea9..9297df9 100644 Binary files a/Release/ModernUI_SmartPanel_Source.zip and b/Release/ModernUI_SmartPanel_Source.zip differ diff --git a/Release/ModernUI_Source.zip b/Release/ModernUI_Source.zip index 88007df..5677614 100644 Binary files a/Release/ModernUI_Source.zip and b/Release/ModernUI_Source.zip differ diff --git a/Release/ModernUI_Spinner.zip b/Release/ModernUI_Spinner.zip index fce71bc..ebba741 100644 Binary files a/Release/ModernUI_Spinner.zip and b/Release/ModernUI_Spinner.zip differ diff --git a/Release/ModernUI_Spinner_Source.zip b/Release/ModernUI_Spinner_Source.zip index 144b597..9364f00 100644 Binary files a/Release/ModernUI_Spinner_Source.zip and b/Release/ModernUI_Spinner_Source.zip differ diff --git a/Release/ModernUI_Text.zip b/Release/ModernUI_Text.zip index 8f521a5..42f9c7c 100644 Binary files a/Release/ModernUI_Text.zip and b/Release/ModernUI_Text.zip differ diff --git a/Release/ModernUI_Text_Source.zip b/Release/ModernUI_Text_Source.zip index 0c6ddf3..8b38791 100644 Binary files a/Release/ModernUI_Text_Source.zip and b/Release/ModernUI_Text_Source.zip differ diff --git a/Release/ModernUI_Tooltip.zip b/Release/ModernUI_Tooltip.zip index ef69890..74d3067 100644 Binary files a/Release/ModernUI_Tooltip.zip and b/Release/ModernUI_Tooltip.zip differ diff --git a/Release/ModernUI_Tooltip_Source.zip b/Release/ModernUI_Tooltip_Source.zip index e0c0ffd..1b3b796 100644 Binary files a/Release/ModernUI_Tooltip_Source.zip and b/Release/ModernUI_Tooltip_Source.zip differ diff --git a/Release/ModernUI_TrayMenu.zip b/Release/ModernUI_TrayMenu.zip index 2299697..a330558 100644 Binary files a/Release/ModernUI_TrayMenu.zip and b/Release/ModernUI_TrayMenu.zip differ diff --git a/Release/ModernUI_TrayMenu_Source.zip b/Release/ModernUI_TrayMenu_Source.zip index 76118e3..165ade8 100644 Binary files a/Release/ModernUI_TrayMenu_Source.zip and b/Release/ModernUI_TrayMenu_Source.zip differ diff --git a/Release/ModernUIx86DLL.zip b/Release/ModernUIx86DLL.zip index 3f3da44..4f19a0b 100644 Binary files a/Release/ModernUIx86DLL.zip and b/Release/ModernUIx86DLL.zip differ diff --git a/Release/RAMUIControls.zip b/Release/RAMUIControls.zip index b40befc..7e05f60 100644 Binary files a/Release/RAMUIControls.zip and b/Release/RAMUIControls.zip differ diff --git a/Release/RadASM ModernUI Api files.zip b/Release/RadASM ModernUI Api files.zip index b5c959f..4d4423b 100644 Binary files a/Release/RadASM ModernUI Api files.zip and b/Release/RadASM ModernUI Api files.zip differ diff --git a/Release/RadASMTemplates.zip b/Release/RadASMTemplates.zip index 5485844..2f633c1 100644 Binary files a/Release/RadASMTemplates.zip and b/Release/RadASMTemplates.zip differ diff --git a/template/ModernUI_Control.tpl b/template/ModernUI_Control.tpl index 61f1b5a..ef7679e 100644 --- a/template/ModernUI_Control.tpl +++ b/template/ModernUI_Control.tpl @@ -42,12 +42,14 @@ Menu=0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0 [Accel] [VerInf] [Group] -Group=Distribuition,Modules,Assembly,Resources,Misc -1=3 -2=3 -3=5 -4=1 +Group=Assembly,Misc +1=1 +2=1 +3=2 +4=2 5=2 +6=2 +7=2 [*ENDDEF*] [*BEGINTXT*] LibTemplate.asm @@ -55,12 +57,10 @@ LibTemplate.asm ; ; ModernUI Control - [*PROJECTNAME*] ; -; Copyright (c) 2018 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; -; http://www.LetTheLight.in -; ; http://github.com/mrfearless/ModernUI ; ; @@ -119,154 +119,187 @@ includelib gdi32.lib include ModernUI.inc includelib ModernUI.lib -include [*PROJECTNAME*].inc +IFDEF MUI_USEGDIPLUS +ECHO MUI_USEGDIPLUS +include gdiplus.inc +include ole32.inc +includelib gdiplus.lib +includelib ole32.lib +ELSE +ECHO MUI_DONTUSEGDIPLUS +ENDIF + +include ModernUI_[*PROJECTNAME*].inc ;------------------------------------------------------------------------------ ; Prototypes for internal use ;------------------------------------------------------------------------------ -_MUI_[*PROJECTNAME*]WndProc PROTO :DWORD, :DWORD, :DWORD, :DWORD -_MUI_[*PROJECTNAME*]Init PROTO :DWORD -_MUI_[*PROJECTNAME*]Paint PROTO :DWORD +_MUI_[*PROJECTNAME*]WndProc PROTO :DWORD, :DWORD, :DWORD, :DWORD +_MUI_[*PROJECTNAME*]Init PROTO :DWORD +_MUI_[*PROJECTNAME*]Cleanup PROTO :DWORD +_MUI_[*PROJECTNAME*]Paint PROTO :DWORD ;------------------------------------------------------------------------------ ; Structures for internal use ;------------------------------------------------------------------------------ ; External public properties -MUI_[*PROJECTNAME*]_PROPERTIES STRUCT - dwTextColor DD ? - dwTextFont DD ? - dwBackColor DD ? -MUI_[*PROJECTNAME*]_PROPERTIES ENDS +MUI_[*PROJECTNAME*]_PROPERTIES STRUCT + dwTextColor DD ? + dwTextFont DD ? + dwBackColor DD ? + dwBorderColor DD ? +MUI_[*PROJECTNAME*]_PROPERTIES ENDS ; Internal properties -_MUI_[*PROJECTNAME*]_PROPERTIES STRUCT - dwEnabledState DD ? - dwMouseOver DD ? -_MUI_[*PROJECTNAME*]_PROPERTIES ENDS +_MUI_[*PROJECTNAME*]_PROPERTIES STRUCT + dwEnabledState DD ? + dwMouseOver DD ? +_MUI_[*PROJECTNAME*]_PROPERTIES ENDS .CONST ; Internal properties -@[*PROJECTNAME*]EnabledState EQU 0 -@[*PROJECTNAME*]MouseOver EQU 4 +@[*PROJECTNAME*]EnabledState EQU 0 +@[*PROJECTNAME*]MouseOver EQU 4 ; External public properties .DATA -szMUI[*PROJECTNAME*]Class DB 'ModernUI[*PROJECTNAME*]',0 ; Class name for creating our [*PROJECTNAME*] control -szMUI[*PROJECTNAME*]Font DB 'Segoe UI',0 ; Font used for [*PROJECTNAME*] text -hMUI[*PROJECTNAME*]Font DD 0 ; Handle to [*PROJECTNAME*] font (segoe ui) +szMUI[*PROJECTNAME*]Class DB 'ModernUI_[*PROJECTNAME*]',0 ; Class name for creating our [*PROJECTNAME*] control +szMUI[*PROJECTNAME*]Font DB 'Segoe UI',0 ; Font used for [*PROJECTNAME*] text +hMUI[*PROJECTNAME*]Font DD 0 ; Handle to [*PROJECTNAME*] font (segoe ui) .CODE + + +MUI_ALIGN ;------------------------------------------------------------------------------ -; Set property for [*PROJECTNAME*] control +; Set property for ModernUI_[*PROJECTNAME*] control ;------------------------------------------------------------------------------ -MUI[*PROJECTNAME*]SetProperty PROC PUBLIC hControl:DWORD, dwProperty:DWORD, dwPropertyValue:DWORD +MUI[*PROJECTNAME*]SetProperty PROC hControl:DWORD, dwProperty:DWORD, dwPropertyValue:DWORD Invoke SendMessage, hControl, MUI_SETPROPERTY, dwProperty, dwPropertyValue ret MUI[*PROJECTNAME*]SetProperty ENDP - +MUI_ALIGN ;------------------------------------------------------------------------------ -; Get property for [*PROJECTNAME*] control +; Get property for ModernUI_[*PROJECTNAME*] control ;------------------------------------------------------------------------------ -MUI[*PROJECTNAME*]GetProperty PROC PUBLIC hControl:DWORD, dwProperty:DWORD +MUI[*PROJECTNAME*]GetProperty PROC hControl:DWORD, dwProperty:DWORD Invoke SendMessage, hControl, MUI_GETPROPERTY, dwProperty, NULL ret MUI[*PROJECTNAME*]GetProperty ENDP - +MUI_ALIGN ;------------------------------------------------------------------------------ -; MUI[*PROJECTNAME*]Register - Registers the [*PROJECTNAME*] control +; MUI[*PROJECTNAME*]Register - Registers the ModernUI_[*PROJECTNAME*] control ; can be used at start of program for use with RadASM custom control -; Custom control class must be set as [*PROJECTNAME*] +; Custom control class must be set as ModernUI_[*PROJECTNAME*] ;------------------------------------------------------------------------------ -MUI[*PROJECTNAME*]Register PROC PUBLIC +MUI[*PROJECTNAME*]Register PROC LOCAL wc:WNDCLASSEX LOCAL hinstance:DWORD - + Invoke GetModuleHandle, NULL mov hinstance, eax - - invoke GetClassInfoEx,hinstance,addr szMUI[*PROJECTNAME*]Class, Addr wc + + mov wc.cbSize, SIZEOF WNDCLASSEX + + invoke GetClassInfoEx, hinstance, Addr szMUI[*PROJECTNAME*]Class, Addr wc .IF eax == 0 ; if class not already registered do so - mov wc.cbSize,sizeof WNDCLASSEX + mov wc.cbSize, SIZEOF WNDCLASSEX lea eax, szMUI[*PROJECTNAME*]Class - mov wc.lpszClassName, eax - mov eax, hinstance + mov wc.lpszClassName, eax + mov eax, hinstance mov wc.hInstance, eax - mov wc.lpfnWndProc, OFFSET _MUI_[*PROJECTNAME*]WndProc - Invoke LoadCursor, NULL, IDC_ARROW - mov wc.hCursor, eax - mov wc.hIcon, 0 - mov wc.hIconSm, 0 - mov wc.lpszMenuName, NULL - mov wc.hbrBackground, NULL - mov wc.style, NULL + lea eax, _MUI_[*PROJECTNAME*]WndProc + mov wc.lpfnWndProc, eax ; OFFSET _MUI_[*PROJECTNAME*]WndProc + Invoke LoadCursor, NULL, IDC_ARROW + mov wc.hCursor, eax + mov wc.hIcon, 0 + mov wc.hIconSm, 0 + mov wc.lpszMenuName, NULL + mov wc.hbrBackground, NULL + mov wc.style, NULL mov wc.cbClsExtra, 0 - mov wc.cbWndExtra, 8 ; cbWndExtra +0 = dword ptr to internal properties memory block, cbWndExtra +4 = dword ptr to external properties memory block - Invoke RegisterClassEx, addr wc + mov wc.cbWndExtra, 8 ; cbWndExtra +0 = dword ptr to internal properties memory block, cbWndExtra +4 = dword ptr to external properties memory block + Invoke RegisterClassEx, Addr wc .ENDIF ret - MUI[*PROJECTNAME*]Register ENDP - +MUI_ALIGN ;------------------------------------------------------------------------------ ; MUI[*PROJECTNAME*]Create - Returns handle in eax of newly created control ;------------------------------------------------------------------------------ -MUI[*PROJECTNAME*]Create PROC PRIVATE hWndParent:DWORD, lpszText:DWORD, xpos:DWORD, ypos:DWORD, controlwidth:DWORD, controlheight:DWORD, dwResourceID:DWORD, dwStyle:DWORD +MUI[*PROJECTNAME*]Create PROC hWndParent:DWORD, lpszText:DWORD, xpos:DWORD, ypos:DWORD, controlwidth:DWORD, controlheight:DWORD, dwResourceID:DWORD, dwStyle:DWORD LOCAL wc:WNDCLASSEX LOCAL hinstance:DWORD - LOCAL hControl:DWORD - + LOCAL hControl:DWORD + LOCAL dwNewStyle:DWORD + Invoke GetModuleHandle, NULL mov hinstance, eax - Invoke MUI[*PROJECTNAME*]Register - + Invoke MUI[*PROJECTNAME*]Register + ; Modify styles appropriately - for visual controls no CS_HREDRAW CS_VREDRAW (causes flickering) - ; probably need WS_CHILD, WS_VISIBLE. Needs WS_CLIPCHILDREN. Non visual prob dont need any of these. - - Invoke CreateWindowEx, NULL, Addr szMUI[*PROJECTNAME*]Class, lpszText, WS_CHILD or WS_VISIBLE or WS_CLIPSIBLINGS, xpos, ypos, controlwidth, controlheight, hWndParent, dwResourceID, hinstance, NULL - mov hControl, eax - .IF eax != NULL - - .ENDIF - mov eax, hControl + ; probably need WS_CHILD, WS_VISIBLE. Needs WS_CLIPCHILDREN. Non visual prob dont need any of these. + + mov eax, dwStyle + mov dwNewStyle, eax + and eax, WS_CHILD or WS_CLIPCHILDREN + .IF eax != WS_CHILD or WS_CLIPCHILDREN + or dwNewStyle, WS_CHILD or WS_CLIPCHILDREN + .ENDIF + + Invoke CreateWindowEx, NULL, Addr szMUI[*PROJECTNAME*]Class, lpszText, dwNewStyle, xpos, ypos, controlwidth, controlheight, hWndParent, dwResourceID, hinstance, NULL + mov hControl, eax + .IF eax != NULL + + .ENDIF + mov eax, hControl ret MUI[*PROJECTNAME*]Create ENDP - - +MUI_ALIGN ;------------------------------------------------------------------------------ ; _MUI_[*PROJECTNAME*]WndProc - Main processing window for our control ;------------------------------------------------------------------------------ -_MUI_[*PROJECTNAME*]WndProc PROC PRIVATE USES EBX hWin:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM +_MUI_[*PROJECTNAME*]WndProc PROC USES EBX hWin:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM LOCAL TE:TRACKMOUSEEVENT LOCAL wp:WINDOWPLACEMENT mov eax,uMsg .IF eax == WM_NCCREATE mov ebx, lParam - ; sets text of our control, delete if not required. - Invoke SetWindowText, hWin, (CREATESTRUCT PTR [ebx]).lpszName + ; sets text of our control, delete if not required. + Invoke SetWindowText, hWin, (CREATESTRUCT PTR [ebx]).lpszName mov eax, TRUE ret .ELSEIF eax == WM_CREATE - Invoke MUIAllocMemProperties, hWin, 0, SIZEOF _MUI_[*PROJECTNAME*]_PROPERTIES ; internal properties - Invoke MUIAllocMemProperties, hWin, 4, SIZEOF MUI_[*PROJECTNAME*]_PROPERTIES ; external properties - Invoke _MUI_[*PROJECTNAME*]Init, hWin - mov eax, 0 - ret + Invoke MUIAllocMemProperties, hWin, MUI_INTERNAL_PROPERTIES, SIZEOF _MUI_[*PROJECTNAME*]_PROPERTIES ; internal properties + Invoke MUIAllocMemProperties, hWin, MUI_EXTERNAL_PROPERTIES, SIZEOF MUI_[*PROJECTNAME*]_PROPERTIES ; external properties + IFDEF MUI_USEGDIPLUS + Invoke MUIGDIPlusStart ; for png resources if used + ENDIF + Invoke _MUI_[*PROJECTNAME*]Init, hWin + mov eax, 0 + ret .ELSEIF eax == WM_NCDESTROY - Invoke MUIFreeMemProperties, hWin, 0 - Invoke MUIFreeMemProperties, hWin, 4 + Invoke _MUI_[*PROJECTNAME*]Cleanup, hWin + Invoke MUIFreeMemProperties, hWin, MUI_INTERNAL_PROPERTIES + Invoke MUIFreeMemProperties, hWin, MUI_EXTERNAL_PROPERTIES + IFDEF MUI_USEGDIPLUS + Invoke MUIGDIPlusFinish + ENDIF + mov eax, 0 + ret .ELSEIF eax == WM_ERASEBKGND mov eax, 1 @@ -278,200 +311,164 @@ _MUI_[*PROJECTNAME*]WndProc PROC PRIVATE USES EBX hWin:HWND, uMsg:UINT, wParam:W ret .ELSEIF eax == WM_LBUTTONUP - ; simulates click on our control, delete if not required. - Invoke GetDlgCtrlID, hWin - mov ebx,eax - Invoke GetParent, hWin - Invoke PostMessage, eax, WM_COMMAND, ebx, hWin + ; simulates click on our control, delete if not required. + Invoke GetDlgCtrlID, hWin + mov ebx,eax + Invoke GetParent, hWin + Invoke PostMessage, eax, WM_COMMAND, ebx, hWin .ELSEIF eax == WM_MOUSEMOVE Invoke MUIGetIntProperty, hWin, @[*PROJECTNAME*]EnabledState .IF eax == TRUE - Invoke MUISetIntProperty, hWin, @[*PROJECTNAME*]MouseOver , TRUE - .IF eax != TRUE - Invoke InvalidateRect, hWin, NULL, TRUE - mov TE.cbSize, SIZEOF TRACKMOUSEEVENT - mov TE.dwFlags, TME_LEAVE - mov eax, hWin - mov TE.hwndTrack, eax - mov TE.dwHoverTime, NULL - Invoke TrackMouseEvent, Addr TE - .ENDIF + Invoke MUISetIntProperty, hWin, @[*PROJECTNAME*]MouseOver , TRUE + .IF eax != TRUE + Invoke InvalidateRect, hWin, NULL, TRUE + mov TE.cbSize, SIZEOF TRACKMOUSEEVENT + mov TE.dwFlags, TME_LEAVE + mov eax, hWin + mov TE.hwndTrack, eax + mov TE.dwHoverTime, NULL + Invoke TrackMouseEvent, Addr TE + .ENDIF .ENDIF .ELSEIF eax == WM_MOUSELEAVE Invoke MUISetIntProperty, hWin, @[*PROJECTNAME*]MouseOver , FALSE - Invoke InvalidateRect, hWin, NULL, TRUE - Invoke LoadCursor, NULL, IDC_ARROW - Invoke SetCursor, eax + Invoke InvalidateRect, hWin, NULL, TRUE + Invoke LoadCursor, NULL, IDC_ARROW + Invoke SetCursor, eax .ELSEIF eax == WM_KILLFOCUS Invoke MUISetIntProperty, hWin, @[*PROJECTNAME*]MouseOver , FALSE - Invoke InvalidateRect, hWin, NULL, TRUE - Invoke LoadCursor, NULL, IDC_ARROW - Invoke SetCursor, eax - - ; custom messages start here - - .ELSEIF eax == MUI_GETPROPERTY - Invoke MUIGetExtProperty, hWin, wParam - ret - - .ELSEIF eax == MUI_SETPROPERTY - Invoke MUISetExtProperty, hWin, wParam, lParam - ret - + Invoke InvalidateRect, hWin, NULL, TRUE + Invoke LoadCursor, NULL, IDC_ARROW + Invoke SetCursor, eax + + ; custom messages start here + + .ELSEIF eax == MUI_GETPROPERTY + Invoke MUIGetExtProperty, hWin, wParam + ret + + .ELSEIF eax == MUI_SETPROPERTY + Invoke MUISetExtProperty, hWin, wParam, lParam + ret + .ENDIF Invoke DefWindowProc, hWin, uMsg, wParam, lParam ret - _MUI_[*PROJECTNAME*]WndProc ENDP - +MUI_ALIGN ;------------------------------------------------------------------------------ ; _MUI_[*PROJECTNAME*]Init - set initial default values ;------------------------------------------------------------------------------ -_MUI_[*PROJECTNAME*]Init PROC PRIVATE hControl:DWORD +_MUI_[*PROJECTNAME*]Init PROC hWin:DWORD LOCAL ncm:NONCLIENTMETRICS LOCAL lfnt:LOGFONT LOCAL hFont:DWORD LOCAL hParent:DWORD LOCAL dwStyle:DWORD - Invoke GetParent, hControl + Invoke GetParent, hWin mov hParent, eax ; get style and check it is our default at least - Invoke GetWindowLong, hControl, GWL_STYLE + Invoke GetWindowLong, hWin, GWL_STYLE mov dwStyle, eax and eax, WS_CHILD or WS_VISIBLE or WS_CLIPCHILDREN .IF eax != WS_CHILD or WS_VISIBLE or WS_CLIPCHILDREN mov eax, dwStyle or eax, WS_CHILD or WS_VISIBLE or WS_CLIPCHILDREN mov dwStyle, eax - Invoke SetWindowLong, hControl, GWL_STYLE, dwStyle + Invoke SetWindowLong, hWin, GWL_STYLE, dwStyle .ENDIF ;PrintDec dwStyle ; Set default initial external property values - Invoke MUISetExtProperty, hControl, @[*PROJECTNAME*]TextColor, MUI_RGBCOLOR(255,255,255) - Invoke MUISetExtProperty, hControl, @[*PROJECTNAME*]BackColor, MUI_RGBCOLOR(21,133,181) + Invoke MUISetExtProperty, hWin, @[*PROJECTNAME*]TextColor, MUI_RGBCOLOR(255,255,255) + Invoke MUISetExtProperty, hWin, @[*PROJECTNAME*]BackColor, MUI_RGBCOLOR(21,133,181) .IF hMUI[*PROJECTNAME*]Font == 0 - mov ncm.cbSize, SIZEOF NONCLIENTMETRICS - Invoke SystemParametersInfo, SPI_GETNONCLIENTMETRICS, SIZEOF NONCLIENTMETRICS, Addr ncm, 0 - Invoke CreateFontIndirect, Addr ncm.lfMessageFont - mov hFont, eax - Invoke GetObject, hFont, SIZEOF lfnt, Addr lfnt - mov lfnt.lfHeight, -12d - mov lfnt.lfWeight, FW_BOLD - Invoke CreateFontIndirect, Addr lfnt + mov ncm.cbSize, SIZEOF NONCLIENTMETRICS + Invoke SystemParametersInfo, SPI_GETNONCLIENTMETRICS, SIZEOF NONCLIENTMETRICS, Addr ncm, 0 + Invoke CreateFontIndirect, Addr ncm.lfMessageFont + mov hFont, eax + Invoke GetObject, hFont, SIZEOF lfnt, Addr lfnt + mov lfnt.lfHeight, -12d + mov lfnt.lfWeight, FW_BOLD + Invoke CreateFontIndirect, Addr lfnt mov hMUI[*PROJECTNAME*]Font, eax Invoke DeleteObject, hFont .ENDIF - Invoke MUISetExtProperty, hControl, @[*PROJECTNAME*]TextFont, hMUI[*PROJECTNAME*]Font + Invoke MUISetExtProperty, hWin, @[*PROJECTNAME*]TextFont, hMUI[*PROJECTNAME*]Font ret - _MUI_[*PROJECTNAME*]Init ENDP +MUI_ALIGN +;------------------------------------------------------------------------------ +; _MUI_[*PROJECTNAME*]Cleanup - cleanup +;------------------------------------------------------------------------------ +_MUI_[*PROJECTNAME*]Cleanup PROC hWin:DWORD + ret +_MUI_[*PROJECTNAME*]Cleanup ENDP + +MUI_ALIGN ;------------------------------------------------------------------------------ ; _MUI_[*PROJECTNAME*]Paint ;------------------------------------------------------------------------------ -_MUI_[*PROJECTNAME*]Paint PROC PRIVATE hWin:DWORD +_MUI_[*PROJECTNAME*]Paint PROC hWin:DWORD LOCAL ps:PAINTSTRUCT LOCAL rect:RECT - LOCAL pt:POINT LOCAL hdc:HDC LOCAL hdcMem:HDC - LOCAL hbmMem:DWORD - LOCAL hBitmap:DWORD - LOCAL hOldBitmap:DWORD - LOCAL hBrush:DWORD - LOCAL hPen:DWORD - LOCAL hOldBrush:DWORD - LOCAL hOldPen:DWORD - LOCAL hFont:DWORD - LOCAL hOldFont:DWORD - LOCAL MouseOver:DWORD - LOCAL TextColor:DWORD + LOCAL hBufferBitmap:DWORD LOCAL BackColor:DWORD - LOCAL hParent:DWORD - LOCAL dwStyle:DWORD + LOCAL BorderColor:DWORD Invoke BeginPaint, hWin, Addr ps mov hdc, eax - + + ;---------------------------------------------------------- + ; Get some property values + ;---------------------------------------------------------- + Invoke MUIGetExtProperty, hWin, @[*PROJECTNAME*]BackColor + mov BackColor, eax + Invoke MUIGetExtProperty, hWin, @[*PROJECTNAME*]BorderColor + mov BorderColor, eax + ;---------------------------------------------------------- ; Setup Double Buffering ;---------------------------------------------------------- - Invoke GetClientRect, hWin, Addr rect - Invoke CreateCompatibleDC, hdc - mov hdcMem, eax - Invoke CreateCompatibleBitmap, hdc, rect.right, rect.bottom - mov hbmMem, eax - Invoke SelectObject, hdcMem, hbmMem - mov hOldBitmap, eax - - ;---------------------------------------------------------- - ; Get some property values - ;---------------------------------------------------------- - ; Use Invoke _MUIGetProperty, hWin, 4, @Property - ; to get property required: text, back, border colors etc - ; save them to local vars for processing later in function - Invoke GetWindowLong, hWin, GWL_STYLE - mov dwStyle, eax + Invoke MUIGDIDoubleBufferStart, hWin, hdc, Addr hdcMem, Addr rect, Addr hBufferBitmap - Invoke MUIGetIntProperty, hWin, @[*PROJECTNAME*]MouseOver - mov MouseOver, eax - Invoke MUIGetExtProperty, hWin, @[*PROJECTNAME*]TextColor ; normal text color - mov TextColor, eax - Invoke MUIGetExtProperty, hWin, @[*PROJECTNAME*]BackColor ; normal back color - mov BackColor, eax - Invoke MUIGetExtProperty, hWin, @[*PROJECTNAME*]TextFont - mov hFont, eax - - ;---------------------------------------------------------- - ; Fill background - ;---------------------------------------------------------- - Invoke SetBkMode, hdcMem, OPAQUE - Invoke SetBkColor, hdcMem, BackColor - Invoke GetStockObject, DC_BRUSH - mov hBrush, eax - Invoke SelectObject, hdcMem, eax - Invoke SetDCBrushColor, hdcMem, BackColor - Invoke FillRect, hdcMem, Addr rect, hBrush + ;---------------------------------------------------------- + ; Paint background + ;---------------------------------------------------------- + Invoke MUIGDIPaintFill, hdcMem, Addr rect, BackColor + + ;---------------------------------------------------------- + ; Paint + ;---------------------------------------------------------- + + ;---------------------------------------------------------- + ; Paint Border + ;---------------------------------------------------------- + Invoke MUIGDIPaintFrame, hdcMem, Addr rect, BorderColor, MUIPFS_ALL + ;---------------------------------------------------------- ; BitBlt from hdcMem back to hdc ;---------------------------------------------------------- Invoke BitBlt, hdc, 0, 0, rect.right, rect.bottom, hdcMem, 0, 0, SRCCOPY ;---------------------------------------------------------- - ; Cleanup - ;---------------------------------------------------------- - Invoke DeleteDC, hdcMem - Invoke DeleteObject, hbmMem - .IF hOldBitmap != 0 - Invoke DeleteObject, hOldBitmap - .ENDIF - .IF hOldFont != 0 - Invoke DeleteObject, hOldFont - .ENDIF - .IF hOldPen != 0 - Invoke DeleteObject, hOldPen - .ENDIF - .IF hOldBrush != 0 - Invoke DeleteObject, hOldBrush - .ENDIF - .IF hPen != 0 - Invoke DeleteObject, hPen - .ENDIF - .IF hBrush != 0 - Invoke DeleteObject, hBrush - .ENDIF + ; Finish Double Buffering & Cleanup + ;---------------------------------------------------------- + Invoke MUIGDIDoubleBufferFinish, hdcMem, hBufferBitmap, 0, 0, 0, 0 Invoke EndPaint, hWin, Addr ps @@ -498,7 +495,7 @@ _MUI_[*PROJECTNAME*]Paint ENDP -END +MODERNUI_LIBEND [*ENDTXT*] [*BEGINTXT*] LibTemplate.inc @@ -506,12 +503,10 @@ LibTemplate.inc ; ; ModernUI Control - [*PROJECTNAME*] ; -; Copyright (c) 2018 by fearless +; Copyright (c) 2023 by fearless ; ; All Rights Reserved ; -; http://www.LetTheLight.in -; ; http://github.com/mrfearless/ModernUI ; ; @@ -543,33 +538,33 @@ LibTemplate.inc ;============================================================================== ;------------------------------------------------------------------------------ -; [*PROJECTNAME*] Prototypes +; ModernUI_[*PROJECTNAME*] Prototypes ;------------------------------------------------------------------------------ -MUI[*PROJECTNAME*]Register PROTO ; Use '[*PROJECTNAME*]' as class in RadASM custom class control -MUI[*PROJECTNAME*]Create PROTO :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD ; hWndParent, lpszText, xpos, ypos, dwWidth, dwHeight, dwResourceID, dwStyle -MUI[*PROJECTNAME*]SetProperty PROTO :DWORD, :DWORD, :DWORD ; h[*PROJECTNAME*], dwProperty, dwPropertyValue -MUI[*PROJECTNAME*]GetProperty PROTO :DWORD, :DWORD ; h[*PROJECTNAME*], dwProperty +MUI[*PROJECTNAME*]Register PROTO ; Use 'ModernUI_[*PROJECTNAME*]' as class in RadASM custom class control +MUI[*PROJECTNAME*]Create PROTO :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD ; hWndParent, lpszText, xpos, ypos, dwWidth, dwHeight, dwResourceID, dwStyle +MUI[*PROJECTNAME*]SetProperty PROTO :DWORD, :DWORD, :DWORD ; hModernUI_[*PROJECTNAME*], dwProperty, dwPropertyValue +MUI[*PROJECTNAME*]GetProperty PROTO :DWORD, :DWORD ; hModernUI_[*PROJECTNAME*], dwProperty ;------------------------------------------------------------------------------ -; [*PROJECTNAME*] Structures +; ModernUI_[*PROJECTNAME*] Structures ;------------------------------------------------------------------------------ .CONST ;------------------------------------------------------------------------------ -; [*PROJECTNAME*] Constants +; ModernUI_[*PROJECTNAME*] Constants ;------------------------------------------------------------------------------ -; [*PROJECTNAME*] Styles +; ModernUI_[*PROJECTNAME*] Styles ;------------------------------------------------------------------------------ -; [*PROJECTNAME*] Properties: Use with MUI[*PROJECTNAME*]SetProperty / MUI[*PROJECTNAME*]GetProperty or MUI_SETPROPERTY / MUI_GETPROPERTY msgs +; ModernUI_[*PROJECTNAME*] Properties: Use with MUI[*PROJECTNAME*]SetProperty / MUI[*PROJECTNAME*]GetProperty or MUI_SETPROPERTY / MUI_GETPROPERTY msgs ;------------------------------------------------------------------------------ -@[*PROJECTNAME*]TextColor EQU 0 ; Text color for caption text and system buttons (min/max/restore/close) -@[*PROJECTNAME*]TextFont EQU 4 ; Font for caption text -@[*PROJECTNAME*]BackColor EQU 8 ; Background color of caption and system buttons - +@[*PROJECTNAME*]TextColor EQU 0 ; Text color of control +@[*PROJECTNAME*]TextFont EQU 4 ; Font for control +@[*PROJECTNAME*]BackColor EQU 8 ; Background color of control +@[*PROJECTNAME*]BorderColor EQU 12 ; Border color of control @@ -583,74 +578,7 @@ MUI[*PROJECTNAME*]GetProperty PROTO :DWORD, :DWORD ; h[*PROJECTNAME* [*ENDTXT*] [*BEGINTXT*] -Notes.txt -========================================================================================= -[*PROJECTNAME*] Notes -========================================================================================= - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +LibTemplate.h @@ -663,78 +591,60 @@ Notes.txt [*ENDTXT*] [*BEGINTXT*] -Distribution\Readme.txt -========================================================================================= - - README & LICENSE - - ModernUI Control [*PROJECTNAME*] - -; Copyright (c) 2016 by fearless +masmApiCall.api.txt +;------------------------------------------------------------------------------ +; ModernUI_[*PROJECTNAME*] Control ; -; All Rights Reserved +; http://github.com/mrfearless/ModernUI ; -; http://www.LetTheLight.in +; Paste this text at the end of \Radasm\Masm\masmApiCall.api to add to Radasm ; -; http://github.com/mrfearless/ModernUI - - This software is provided 'as-is', without any express or implied warranty. In no - event will the author be held liable for any damages arising from the use of this - software. - - Permission is granted to anyone to use this software for any non-commercial program. - If you use the library in an application, an acknowledgement in the application or - documentation is appreciated but not required. - - You are allowed to make modifications to the source code, but you must leave the - original copyright notices intact and not misrepresent the origin of the software. - It is not allowed to claim you wrote the original software. Modified files must have - a clear notice that the files are modified, and not in the original state. This includes - the name of the person(s) who modified the code. - - If you want to distribute or redistribute any portion of this package, you will need - to include the full package in it's original state, including this license and all - the copyrights. - - While distributing this package (in it's original state) is allowed, it is not allowed - to charge anything for this. You may not sell or include the package in any commercial - package without having permission of the author. Neither is it allowed to redistribute - any of the package's components with commercial applications. - - Special thanks to: - - +;------------------------------------------------------------------------------ -========================================================================================= - ---------------------------------------------------------------------------------------- - OVERVIEW - ---------------------------------------------------------------------------------------- +[*ENDTXT*] +[*BEGINTXT*] +masmApiConst.api.txt +;------------------------------------------------------------------------------ +; ModernUI_[*PROJECTNAME*] Control +; +; http://github.com/mrfearless/ModernUI +; +; Paste this text at the end of \Radasm\Masm\masmApiConst.api to add to Radasm +; +;------------------------------------------------------------------------------ - ---------------------------------------------------------------------------------------- - HISTORY - ---------------------------------------------------------------------------------------- - - v1.0.0.0 - -------- - Release - First release +[*ENDTXT*] +[*BEGINTXT*] +masmApiStruct.api.txt +;------------------------------------------------------------------------------ +; ModernUI_[*PROJECTNAME*] Control +; +; http://github.com/mrfearless/ModernUI +; +; Paste this text at the end of \Radasm\Masm\masmApiStruct.api to add to Radasm +; +;------------------------------------------------------------------------------ - ---------------------------------------------------------------------------------------- - HOW TO USE - ---------------------------------------------------------------------------------------- +[*ENDTXT*] +[*BEGINTXT*] +masmMessage.api.txt +;------------------------------------------------------------------------------ +; ModernUI_[*PROJECTNAME*] Control +; +; http://github.com/mrfearless/ModernUI +; +; Paste this text at the end of \Radasm\Masm\masmMessage.api to add to Radasm +; +;------------------------------------------------------------------------------ - ---------------------------------------------------------------------------------------- - NOTES - ---------------------------------------------------------------------------------------- - -========================================================================================= [*ENDTXT*] [*ENDPRO*] [*BEGINTXT*] @@ -775,14 +685,14 @@ echo.Finished Help\Lib Help\!SkinSubFolder!\Default\Default.skn - - Default - Contents - font-family:Arial font-size:8pt font-weight:normal font-style:normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal - - - - + Default + Contents + font-family:Arial font-size:8pt font-weight:normal font-style:normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal + + + + @@ -794,257 +704,257 @@ Help\Lib Help\!SkinSubFolder!\Default\Default.skn ]]> - - - - - - - - - - - - - - background:#99ccff - font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Black - - background:#639ace - font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:White - - left - - Contents - ::??DefaultWebSkinText??:: - - - default - - - - default - - - - - Index - ::??DefaultWebSkinText??:: - - - default - - - - default - - - - - Search - ::??DefaultWebSkinText??:: - - - default - - - - default - - - - - Glossary - ::??DefaultWebSkinText??:: - - - default - - - - default - - - - - WebSearch - ::??DefaultWebSkinText??:: - - - default - - - - default - - - - - Search Input - - - - - <text></text> - - - - - About - - Macromedia - - - - - Macromedia - Copyright © 1992 - 2004, eHelp Corporation - http://www.ehelp.com - - - - - - - - - background:#99ccff - font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Black - - background:#639ace - font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:White - - - Previous - ::??DefaultWebSkinText??:: - - - default - - - - default - - - - - Next - ::??DefaultWebSkinText??:: - - - default - - - - default - - - - - Sync TOC - ::??DefaultWebSkinText??:: - - - default - - - - default - - - - - Hide - ::??DefaultWebSkinText??:: - - - default - - - - default - - - - - - - - - - - background:White alink:Silver hover-color:Navy - font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Black - - - - background:White alink:Silver hover-color:Navy - font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Black - - - background:White - - - <text>::??DefaultWebSkinText??::</text> - <font>font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Navy</font> - - - - - - - background:White alink:Silver hover-color:Navy - font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Black - - - background:White - - - <text>::??DefaultWebSkinText??::</text> - <font>font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Navy</font> - - - - - - - background:White alink:Silver hover-color:Navy - font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Black - - ::??DefaultWebSkinText??:: - font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Navy - background:White - - - - ::??DefaultWebSkinText??:: - - - - - ::??DefaultWebSkinText??:: - font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Navy - background:White - - - - ::??DefaultWebSkinText??:: - - - - - - - - none - - + + + + + + + + + + + + + + background:#99ccff + font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Black + + background:#639ace + font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:White + + left + + Contents + ::??DefaultWebSkinText??:: + + + default + + + + default + + + + + Index + ::??DefaultWebSkinText??:: + + + default + + + + default + + + + + Search + ::??DefaultWebSkinText??:: + + + default + + + + default + + + + + Glossary + ::??DefaultWebSkinText??:: + + + default + + + + default + + + + + WebSearch + ::??DefaultWebSkinText??:: + + + default + + + + default + + + + + Search Input + + + + + <text></text> + + + + + About + + Macromedia + + + + + Macromedia + Copyright © 1992 - 2004, eHelp Corporation + http://www.ehelp.com + + + + + + + + + background:#99ccff + font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Black + + background:#639ace + font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:White + + + Previous + ::??DefaultWebSkinText??:: + + + default + + + + default + + + + + Next + ::??DefaultWebSkinText??:: + + + default + + + + default + + + + + Sync TOC + ::??DefaultWebSkinText??:: + + + default + + + + default + + + + + Hide + ::??DefaultWebSkinText??:: + + + default + + + + default + + + + + + + + + + + background:White alink:Silver hover-color:Navy + font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Black + + + + background:White alink:Silver hover-color:Navy + font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Black + + + background:White + + + <text>::??DefaultWebSkinText??::</text> + <font>font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Navy</font> + + + + + + + background:White alink:Silver hover-color:Navy + font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Black + + + background:White + + + <text>::??DefaultWebSkinText??::</text> + <font>font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Navy</font> + + + + + + + background:White alink:Silver hover-color:Navy + font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Black + + ::??DefaultWebSkinText??:: + font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Navy + background:White + + + + ::??DefaultWebSkinText??:: + + + + + ::??DefaultWebSkinText??:: + font-family:Tahoma font-size:8pt font-weight:Normal font-style:Normal text-decoration:none font-sizeadjust:none font-stretch:normal font-variant:normal font-color:Navy + background:White + + + + ::??DefaultWebSkinText??:: + + + + + + + + none + + [*ENDTXT*] [*BEGINBIN*] @@ -1094,281 +1004,281 @@ Help\Lib Help\Code Function.htt

Code + margin-top: 6px; + margin-bottom: 6px;">Code Function

 

+ font-size: 10pt; + margin-top: 6px; + margin-bottom: 6px;"> 

Function Overview

+ font-size: 10pt; + margin-top: 6px; + margin-bottom: 6px;">Function Overview

 

+ font-size: 10pt; + margin-top: 6px; + margin-bottom: 6px;"> 

Syntax

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-weight: bold;">Syntax

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

Parameters

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-weight: bold;">Parameters

+ style="x-cell-content-align: top; + margin-left: 40px; + left: 0px; + top: 225px; + width: 91%; + border-spacing: 0px; + border-spacing: 0px;" + cellspacing=0 + width=91%> + valign=top> + valign=top> + font-size: 10pt; + font-weight: bold;"> 
+ padding-right: 10px; + padding-left: 10px; + border-left-color: #ffffff; + border-left-style: Solid; + border-top-style: Solid; + border-top-color: #ffffff; + border-right-color: #ffffff; + border-right-style: Solid; + border-bottom-style: Solid; + border-bottom-color: #ffffff; + border-bottom-width: 2px; + border-right-width: 2px; + border-left-width: 2px; + border-top-width: 2px; + background-color: #e4e4e4;" + bgcolor=#E4E4E4 + width=25.862%>

 

+ padding-right: 10px; + padding-left: 10px; + border-top-style: Solid; + border-top-color: #ffffff; + border-right-color: #ffffff; + border-right-style: Solid; + border-bottom-style: Solid; + border-bottom-color: #ffffff; + border-bottom-width: 2px; + border-top-width: 2px; + border-right-width: 2px; + background-color: #e4e4e4;" + bgcolor=#E4E4E4 + width=74.138%>

 

+ padding-right: 10px; + padding-left: 10px; + border-left-color: #ffffff; + border-left-style: Solid; + border-right-color: #ffffff; + border-right-style: Solid; + border-bottom-style: Solid; + border-bottom-color: #ffffff; + border-right-width: 2px; + border-left-width: 2px; + border-bottom-width: 2px; + background-color: #e4e4e4;" + bgcolor=#E4E4E4 + width=25.862%>

 

+ padding-right: 10px; + padding-left: 10px; + border-right-color: #ffffff; + border-right-style: Solid; + border-bottom-style: Solid; + border-bottom-color: #ffffff; + border-bottom-width: 2px; + border-right-width: 2px; + background-color: #e4e4e4;" + bgcolor=#E4E4E4 + width=74.138%>

 

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

Details

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-weight: bold;">Details

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

Return Values

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-weight: bold;">Return Values

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

Notes

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-weight: bold;">Notes

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

See Also

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-weight: bold;">See Also

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

 

+ margin-bottom: 6px; + font-family: Verdana, sans-serif; + font-size: 10pt; + margin-left: 40px;"> 

@@ -1383,168 +1293,168 @@ Help\Lib Help\default.css /*=(===============================================================)*/ BODY { - font-family: Arial; - background-color: #ffffff; + font-family: Arial; + background-color: #ffffff; } H1 { - font-weight: bold; - font-size: 16pt; + font-weight: bold; + font-size: 16pt; } /*=(Generated Code)=================================================*/ /*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ /*begin!kadov{{=====================================================*/ LI.kadov-H1 { - font-weight: bold; - font-size: 16pt; + font-weight: bold; + font-size: 16pt; } /*}}end!kadov=======================================================*/ H2 { - font-weight: bold; - font-size: 18.0pt; + font-weight: bold; + font-size: 18.0pt; } /*=(Generated Code)=================================================*/ /*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ /*begin!kadov{{=====================================================*/ LI.kadov-H2 { - font-weight: bold; - font-size: 18.0pt; + font-weight: bold; + font-size: 18.0pt; } /*}}end!kadov=======================================================*/ H3 { - font-weight: bold; - font-size: 14.0pt; + font-weight: bold; + font-size: 14.0pt; } /*=(Generated Code)=================================================*/ /*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ /*begin!kadov{{=====================================================*/ LI.kadov-H3 { - font-weight: bold; - font-size: 14.0pt; + font-weight: bold; + font-size: 14.0pt; } /*}}end!kadov=======================================================*/ H4 { - font-weight: bold; - font-size: 12.0pt; + font-weight: bold; + font-size: 12.0pt; } /*=(Generated Code)=================================================*/ /*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ /*begin!kadov{{=====================================================*/ LI.kadov-H4 { - font-weight: bold; - font-size: 12.0pt; + font-weight: bold; + font-size: 12.0pt; } /*}}end!kadov=======================================================*/ H5 { - font-weight: bold; - font-size: 10.0pt; + font-weight: bold; + font-size: 10.0pt; } /*=(Generated Code)=================================================*/ /*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ /*begin!kadov{{=====================================================*/ LI.kadov-H5 { - font-weight: bold; - font-size: 10.0pt; + font-weight: bold; + font-size: 10.0pt; } /*}}end!kadov=======================================================*/ H6 { - font-weight: bold; - font-size: 8.0pt; + font-weight: bold; + font-size: 8.0pt; } /*=(Generated Code)=================================================*/ /*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ /*begin!kadov{{=====================================================*/ LI.kadov-H6 { - font-weight: bold; - font-size: 8.0pt; + font-weight: bold; + font-size: 8.0pt; } /*}}end!kadov=======================================================*/ P { - font-size: 12.0pt; - margin-top: 0pt; - margin-bottom: 0pt; + font-size: 12.0pt; + margin-top: 0pt; + margin-bottom: 0pt; } /*=(Generated Code)=================================================*/ /*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ /*begin!kadov{{=====================================================*/ LI.kadov-P { - font-size: 12.0pt; + font-size: 12.0pt; } /*}}end!kadov=======================================================*/ A.expandspot { - color: #008000; - cursor: hand; - font-style: italic; - x-text-underline: off; - x-text-overline: off; - x-text-line-through: off; - /*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ + color: #008000; + cursor: hand; + font-style: italic; + x-text-underline: off; + x-text-overline: off; + x-text-line-through: off; + /*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ } SPAN.expandtext { - font-style: italic; - font-weight: normal; - color: #ff0000; + font-style: italic; + font-weight: normal; + color: #ff0000; } A.dropspot { - cursor: hand; - color: #008000; - font-style: italic; - x-text-underline: off; - x-text-overline: off; - x-text-line-through: off; - /*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ + cursor: hand; + color: #008000; + font-style: italic; + x-text-underline: off; + x-text-overline: off; + x-text-line-through: off; + /*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ } A.glossterm { - color: #800000; - cursor: hand; - font-style: italic; - x-text-underline: off; - x-text-overline: off; - x-text-line-through: off; - /*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ + color: #800000; + cursor: hand; + font-style: italic; + x-text-underline: off; + x-text-overline: off; + x-text-line-through: off; + /*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ } SPAN.glosstext { - font-style: italic; - font-weight: normal; - color: #0000ff; + font-style: italic; + font-weight: normal; + color: #0000ff; } OL, UL { - margin-top: 0px; - margin-bottom: 0px; + margin-top: 0px; + margin-bottom: 0px; } @@ -1591,63 +1501,63 @@ Help\Lib Help\Default.htt

Default

+ margin-top: 6px; + margin-bottom: 6px;">Default

This is placeholder text for your template. + margin-top: 6px; + margin-bottom: 6px; + font-size: 10pt;">This is placeholder text for your template. To add content to the body, replace this text. To add a header or footer, click the Header or Footer button on the toolbar.

 

+ margin-top: 6px; + margin-bottom: 6px; + font-size: 10pt;"> 

The heading in this template is a special + margin-top: 6px; + margin-bottom: 6px; + font-size: 10pt;">The heading in this template is a special field for topic titles, so generally you do not need to edit it.

 

+ margin-top: 6px; + margin-bottom: 6px; + font-size: 10pt;"> 

For information about applying templates + margin-top: 6px; + margin-bottom: 6px; + font-size: 10pt;">For information about applying templates to topics, press F1.

@@ -1689,192 +1599,192 @@ var HH_ActiveX = true; //Begin to support previous generic parameters //Get the information about the browser. -var gstrBsAgent = navigator.userAgent.toLowerCase(); -var gnBsVer = parseInt(navigator.appVersion); +var gstrBsAgent = navigator.userAgent.toLowerCase(); +var gnBsVer = parseInt(navigator.appVersion); -var gbBsOpera = (gstrBsAgent.indexOf('opera') != -1); -var gbBsKonqueror = (gstrBsAgent.indexOf('konqueror') != -1); -var gbBsSafari = (gstrBsAgent.indexOf('safari') != -1); -var gbBsIE = (gstrBsAgent.indexOf('msie') != -1) && !gbBsOpera && !gbBsKonqueror && !gbBsSafari; -var gbBsNS = (gstrBsAgent.indexOf('mozilla') != -1) && ((gstrBsAgent.indexOf('spoofer') == -1) && (gstrBsAgent.indexOf('compatible') == -1)) && !gbBsOpera && !gbBsKonqueror && !gbBsSafari; +var gbBsOpera = (gstrBsAgent.indexOf('opera') != -1); +var gbBsKonqueror = (gstrBsAgent.indexOf('konqueror') != -1); +var gbBsSafari = (gstrBsAgent.indexOf('safari') != -1); +var gbBsIE = (gstrBsAgent.indexOf('msie') != -1) && !gbBsOpera && !gbBsKonqueror && !gbBsSafari; +var gbBsNS = (gstrBsAgent.indexOf('mozilla') != -1) && ((gstrBsAgent.indexOf('spoofer') == -1) && (gstrBsAgent.indexOf('compatible') == -1)) && !gbBsOpera && !gbBsKonqueror && !gbBsSafari; -var gbBsMac = (gstrBsAgent.indexOf('mac') != -1); -var gbBsWindows = ((gstrBsAgent.indexOf('win') != -1) || (gstrBsAgent.indexOf('16bit') != -1)); -var gbBsSunOS = (gstrBsAgent.indexOf("sunos") != -1); +var gbBsMac = (gstrBsAgent.indexOf('mac') != -1); +var gbBsWindows = ((gstrBsAgent.indexOf('win') != -1) || (gstrBsAgent.indexOf('16bit') != -1)); +var gbBsSunOS = (gstrBsAgent.indexOf("sunos") != -1); -var gbBsIE3Before = ((gbBsIE) && (gnBsVer <= 2)); -var gbBsNS3Before = ((gbBsNS) && (gnBsVer <= 3)); +var gbBsIE3Before = ((gbBsIE) && (gnBsVer <= 2)); +var gbBsNS3Before = ((gbBsNS) && (gnBsVer <= 3)); -var gbBsNS2 = ((gbBsNS) && (gnBsVer <= 2)); -var gbBsNS3 = ((gbBsNS) && (gnBsVer == 3)); -var gbBsIE300301 = ((gbBsIE) && (gnBsVer == 2) && ((gstrBsAgent.indexOf("3.00") != -1)||(gstrBsAgent.indexOf("3.0a") != -1)||(gstrBsAgent.indexOf("3.0b")!=-1)||(gstrBsAgent.indexOf("3.01")!=-1))); -var gbBsIE302 = ((gbBsIE) && (gnBsVer == 2) && (gstrBsAgent.indexOf("3.02") != -1)); +var gbBsNS2 = ((gbBsNS) && (gnBsVer <= 2)); +var gbBsNS3 = ((gbBsNS) && (gnBsVer == 3)); +var gbBsIE300301 = ((gbBsIE) && (gnBsVer == 2) && ((gstrBsAgent.indexOf("3.00") != -1)||(gstrBsAgent.indexOf("3.0a") != -1)||(gstrBsAgent.indexOf("3.0b")!=-1)||(gstrBsAgent.indexOf("3.01")!=-1))); +var gbBsIE302 = ((gbBsIE) && (gnBsVer == 2) && (gstrBsAgent.indexOf("3.02") != -1)); -var gbBsNS4 = ((gbBsNS) && (gnBsVer >= 4)); -var gbBsNS6 = ((gbBsNS) && (gnBsVer >= 5)); -var gbBsNS7 = false; +var gbBsNS4 = ((gbBsNS) && (gnBsVer >= 4)); +var gbBsNS6 = ((gbBsNS) && (gnBsVer >= 5)); +var gbBsNS7 = false; -var gbBsIE4 = ((gbBsIE) && (gnBsVer >= 4)); -var gbBsIE5 = false; -var gbBsIE55 = false; +var gbBsIE4 = ((gbBsIE) && (gnBsVer >= 4)); +var gbBsIE5 = false; +var gbBsIE55 = false; -var gbBsOpera6 = false; -var gbBsOpera7 = false; +var gbBsOpera6 = false; +var gbBsOpera7 = false; -var gbBsKonqueror3 = false; +var gbBsKonqueror3 = false; gbBsIE = (navigator.appName.indexOf("Microsoft") != -1) && !gbBsOpera && !gbBsKonqueror && !gbBsSafari;; if (gbBsIE) { - if (parseInt(navigator.appVersion) >= 4) { - gbBsIE4 = true; - if (gbBsIE4) { - var nPos = gstrBsAgent.indexOf("msie"); - var strIEversion = gstrBsAgent.substring(nPos + 5); - var nVersion = parseFloat(strIEversion); - if (nVersion >= 5) - gbBsIE5 = true; - if (nVersion >= 5.5) - gbBsIE55 = true; - } - } + if (parseInt(navigator.appVersion) >= 4) { + gbBsIE4 = true; + if (gbBsIE4) { + var nPos = gstrBsAgent.indexOf("msie"); + var strIEversion = gstrBsAgent.substring(nPos + 5); + var nVersion = parseFloat(strIEversion); + if (nVersion >= 5) + gbBsIE5 = true; + if (nVersion >= 5.5) + gbBsIE55 = true; + } + } } if (gbBsNS6) { - var nPos=gstrBsAgent.indexOf("gecko"); - if(nPos!=-1) - { - var nPos2=gstrBsAgent.indexOf("/", nPos); - if(nPos2!=-1) - { - var nVersion=parseFloat(gstrBsAgent.substring(nPos2+1)); - if (nVersion>=20020823) - gbBsNS7=true; - } - } + var nPos=gstrBsAgent.indexOf("gecko"); + if(nPos!=-1) + { + var nPos2=gstrBsAgent.indexOf("/", nPos); + if(nPos2!=-1) + { + var nVersion=parseFloat(gstrBsAgent.substring(nPos2+1)); + if (nVersion>=20020823) + gbBsNS7=true; + } + } } if (gbBsOpera) { - var nPos = gstrBsAgent.indexOf("opera"); - if(nPos!=-1) - { - var nVersion = parseFloat(gstrBsAgent.substring(nPos+6)); - if (nVersion >= 6) - { - gbBsOpera6=true; - if (nVersion >=7) - gbBsOpera7=true; - } - } + var nPos = gstrBsAgent.indexOf("opera"); + if(nPos!=-1) + { + var nVersion = parseFloat(gstrBsAgent.substring(nPos+6)); + if (nVersion >= 6) + { + gbBsOpera6=true; + if (nVersion >=7) + gbBsOpera7=true; + } + } } if (gbBsKonqueror) { - var nPos = gstrBsAgent.indexOf("konqueror"); - if(nPos!=-1) - { - var nVersion = parseFloat(gstrBsAgent.substring(nPos+10)); - if (nVersion >= 3) - { - gbBsKonqueror3=true; - } - } + var nPos = gstrBsAgent.indexOf("konqueror"); + if(nPos!=-1) + { + var nVersion = parseFloat(gstrBsAgent.substring(nPos+10)); + if (nVersion >= 3) + { + gbBsKonqueror3=true; + } + } } function insertAdjacentHTML(obj, where, htmlStr) { - if (gbBsIE || gbBsOpera7) - { - obj.insertAdjacentHTML(where, htmlStr); - } - else if (gbBsNS6 || gbBsSafari) - { - var r = obj.ownerDocument.createRange(); - r.setStartBefore(obj); - var parsedHTML = r.createContextualFragment(htmlStr); - - switch (where){ - case 'beforeBegin': - obj.parentNode.insertBefore(parsedHTML,obj); - break; - case 'afterBegin': - obj.insertBefore(parsedHTML,obj.firstChild); - break; - case 'beforeEnd': - obj.appendChild(parsedHTML); - break; - case 'afterEnd': - if (obj.nextSibling){ - obj.parentNode.insertBefore(parsedHTML,obj.nextSibling); - } else { - obj.parentNode.appendChild(parsedHTML); - } - break; - } - } + if (gbBsIE || gbBsOpera7) + { + obj.insertAdjacentHTML(where, htmlStr); + } + else if (gbBsNS6 || gbBsSafari) + { + var r = obj.ownerDocument.createRange(); + r.setStartBefore(obj); + var parsedHTML = r.createContextualFragment(htmlStr); + + switch (where){ + case 'beforeBegin': + obj.parentNode.insertBefore(parsedHTML,obj); + break; + case 'afterBegin': + obj.insertBefore(parsedHTML,obj.firstChild); + break; + case 'beforeEnd': + obj.appendChild(parsedHTML); + break; + case 'afterEnd': + if (obj.nextSibling){ + obj.parentNode.insertBefore(parsedHTML,obj.nextSibling); + } else { + obj.parentNode.appendChild(parsedHTML); + } + break; + } + } } // Utilities functions. function BsscHasExtJs() { - if( gbBsIE3Before || gbBsNS3Before) - return false; - return true; + if( gbBsIE3Before || gbBsNS3Before) + return false; + return true; } // Register event handler -var gBsOnLoads = new Array(); // An array holds all the onload event handler. -var gBsOnClicks = new Array(); // An array holds all the onClick event handler. -var gBsOnUnLoads = new Array(); // An array holds all the OnUnLoad event handler. -var gBsOnMouseOvers = new Array(); // An array holds all the OnMouseOver event handler. -var gBsOnMouseOuts = new Array(); // An array holds all the OnMouseOut event handler. +var gBsOnLoads = new Array(); // An array holds all the onload event handler. +var gBsOnClicks = new Array(); // An array holds all the onClick event handler. +var gBsOnUnLoads = new Array(); // An array holds all the OnUnLoad event handler. +var gBsOnMouseOvers = new Array(); // An array holds all the OnMouseOver event handler. +var gBsOnMouseOuts = new Array(); // An array holds all the OnMouseOut event handler. var gbOrignalOnMouseDown = null; function BsscRegisterOnLoad(funcHandler) { - var nLength = gBsOnLoads.length; - gBsOnLoads[nLength] = funcHandler; + var nLength = gBsOnLoads.length; + gBsOnLoads[nLength] = funcHandler; } function BsscRegisterOnClick(funcHandler) { - var nLength = gBsOnClicks.length; - gBsOnClicks[nLength] = funcHandler; + var nLength = gBsOnClicks.length; + gBsOnClicks[nLength] = funcHandler; } function BsscRegisterOnUnLoad(funcHandler) { - var nLength = gBsOnUnLoads.length; - gBsOnUnLoads[nLength] = funcHandler; + var nLength = gBsOnUnLoads.length; + gBsOnUnLoads[nLength] = funcHandler; } function BsscRegisterOnMouseOver(funcHandler) { - var nLength = gBsOnMouseOvers.length; - gBsOnMouseOvers[nLength] = funcHandler; + var nLength = gBsOnMouseOvers.length; + gBsOnMouseOvers[nLength] = funcHandler; } function BsscRegisterOnMouseOut(funcHandler) { - var nLength = gBsOnMouseOuts.length; - gBsOnMouseOuts[nLength] = funcHandler; + var nLength = gBsOnMouseOuts.length; + gBsOnMouseOuts[nLength] = funcHandler; } function BsGeneralOnLoad() { - if (!gbBsIE4 && !gbBsNS4) - return; + if (!gbBsIE4 && !gbBsNS4) + return; - // Make everything visible in navigator - if (gbBsNS4 && !gbBsNS6) { - // Make some special effects items visible - for (var iLayer = 0; iLayer < document.layers.length; iLayer++) { - document.layers[iLayer].visibility = "show"; - document.layers[iLayer].left = 0; - } - } + // Make everything visible in navigator + if (gbBsNS4 && !gbBsNS6) { + // Make some special effects items visible + for (var iLayer = 0; iLayer < document.layers.length; iLayer++) { + document.layers[iLayer].visibility = "show"; + document.layers[iLayer].left = 0; + } + } } // If resize the netscape browser, need to reload it. @@ -1888,80 +1798,80 @@ function BsReDo() // The following functions are used by the html files. function BSSCOnLoad() { - if( !BsscHasExtJs() ) - return; - for (var nElement = gBsOnLoads.length - 1; nElement >= 0; nElement--) - gBsOnLoads[nElement](); + if( !BsscHasExtJs() ) + return; + for (var nElement = gBsOnLoads.length - 1; nElement >= 0; nElement--) + gBsOnLoads[nElement](); } function BSSCOnClick() { - if (!BsscHasExtJs()) return; - - for (var nElement = gBsOnClicks.length - 1; nElement >= 0; nElement--) - gBsOnClicks[nElement](); + if (!BsscHasExtJs()) return; + + for (var nElement = gBsOnClicks.length - 1; nElement >= 0; nElement--) + gBsOnClicks[nElement](); } function BSSCOnUnload() { - if (!BsscHasExtJs()) return; - for (var nElement = gBsOnUnLoads.length - 1; nElement >= 0; nElement--) - gBsOnUnLoads[nElement](); + if (!BsscHasExtJs()) return; + for (var nElement = gBsOnUnLoads.length - 1; nElement >= 0; nElement--) + gBsOnUnLoads[nElement](); } function BSSCOnMouseOver() { - if (!BsscHasExtJs()) return; - for (var nElement = gBsOnMouseOvers.length - 1; nElement >= 0; nElement--) - gBsOnMouseOvers[nElement](); + if (!BsscHasExtJs()) return; + for (var nElement = gBsOnMouseOvers.length - 1; nElement >= 0; nElement--) + gBsOnMouseOvers[nElement](); } function BSSCOnMouseOut() { - if (!BsscHasExtJs()) return; - for (var nElement = gBsOnMouseOuts.length - 1; nElement >= 0; nElement--) - { - gBsOnMouseOuts[nElement](); - } + if (!BsscHasExtJs()) return; + for (var nElement = gBsOnMouseOuts.length - 1; nElement >= 0; nElement--) + { + gBsOnMouseOuts[nElement](); + } } // End of invocation of the event handle functions. // Add the GereralOnLoad to the onload array. if (typeof(BsscRegisterOnLoad) != "undefined") { - BsscRegisterOnLoad(BsGeneralOnLoad); + BsscRegisterOnLoad(BsGeneralOnLoad); } if (gbBsNS4&&!gbBsNS6) { - origWidth = innerWidth; - origHeight = innerHeight; - onresize = BsReDo; + origWidth = innerWidth; + origHeight = innerHeight; + onresize = BsReDo; } //End to support previous generic parameters //Begin to support previous HHActiveX invoking function BsHHActivateComponents() { - if( HH_ActiveX && (HH_ChmFilename != "") && ((self == top) || (self == top.frames[0]))) - { - var objBody = getElementsByTag(document,"BODY")[0]; - if( typeof(objBody) == "object" ) - { - insertAdjacentHTML(objBody, "beforeEnd", ''); - if (HHComponentActivator.object) - HHComponentActivator.Activate(HH_ChmFilename, HH_WindowName, HH_GlossaryFont, HH_Glossary, HH_Avenue); - } - } + if( HH_ActiveX && (HH_ChmFilename != "") && ((self == top) || (self == top.frames[0]))) + { + var objBody = getElementsByTag(document,"BODY")[0]; + if( typeof(objBody) == "object" ) + { + insertAdjacentHTML(objBody, "beforeEnd", ''); + if (HHComponentActivator.object) + HHComponentActivator.Activate(HH_ChmFilename, HH_WindowName, HH_GlossaryFont, HH_Glossary, HH_Avenue); + } + } } function BsHHActivXOnLoad() -{ - if( gbBsIE4 ) - BsHHActivateComponents(); +{ + if( gbBsIE4 ) + BsHHActivateComponents(); } if( typeof(BsscRegisterOnLoad) != "undefined" ) { - BsscRegisterOnLoad(BsHHActivXOnLoad); + BsscRegisterOnLoad(BsHHActivXOnLoad); } //End to support previous HHActiveX invoking @@ -1981,473 +1891,473 @@ var gOlddocumentClick = null; var g_bIsPopupMenuInit = false; function _WritePopupMenuLayer() { - if (!g_bIsPopupMenuInit) + if (!g_bIsPopupMenuInit) { - if (gbBsNS4&&!gbBsNS6) { + if (gbBsNS4&&!gbBsNS6) { //Do not try to write ininle styles for NS! NS can not handle it and will not stop downloading the html page... - document.write("
"); - } else{ - document.write(""); - if (!(gbBsNS4&&!gbBsNS6)) { - document.write(""); - } + document.write("
"); + } else{ + document.write(""); + if (!(gbBsNS4&&!gbBsNS6)) { + document.write(""); + } } - g_bIsPopupMenuInit = true; - } + g_bIsPopupMenuInit = true; + } } //Seek for the bsscright frame function _SeekFrameByName( cRoot, strName ) { - if( cRoot == null ) return null; - if( cRoot.frames == null ) return null; - if( cRoot.frames[strName] != null ) return cRoot.frames[strName]; - for (var i=0; i'; - } else { - strMenu += '' + gbPopupMenuTopicList[fn_arguments[i]].strTitle + ''; - } - strMenu += ''; - - if (isNaN(fn_arguments[i]) || (gbPopupMenuTopicList == null)) { - i += 2; - } else { - i += 1; - } - } - strMenu += ""; - - if (gbBsMac) { - // totally hack. because ie5 in mac need something. is one of them. mac is mad. - strMenu +="
"; - } - - var layerPopup = null; - var stylePopup = null; - var nEventX = 0; - var nEventY = 0; - var nWindowWidth = 0; - if (gbBsIE4 || gbBsOpera7) { - - layerPopup = getElement("PopupMenu"); - layerPopup.innerHTML = strMenu; - stylePopup = layerPopup.style; - - _BSPSGetClientSize(); - - // Get the position of the item causing the event (relative to its parent) - nEventX = window.event.clientX; - nEventY = window.event.clientY; - - if (nEventY + layerPopup.scrollHeight + 10 < gBsClientHeight) { - nEventY += document.body.scrollTop + 10; - } else { - nEventY = (document.body.scrollTop + gBsClientHeight) - layerPopup.scrollHeight - 20; - } - stylePopup.top = nEventY; - - var nPopupWidth = layerPopup.scrollWidth; - if (gbBsMac) { - nPopupWidth = 80; // we have no idea how to get the dynamic width of the popup. - } - if (nEventX + nPopupWidth + 20 > gBsClientWidth) { - if (gBsClientWidth - nPopupWidth < 5) { - stylePopup.left = 5; - } else { - stylePopup.left = gBsClientWidth - nPopupWidth - 5; - } - } else { - stylePopup.left = nEventX + document.body.scrollLeft + 20; - } - - stylePopup.visibility = "visible"; - if (!gOlddocumentClick && document.onclick) - gOlddocumentClick = document.onclick; - document.onclick = PopupMenu_HandleClick; - - } else if (gbBsNS6 || gbBsKonqueror3||gbBsSafari) { - layerPopup = getElement("PopupMenu"); - layerPopup.style.visibility = "hidden"; - - if (gbBsNS6) - { - var e = fn_arguments[0]; - nEventX = e.pageX; - nEventY = e.pageY; - } - else - { - nEventX = window.event.clientX; - nEventY = window.event.clientY; - } - _BSPSGetClientSize(); - layerPopup.innerHTML = strMenu; - - if (nEventY + layerPopup.offsetHeight + 20 < window.pageYOffset + gBsClientHeight) { - nEventY += 20; - } else { - nEventY = gBsClientHeight + window.pageYOffset - layerPopup.offsetHeight - 20; - } - - if (nEventX + layerPopup.offsetWidth + 20 > gBsClientWidth + window.pageXOffset) { - if (gBsClientWidth + window.pageXOffset - layerPopup.offsetWidth < 20) { - nEventX = 5; - } else { - nEventX = gBsClientWidth + window.pageXOffset - layerPopup.offsetWidth - 20; - } - } else { - nEventX += 20; - } - layerPopup.style.top = nEventY; - layerPopup.style.left = nEventX; - // set again to avoid the stupid frash in netscape 6. - layerPopup.innerHTML = strMenu; - layerPopup.style.visibility = "visible"; - //window.captureEvents(Event.MOUSEDOWN); - if (!gOlddocumentClick && document.onclick) - gOlddocumentClick = document.onclick; - window.onclick = PopupMenu_HandleClick; - } - else if (gbBsNS4) { - layerPopup = document.layers.PopupMenu; - layerPopup.visibility = "hide"; - stylePopup = layerPopup.document; - stylePopup.write(strMenu); - stylePopup.close(); - var e = fn_arguments[0]; - nEventX = e.pageX; - nEventY = e.pageY; - _BSPSGetClientSize(); - if (nEventY + layerPopup.clip.height + 20 < window.pageYOffset + gBsClientHeight) { - nEventY += 20; - } else { - nEventY = gBsClientHeight + window.pageYOffset- layerPopup.clip.height - 20; - } - layerPopup.top = nEventY; - - if (nEventX + layerPopup.clip.width + 20 > gBsClientWidth + window.pageXOffset) { - if (gBsClientWidth + window.pageXOffset - layerPopup.clip.width < 20) { - nEventX = 5; - } else { - nEventX = gBsClientWidth + window.pageXOffset - layerPopup.clip.width - 20; - } - } else { - nEventX += 20; - } - - layerPopup.left = nEventX; - - layerPopup.visibility = "show"; - - window.captureEvents(Event.MOUSEDOWN); - if (!gOlddocumentClick && document.onmousedown) - gOlddocumentClick = document.onmousedown; - window.onmousedown = PopupMenu_HandleClick; - } - - window.gbInPopupMenu = true; - window.gbPopupMenuTimeoutExpired = false; - setTimeout("PopupMenu_Timeout();", 100); - return false; + var fn_arguments = gfn_arguments; + gfn_arguments = null; + + // Make sure we have reasonable arguments + var argLen = fn_arguments.length; + if (argLen < 3) { + return false; + } + + // Check to see if we only have one target + var strTarget = ""; + var targetDoc = null; + if (fn_arguments[1] == '') { + if (BSSCPopup_IsPopup()) { + targetDoc = parent; + strTarget = "TARGET= _parent"; + } + else + targetDoc = window.document; + } else { + targetDoc = _GetFrameByName( parent, fn_arguments[1] ); + + strTarget = "TARGET='" + fn_arguments[1] + "'"; + } + + if ((!gbBsIE4 && !gbBsNS4 && !gbBsOpera7 && !gbBsKonqueror3 &&!gbBsSafari) || ((gbBsMac) && (gbBsIE4) && (window.event.srcElement.tagName == "AREA"))) { + + var argLen = fn_arguments.length; + + // Create the window that the hyperlinks will go into + var nHeight = argLen * 15; + var nWidth = 400; + var strParam = "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=auto"; + strParam += ",height=" + nHeight + ",width=200"; + strParam += ",resizable"; + + var wndTemp=null; + // Create a temporary window first to ensure the real popup comes up on top + if (!gbBsOpera) + wndTemp = window.open("", "temp", strParam); + + // Create the real popup window + var wndPopupLinks=null; + if (gbBsOpera&&gbBsMac) + { + wndTemp = window.open(document.location.href, "temp", strParam); + wndPopupLinks= window.open(document.location.href, "popuplinks", strParam); + } + else + wndPopupLinks= window.open("", "popuplinks", strParam); + wndPopupLinks.document.open("text/html"); + + // Close the temporary + if (wndTemp) + wndTemp.close(); + + var sHTML=""; + sHTML+=""; + var strParaLine = ""; + for (var i = 0; i < (argLen - 2) / 2; i++) { + strParaLine = ""; + strParaLine += "'; + } else { + strMenu += '' + gbPopupMenuTopicList[fn_arguments[i]].strTitle + ''; + } + strMenu += ''; + + if (isNaN(fn_arguments[i]) || (gbPopupMenuTopicList == null)) { + i += 2; + } else { + i += 1; + } + } + strMenu += ""; + + if (gbBsMac) { + // totally hack. because ie5 in mac need something. is one of them. mac is mad. + strMenu +="
"; + } + + var layerPopup = null; + var stylePopup = null; + var nEventX = 0; + var nEventY = 0; + var nWindowWidth = 0; + if (gbBsIE4 || gbBsOpera7) { + + layerPopup = getElement("PopupMenu"); + layerPopup.innerHTML = strMenu; + stylePopup = layerPopup.style; + + _BSPSGetClientSize(); + + // Get the position of the item causing the event (relative to its parent) + nEventX = window.event.clientX; + nEventY = window.event.clientY; + + if (nEventY + layerPopup.scrollHeight + 10 < gBsClientHeight) { + nEventY += document.body.scrollTop + 10; + } else { + nEventY = (document.body.scrollTop + gBsClientHeight) - layerPopup.scrollHeight - 20; + } + stylePopup.top = nEventY; + + var nPopupWidth = layerPopup.scrollWidth; + if (gbBsMac) { + nPopupWidth = 80; // we have no idea how to get the dynamic width of the popup. + } + if (nEventX + nPopupWidth + 20 > gBsClientWidth) { + if (gBsClientWidth - nPopupWidth < 5) { + stylePopup.left = 5; + } else { + stylePopup.left = gBsClientWidth - nPopupWidth - 5; + } + } else { + stylePopup.left = nEventX + document.body.scrollLeft + 20; + } + + stylePopup.visibility = "visible"; + if (!gOlddocumentClick && document.onclick) + gOlddocumentClick = document.onclick; + document.onclick = PopupMenu_HandleClick; + + } else if (gbBsNS6 || gbBsKonqueror3||gbBsSafari) { + layerPopup = getElement("PopupMenu"); + layerPopup.style.visibility = "hidden"; + + if (gbBsNS6) + { + var e = fn_arguments[0]; + nEventX = e.pageX; + nEventY = e.pageY; + } + else + { + nEventX = window.event.clientX; + nEventY = window.event.clientY; + } + _BSPSGetClientSize(); + layerPopup.innerHTML = strMenu; + + if (nEventY + layerPopup.offsetHeight + 20 < window.pageYOffset + gBsClientHeight) { + nEventY += 20; + } else { + nEventY = gBsClientHeight + window.pageYOffset - layerPopup.offsetHeight - 20; + } + + if (nEventX + layerPopup.offsetWidth + 20 > gBsClientWidth + window.pageXOffset) { + if (gBsClientWidth + window.pageXOffset - layerPopup.offsetWidth < 20) { + nEventX = 5; + } else { + nEventX = gBsClientWidth + window.pageXOffset - layerPopup.offsetWidth - 20; + } + } else { + nEventX += 20; + } + layerPopup.style.top = nEventY; + layerPopup.style.left = nEventX; + // set again to avoid the stupid frash in netscape 6. + layerPopup.innerHTML = strMenu; + layerPopup.style.visibility = "visible"; + //window.captureEvents(Event.MOUSEDOWN); + if (!gOlddocumentClick && document.onclick) + gOlddocumentClick = document.onclick; + window.onclick = PopupMenu_HandleClick; + } + else if (gbBsNS4) { + layerPopup = document.layers.PopupMenu; + layerPopup.visibility = "hide"; + stylePopup = layerPopup.document; + stylePopup.write(strMenu); + stylePopup.close(); + var e = fn_arguments[0]; + nEventX = e.pageX; + nEventY = e.pageY; + _BSPSGetClientSize(); + if (nEventY + layerPopup.clip.height + 20 < window.pageYOffset + gBsClientHeight) { + nEventY += 20; + } else { + nEventY = gBsClientHeight + window.pageYOffset- layerPopup.clip.height - 20; + } + layerPopup.top = nEventY; + + if (nEventX + layerPopup.clip.width + 20 > gBsClientWidth + window.pageXOffset) { + if (gBsClientWidth + window.pageXOffset - layerPopup.clip.width < 20) { + nEventX = 5; + } else { + nEventX = gBsClientWidth + window.pageXOffset - layerPopup.clip.width - 20; + } + } else { + nEventX += 20; + } + + layerPopup.left = nEventX; + + layerPopup.visibility = "show"; + + window.captureEvents(Event.MOUSEDOWN); + if (!gOlddocumentClick && document.onmousedown) + gOlddocumentClick = document.onmousedown; + window.onmousedown = PopupMenu_HandleClick; + } + + window.gbInPopupMenu = true; + window.gbPopupMenuTimeoutExpired = false; + setTimeout("PopupMenu_Timeout();", 100); + return false; } function PopupMenu_Timeout() { - window.gbPopupMenuTimeoutExpired = true; + window.gbPopupMenuTimeoutExpired = true; } function PopupMenu_Over(e) { if (gbBsIE4||gbBsOpera7) - e.srcElement.className = "PopupOver"; + e.srcElement.className = "PopupOver"; else if (gbBsNS6) - e.target.parentNode.className = "PopupOver"; - return; + e.target.parentNode.className = "PopupOver"; + return; } function PopupMenu_Out(e) { if (gbBsIE4||gbBsOpera7) - e.srcElement.className = "PopupNotOver"; + e.srcElement.className = "PopupNotOver"; else if (gbBsNS6) - e.target.parentNode.className = "PopupNotOver"; - return; + e.target.parentNode.className = "PopupNotOver"; + return; } function PopupMenu_HandleClick(e) { - if (window.gbPopupMenuTimeoutExpired) { - window.gbInPopupMenu = false; - if (gbBsNS4 && !gbBsNS6) { - window.releaseEvents(Event.MOUSEDOWN); - } - - var layerPopup = null; - if (gbBsNS4&&!gbBsNS6) { - layerPopup = document.layers.PopupMenu; - layerPopup.visibility = "hide"; - } else { - layerPopup = getElement("PopupMenu"); - layerPopup.style.visibility = "hidden"; - } - - if (gOlddocumentClick) - { - if (gbBsNS4 && !gbBsNS6) - document.onmousedown = gOlddocumentClick; - else - document.onclick = gOlddocumentClick; - } - } - return; + if (window.gbPopupMenuTimeoutExpired) { + window.gbInPopupMenu = false; + if (gbBsNS4 && !gbBsNS6) { + window.releaseEvents(Event.MOUSEDOWN); + } + + var layerPopup = null; + if (gbBsNS4&&!gbBsNS6) { + layerPopup = document.layers.PopupMenu; + layerPopup.visibility = "hide"; + } else { + layerPopup = getElement("PopupMenu"); + layerPopup.style.visibility = "hidden"; + } + + if (gOlddocumentClick) + { + if (gbBsNS4 && !gbBsNS6) + document.onmousedown = gOlddocumentClick; + else + document.onclick = gOlddocumentClick; + } + } + return; } function BSSCPopup_ClickMac() { - if ((!DHTMLPopupSupport()) && (gbBsIE4 || gbBsOpera7)) - { - var bClickOnAnchor = false; - var el; - if ((window.event != null) && - (window.event.srcElement != null)) - { - el = window.event.srcElement; - while (el != null) - { - if ((el.tagName == "A") || (el.tagName == "AREA")) { - bClickOnAnchor = true; - break; - } - if (el.tagName == "BODY") { - break; - } - el = getParentNode(el); - } - } - if (BSSCPopup_IsPopup()) - { - if (!bClickOnAnchor) { - parent.window.gPopupWindow = null; - self.close(); - } - } - else - { - bClosePopupWindow = true; - if ((bClickOnAnchor) && - (el.href) && - ((el.href.indexOf("javascript:BSSCPopup") != -1) || (el.href.indexOf("javascript:null") != -1) || (el.href.indexOf("javascript:void(0)") != -1))) - { - bClosePopupWindow = false; - } - if (bClosePopupWindow) - { - if (window.gPopupWindow != null && !window.gPopupWindow.closed ) - { - window.gPopupWindow.close(); - } - } - } - } + if ((!DHTMLPopupSupport()) && (gbBsIE4 || gbBsOpera7)) + { + var bClickOnAnchor = false; + var el; + if ((window.event != null) && + (window.event.srcElement != null)) + { + el = window.event.srcElement; + while (el != null) + { + if ((el.tagName == "A") || (el.tagName == "AREA")) { + bClickOnAnchor = true; + break; + } + if (el.tagName == "BODY") { + break; + } + el = getParentNode(el); + } + } + if (BSSCPopup_IsPopup()) + { + if (!bClickOnAnchor) { + parent.window.gPopupWindow = null; + self.close(); + } + } + else + { + bClosePopupWindow = true; + if ((bClickOnAnchor) && + (el.href) && + ((el.href.indexOf("javascript:BSSCPopup") != -1) || (el.href.indexOf("javascript:null") != -1) || (el.href.indexOf("javascript:void(0)") != -1))) + { + bClosePopupWindow = false; + } + if (bClosePopupWindow) + { + if (window.gPopupWindow != null && !window.gPopupWindow.closed ) + { + window.gPopupWindow.close(); + } + } + } + } } function BsPopupOnClick() { - if (!gbBsIE4 && !gbBsOpera7) - return; + if (!gbBsIE4 && !gbBsOpera7) + return; - BSSCPopup_ClickMac(); + BSSCPopup_ClickMac(); } function _BSSCOnError(message) { - if(-1 != message.indexOf("denied") - || -1 != message.indexOf("Object required")) - return true; + if(-1 != message.indexOf("denied") + || -1 != message.indexOf("Object required")) + return true; } //End to support previous relative topics @@ -2458,19 +2368,19 @@ function _BSSCOnError(message) //Begin to support previous popup functions //variables used to isolate the browser type -var gBsStyVisShow = null; -var gBsStyVisHide = null; -var gBsClientWidth = 640; +var gBsStyVisShow = null; +var gBsStyVisHide = null; +var gBsClientWidth = 640; var gBsClientHeight = 480; // here is the varible for judge popup windows size. these parameter is for IE5.0, it may need adjust for others. -var gBRateH_W = 0.618; // 1.618 Golden cut. -var gBMaxXOfParent = 0.8; -var gBMaxYOfParent = 0.8; +var gBRateH_W = 0.618; // 1.618 Golden cut. +var gBMaxXOfParent = 0.8; +var gBMaxYOfParent = 0.8; var gBscrollHeight = 16; var gBscrollWidth = 16; -var gBpermitXDelta = 3; -var gBpermitYDelta = 3; +var gBpermitXDelta = 3; +var gBpermitYDelta = 3; var arrayPopupURL = new Array(); @@ -2480,183 +2390,183 @@ var arrayDirty = new Array(); function setAbsPopupURL(nIndex, strURL) { - arrayAbsPopupURL[nIndex] = strURL; + arrayAbsPopupURL[nIndex] = strURL; } function getAbsPopupURL(nIndex) { - if (nIndex == -1 || arrayAbsPopupURL.length <= nIndex) return null; - else - return arrayAbsPopupURL[nIndex]; + if (nIndex == -1 || arrayAbsPopupURL.length <= nIndex) return null; + else + return arrayAbsPopupURL[nIndex]; } function getPopupURL(nIndex) { - if (nIndex == -1 || arrayPopupURL.length <= nIndex) return null; - else - return arrayPopupURL[nIndex]; + if (nIndex == -1 || arrayPopupURL.length <= nIndex) return null; + else + return arrayPopupURL[nIndex]; } function getPopupID(nIndex) { - return gstrPopupID + nIndex; + return gstrPopupID + nIndex; } function getPopupShadowID(nIndex) { - return gstrPopupShadowID + nIndex; + return gstrPopupShadowID + nIndex; } function getPopupTopicID(nIndex) { - return gstrPopupTopicID + nIndex; + return gstrPopupTopicID + nIndex; } function getPopupIFrameID(nIndex) { - return gstrPopupIFrameID + nIndex; + return gstrPopupIFrameID + nIndex; } function getPopupIFrameName(nIndex) { - return gstrPopupIFrameName + nIndex; + return gstrPopupIFrameName + nIndex; } function getPopupTopicStyle(nIndex) { - return getElement(getPopupTopicID(nIndex)).style; + return getElement(getPopupTopicID(nIndex)).style; } function getPopupShadowStyle(nIndex) { - return getElement(getPopupShadowID(nIndex)).style; + return getElement(getPopupShadowID(nIndex)).style; } function getPopupIFrame(nIndex) { - if (gbBsNS6) - return eval("window.frames['" + getPopupIFrameName(nIndex) + "']"); - else - return eval("document.frames['" + getPopupIFrameName(nIndex) + "']"); + if (gbBsNS6) + return eval("window.frames['" + getPopupIFrameName(nIndex) + "']"); + else + return eval("document.frames['" + getPopupIFrameName(nIndex) + "']"); } function getPopupDivStyle(nIndex) { - return getElement(getPopupID(nIndex)).style; + return getElement(getPopupID(nIndex)).style; } function getPopupIFrameStyle(nIndex) { - return getElement(getPopupIFrameID(nIndex)).style; + return getElement(getPopupIFrameID(nIndex)).style; } function findDiv(strURL) { - for (var i = 0; i < arrayPopupURL.length; i ++ ) { - if (arrayPopupURL[i] == strURL) { - return i; - } - } - return -1; + for (var i = 0; i < arrayPopupURL.length; i ++ ) { + if (arrayPopupURL[i] == strURL) { + return i; + } + } + return -1; } var gnToken = -1; function takeToken() { - gnToken ++; - if (gnToken > 10000) gnToken = 0; - return gnToken; + gnToken ++; + if (gnToken > 10000) gnToken = 0; + return gnToken; } function IsValidToken(nToken) { - return (gnToken == nToken); + return (gnToken == nToken); } function addDiv(strURL) { - for (var i = 0; i < arrayPopupURL.length; i ++) { - if (arrayPopupURL[i] == null) { - arrayPopupURL[i] = strURL; - return i; - } - } - arrayPopupURL[i] = strURL; - arrayDirty[i] = true; - return i; + for (var i = 0; i < arrayPopupURL.length; i ++) { + if (arrayPopupURL[i] == null) { + arrayPopupURL[i] = strURL; + return i; + } + } + arrayPopupURL[i] = strURL; + arrayDirty[i] = true; + return i; } function setDirty() { - for (var i = 0; i < arrayPopupURL.length; i ++ ) - arrayDirty[i] = true; + for (var i = 0; i < arrayPopupURL.length; i ++ ) + arrayDirty[i] = true; } function IsDirty(nIndex) { - if (nIndex == -1) - return true; - else - if (arrayDirty.length > nIndex) - return arrayDirty[nIndex]; - else - return true; + if (nIndex == -1) + return true; + else + if (arrayDirty.length > nIndex) + return arrayDirty[nIndex]; + else + return true; } function hideAll() { - for (var i = 0; i < arrayPopupURL.length; i ++ ) - { - getPopupDivStyle(i).visibility = gBsStyVisHide; - getPopupIFrameStyle(i).visibility = gBsStyVisHide; - } + for (var i = 0; i < arrayPopupURL.length; i ++ ) + { + getPopupDivStyle(i).visibility = gBsStyVisHide; + getPopupIFrameStyle(i).visibility = gBsStyVisHide; + } } function getCurrentPopupIFrame() { - for (var i = 0; i < arrayPopupURL.length; i ++) - if (getPopupDivStyle(i).visibility == gBsStyVisShow) - return getPopupIFrame(i); - return null; + for (var i = 0; i < arrayPopupURL.length; i ++) + if (getPopupDivStyle(i).visibility == gBsStyVisShow) + return getPopupIFrame(i); + return null; } function setClear(nIndex) { - if (nIndex != -1) - arrayDirty[nIndex] = false; + if (nIndex != -1) + arrayDirty[nIndex] = false; } function _BSSCCreatePopupDiv(strURL) { - var nIndex = findDiv(strURL); - if (nIndex == -1 ) { - nIndex = addDiv(strURL); - BsPopup_CreateDiv(nIndex); - } - else { - if (IsDirty(nIndex)) { - if("object" == typeof(getPopupIFrame(nIndex).document)) - getPopupIFrame(nIndex).document.location.href = strURL; - } - } - return nIndex; + var nIndex = findDiv(strURL); + if (nIndex == -1 ) { + nIndex = addDiv(strURL); + BsPopup_CreateDiv(nIndex); + } + else { + if (IsDirty(nIndex)) { + if("object" == typeof(getPopupIFrame(nIndex).document)) + getPopupIFrame(nIndex).document.location.href = strURL; + } + } + return nIndex; } //Here is the browser type function _BSPSGetBrowserInfo() { - if (gbBsNS4&&!gbBsNS6) - { - gBsStyVisShow = "show"; - gBsStyVisHide = "hide"; - } - else - { - gBsStyVisShow = "visible"; - gBsStyVisHide = "hidden"; - } + if (gbBsNS4&&!gbBsNS6) + { + gBsStyVisShow = "show"; + gBsStyVisHide = "hide"; + } + else + { + gBsStyVisShow = "visible"; + gBsStyVisHide = "hidden"; + } } _BSPSGetBrowserInfo(); @@ -2664,16 +2574,16 @@ _BSPSGetBrowserInfo(); //Get client size info function _BSPSGetClientSize() { - if (gbBsNS4||gbBsKonqueror3||gbBsSafari) - { - gBsClientWidth = innerWidth; - gBsClientHeight = innerHeight; - } - else if (gbBsIE4 || gbBsOpera7) - { - gBsClientWidth = document.body.clientWidth; - gBsClientHeight = document.body.clientHeight; - } + if (gbBsNS4||gbBsKonqueror3||gbBsSafari) + { + gBsClientWidth = innerWidth; + gBsClientHeight = innerHeight; + } + else if (gbBsIE4 || gbBsOpera7) + { + gBsClientWidth = document.body.clientWidth; + gBsClientHeight = document.body.clientHeight; + } } var gstrPopupID = 'BSSCPopup'; @@ -2695,731 +2605,731 @@ var gbPopupTimeoutExpired = false; function DHTMLPopupSupport() { - if (((gbBsIE4) && (!gbBsMac))||gbBsOpera7|| gbBsNS7) { - return true; - } - return false; + if (((gbBsIE4) && (!gbBsMac))||gbBsOpera7|| gbBsNS7) { + return true; + } + return false; } function BSSCPopup_IsPopup() { - if (DHTMLPopupSupport() && (this.name.indexOf(gstrPopupIFrameName) != -1)) { - return true; - } else if ((gbBsNS4 || gbBsIE4 || gbBsOpera7) && (this.name.indexOf(gstrPopupID) != -1)) { - return true; - } else { - return false; - } + if (DHTMLPopupSupport() && (this.name.indexOf(gstrPopupIFrameName) != -1)) { + return true; + } else if ((gbBsNS4 || gbBsIE4 || gbBsOpera7) && (this.name.indexOf(gstrPopupID) != -1)) { + return true; + } else { + return false; + } } // If there is a hyperlink in a popup window, display the hyperlink in // the original window. (bsscright) if (BSSCPopup_IsPopup() && !gbBsIE4 && !gbBsOpera7) { - document.write(""); + document.write(""); } // Local functions. function BsPopup_CreateDiv(nIndex) { - if(!DHTMLPopupSupport()) - return; - // DO NOT SET Width and height for the div, otherwize it will make IE4 popup do not work when view the topic alone. - var strPopupDiv = ""; + if(!DHTMLPopupSupport()) + return; + // DO NOT SET Width and height for the div, otherwize it will make IE4 popup do not work when view the topic alone. + var strPopupDiv = ""; - var objBody = getElementsByTag(document, "BODY")[0]; - if( typeof(objBody) != "object" ) - return; + var objBody = getElementsByTag(document, "BODY")[0]; + if( typeof(objBody) != "object" ) + return; - insertAdjacentHTML(objBody, "beforeEnd", strPopupDiv); + insertAdjacentHTML(objBody, "beforeEnd", strPopupDiv); } function handleLoadNS() { - if (this.id) - { - var nIndex = parseInt(this.id.substring(gstrPopupIFrameID.length)); - BSSCPopup_PostWork(nIndex); - } + if (this.id) + { + var nIndex = parseInt(this.id.substring(gstrPopupIFrameID.length)); + BSSCPopup_PostWork(nIndex); + } } function BSSCPopup_PostWork(nIndex) { - getPopupDivStyle(nIndex).visibility = gBsStyVisShow; - getPopupIFrameStyle(nIndex).visibility =gBsStyVisShow; + getPopupDivStyle(nIndex).visibility = gBsStyVisShow; + getPopupIFrameStyle(nIndex).visibility =gBsStyVisShow; - setClear(nIndex); - window.gbPopupTimeoutExpired = true; + setClear(nIndex); + window.gbPopupTimeoutExpired = true; - BSSCPopup_ChangeTargettoParent(getPopupIFrame(nIndex).document); - if (gbBsNS6) - getPopupIFrame(nIndex).document.body.addEventListener("click",BSSCPopupClicked,false); - else - getPopupIFrame(nIndex).document.body.onclick = BSSCPopupClicked; + BSSCPopup_ChangeTargettoParent(getPopupIFrame(nIndex).document); + if (gbBsNS6) + getPopupIFrame(nIndex).document.body.addEventListener("click",BSSCPopupClicked,false); + else + getPopupIFrame(nIndex).document.body.onclick = BSSCPopupClicked; - if (!gbOrignalOnMouseDown && document.onmousedown) - gbOrignalOnMouseDown = document.onmousedown; + if (!gbOrignalOnMouseDown && document.onmousedown) + gbOrignalOnMouseDown = document.onmousedown; - if (gbBsNS6) - document.addEventListener("mousedown", BSSCPopupParentClicked,false); - else - document.onmousedown = BSSCPopupParentClicked; + if (gbBsNS6) + document.addEventListener("mousedown", BSSCPopupParentClicked,false); + else + document.onmousedown = BSSCPopupParentClicked; } function BSSCPopup_Timeout(nIndex, nToken) { if (!IsValidToken(nToken)) return; - if (gbBsNS6||((getPopupIFrame(nIndex).document.readyState == "complete") && - (getPopupIFrame(nIndex).document.body != null))) { - BSSCPopup_PostWork(nIndex); - } else { - setTimeout("BSSCPopup_Timeout(" + nIndex + "," + nToken + ")", 100); - } + if (gbBsNS6||((getPopupIFrame(nIndex).document.readyState == "complete") && + (getPopupIFrame(nIndex).document.body != null))) { + BSSCPopup_PostWork(nIndex); + } else { + setTimeout("BSSCPopup_Timeout(" + nIndex + "," + nToken + ")", 100); + } } // VH 08/10/00 // do not change target to parent if the href is using javascript function BSSCPopup_ChangeTargettoParent(tagsObject) { - var collA = getElementsByTag(tagsObject, "A"); - BSSCPopup_ChangeTargettoParent2(collA); + var collA = getElementsByTag(tagsObject, "A"); + BSSCPopup_ChangeTargettoParent2(collA); - var collIMG = getElementsByTag(tagsObject,"IMG"); - BSSCPopup_ChangeTargettoParent2(collIMG); + var collIMG = getElementsByTag(tagsObject,"IMG"); + BSSCPopup_ChangeTargettoParent2(collIMG); } function BSSCPopup_ChangeTargettoParent2(colls) { - if (colls != null) { - for (var j = 0; j < colls.length; j ++ ) - { - var strtemp = colls[j].href; - if (strtemp) - { - strtemp = strtemp.toLowerCase(); - if (strtemp.indexOf("javascript:") == -1) - if (colls[j].target == "") - colls[j].target = "_parent"; - } - } - } + if (colls != null) { + for (var j = 0; j < colls.length; j ++ ) + { + var strtemp = colls[j].href; + if (strtemp) + { + strtemp = strtemp.toLowerCase(); + if (strtemp.indexOf("javascript:") == -1) + if (colls[j].target == "") + colls[j].target = "_parent"; + } + } + } } function BSPSPopupTopicWinHelp(strURL) { - _BSSCPopup(strURL); - return; + _BSSCPopup(strURL); + return; } function _BSSCPopup(strURL, width, height) { - var cuswidth = 0; - var cusheight = 0; - if ("undefined" != typeof(width) && "undefined" != typeof(height)) { - cuswidth = width; - cusheight= height; - } - - if (DHTMLPopupSupport()) { - var nToken = takeToken(); // take token first. - var nIndex = _BSSCCreatePopupDiv(strURL); - window.gbPopupTimeoutExpired = false; - var ntWidth = gBsClientWidth; - var ntHeight = gBsClientHeight; - _BSPSGetClientSize(); - if (ntWidth != gBsClientWidth || ntHeight != gBsClientHeight) { - setDirty(); - } - - if (IsDirty(nIndex)) { - if (gbBsMac) { - setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight +")", 400); - } else { - setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 100); - } - } - else { - MoveDivAndShow(nIndex ,nToken, cuswidth, cusheight); - } - } else { - _BSSCPopup2(strURL, cuswidth, cusheight); - } - return; + var cuswidth = 0; + var cusheight = 0; + if ("undefined" != typeof(width) && "undefined" != typeof(height)) { + cuswidth = width; + cusheight= height; + } + + if (DHTMLPopupSupport()) { + var nToken = takeToken(); // take token first. + var nIndex = _BSSCCreatePopupDiv(strURL); + window.gbPopupTimeoutExpired = false; + var ntWidth = gBsClientWidth; + var ntHeight = gBsClientHeight; + _BSPSGetClientSize(); + if (ntWidth != gBsClientWidth || ntHeight != gBsClientHeight) { + setDirty(); + } + + if (IsDirty(nIndex)) { + if (gbBsMac) { + setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight +")", 400); + } else { + setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 100); + } + } + else { + MoveDivAndShow(nIndex ,nToken, cuswidth, cusheight); + } + } else { + _BSSCPopup2(strURL, cuswidth, cusheight); + } + return; } if (gbBsIE55) { - var ehlpdhtm_fOldBefureUnload = window.onbeforeunload; - var gnBsUnload=0; - window.onbeforeunload = window_BUnload; + var ehlpdhtm_fOldBefureUnload = window.onbeforeunload; + var gnBsUnload=0; + window.onbeforeunload = window_BUnload; } - + function window_BUnload() { - gnBsUnload++; - if (gnBsUnload>1) - return; - for (var i = 0; i < arrayPopupURL.length; i ++) - removeThis(document.all(getPopupID(i))); - arrayPopupURL.length = 0; - if (ehlpdhtm_fOldBefureUnload) - ehlpdhtm_fOldBefureUnload(); + gnBsUnload++; + if (gnBsUnload>1) + return; + for (var i = 0; i < arrayPopupURL.length; i ++) + removeThis(document.all(getPopupID(i))); + arrayPopupURL.length = 0; + if (ehlpdhtm_fOldBefureUnload) + ehlpdhtm_fOldBefureUnload(); } function _BSSCPopup2(strURL, width, height) { - if (gbBsOpera6&&gbBsMac) - { - var wmTemp = window.open(document.location.href, gstrPopupSecondWindowName); - wmTemp.close(); - setTimeout("_BSSCPopup3(\""+strURL+"\","+width+","+height+");",100); - } - else - _BSSCPopup3(strURL, width, height); -} - + if (gbBsOpera6&&gbBsMac) + { + var wmTemp = window.open(document.location.href, gstrPopupSecondWindowName); + wmTemp.close(); + setTimeout("_BSSCPopup3(\""+strURL+"\","+width+","+height+");",100); + } + else + _BSSCPopup3(strURL, width, height); +} + function _BSSCPopup3(strURL, width, height) { - if (window.name == gstrPopupSecondWindowName) { - window.location = strURL; - } else { - if (!gbBsMac || !gbBsNS4) { - BSSCHidePopupWindow(); - } - var nX = 0; - var nY = 0; - var nHeight = 300; - var nWidth = 400; - if (width > 0 && height > 0) { - nHeight = height; - nWidth = width; - } - _BSPSGetClientSize(); - - nX = window.gnPopupScreenClickX; - nY = window.gnPopupScreenClickY; - - if (nY + nHeight + 40 > screen.availHeight) { - nY = screen.availHeight - nHeight - 40; - } - if (nX + nWidth + 40 > screen.availWidth) { - nX = screen.availWidth - nWidth - 40; - } - - // Launch a separate window - var strParam="titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes"; - if (gbBsNS) { - if (gbBsNS6) { - strParam += ",Height=" + nHeight + ",Width=" + nWidth; - strParam += ",screenX=" + nX + ",screenY=" + nY; - strParam += ",dependent=yes"; - } - else { - strParam += ",OuterHeight=" + nHeight + ",OuterWidth=" + nWidth; - strParam += ",screenX=" + nX + ",screenY=" + nY; - strParam += ",dependent=yes"; - } - } - else { - strParam += ",height=" + nHeight + ",width=" + nWidth; - strParam += ",left=" + nX + ",top=" + nY; - } - if (gbBsSafari) - { - if (window.gPopupWindow) - window.gPopupWindow.close(); - window.gPopupWindow = window.open(strURL, "", strParam); - window.gPopupWindow.name = gstrPopupSecondWindowName; - window.gPopupWindow.moveTo(nX, nY); - widnow.gPopupWindow.document.location.reload(); - } - else - { - var wmTemp=null; - if (gbBsKonqueror3) - { - if (window.gPopupWindow) - window.gPopupWindow.close(); - } - if (gbBsOpera&&gbBsMac) - { - wmTemp= window.open(document.location.href, "Temp", strParam); - } - window.gPopupWindow = window.open(strURL, gstrPopupSecondWindowName, strParam); - if (!gbBsIE) - window.gPopupWindow.focus(); - - if (wmTemp) - wmTemp.close(); - } - - if (gbBsNS4) - setEventHandle(); - else if (gbBsIE4 || gbBsOpera7||gbBsKonqueror3) - setTimeout("setPopupFocus();", 100); - } - return; + if (window.name == gstrPopupSecondWindowName) { + window.location = strURL; + } else { + if (!gbBsMac || !gbBsNS4) { + BSSCHidePopupWindow(); + } + var nX = 0; + var nY = 0; + var nHeight = 300; + var nWidth = 400; + if (width > 0 && height > 0) { + nHeight = height; + nWidth = width; + } + _BSPSGetClientSize(); + + nX = window.gnPopupScreenClickX; + nY = window.gnPopupScreenClickY; + + if (nY + nHeight + 40 > screen.availHeight) { + nY = screen.availHeight - nHeight - 40; + } + if (nX + nWidth + 40 > screen.availWidth) { + nX = screen.availWidth - nWidth - 40; + } + + // Launch a separate window + var strParam="titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes"; + if (gbBsNS) { + if (gbBsNS6) { + strParam += ",Height=" + nHeight + ",Width=" + nWidth; + strParam += ",screenX=" + nX + ",screenY=" + nY; + strParam += ",dependent=yes"; + } + else { + strParam += ",OuterHeight=" + nHeight + ",OuterWidth=" + nWidth; + strParam += ",screenX=" + nX + ",screenY=" + nY; + strParam += ",dependent=yes"; + } + } + else { + strParam += ",height=" + nHeight + ",width=" + nWidth; + strParam += ",left=" + nX + ",top=" + nY; + } + if (gbBsSafari) + { + if (window.gPopupWindow) + window.gPopupWindow.close(); + window.gPopupWindow = window.open(strURL, "", strParam); + window.gPopupWindow.name = gstrPopupSecondWindowName; + window.gPopupWindow.moveTo(nX, nY); + widnow.gPopupWindow.document.location.reload(); + } + else + { + var wmTemp=null; + if (gbBsKonqueror3) + { + if (window.gPopupWindow) + window.gPopupWindow.close(); + } + if (gbBsOpera&&gbBsMac) + { + wmTemp= window.open(document.location.href, "Temp", strParam); + } + window.gPopupWindow = window.open(strURL, gstrPopupSecondWindowName, strParam); + if (!gbBsIE) + window.gPopupWindow.focus(); + + if (wmTemp) + wmTemp.close(); + } + + if (gbBsNS4) + setEventHandle(); + else if (gbBsIE4 || gbBsOpera7||gbBsKonqueror3) + setTimeout("setPopupFocus();", 100); + } + return; } function setEventHandle() { - window.gPopupWindow.captureEvents(Event.CLICK | Event.BLUR); - window.gPopupWindow.onclick = NonIEPopup_HandleClick; - window.gPopupWindow.onblur = NonIEPopup_HandleBlur; + window.gPopupWindow.captureEvents(Event.CLICK | Event.BLUR); + window.gPopupWindow.onclick = NonIEPopup_HandleClick; + window.gPopupWindow.onblur = NonIEPopup_HandleBlur; } function setPopupFocus() { - window.gPopupWindow.focus(); + window.gPopupWindow.focus(); } function NonIEPopup_HandleBlur(e) { - window.gPopupWindow.focus(); + window.gPopupWindow.focus(); } function NonIEPopup_HandleClick(e) { - // Because navigator will give the event to the handler before the hyperlink, let's - // first route the event to see if we are clicking on a Popup menu in a popup. - document.routeEvent(e); - - // If a popup menu is active then don't do anything with the click - if (window.gPopupWindow.gbInPopupMenu) { - window.gPopupWindow.captureEvents(Event.CLICK); - window.gPopupWindow.onclick = NonIEPopup_HandleClick; - return false; - } - - // Close the popup window - if(e.target.href) - { - if(e.target.href.indexOf("javascript:")==-1) - { - if (e.target.target=="") - window.location.href = e.target.href; - else - window.open(e.target.href, e.target.target); - this.close(); - } - } - else - this.close(); - return false; + // Because navigator will give the event to the handler before the hyperlink, let's + // first route the event to see if we are clicking on a Popup menu in a popup. + document.routeEvent(e); + + // If a popup menu is active then don't do anything with the click + if (window.gPopupWindow.gbInPopupMenu) { + window.gPopupWindow.captureEvents(Event.CLICK); + window.gPopupWindow.onclick = NonIEPopup_HandleClick; + return false; + } + + // Close the popup window + if(e.target.href) + { + if(e.target.href.indexOf("javascript:")==-1) + { + if (e.target.target=="") + window.location.href = e.target.href; + else + window.open(e.target.href, e.target.target); + this.close(); + } + } + else + this.close(); + return false; } function BSSCPopup_AfterLoad(nIndex, nToken, cuswidth, cusheight) -{ - if (!window.getPopupIFrame(nIndex).document) { - _BSSCPopup2(getPopupURL(nIndex), cuswidth, cusheight); - return; - } - +{ + if (!window.getPopupIFrame(nIndex).document) { + _BSSCPopup2(getPopupURL(nIndex), cuswidth, cusheight); + return; + } + if (!IsValidToken(nToken)) return; - if (gbBsNS6) - { - setAbsPopupURL(nIndex, window.getPopupIFrame(nIndex).document.location.href); // change URL to abs url. - BSSCPopup_ResizeAfterLoad(nIndex, nToken, cuswidth, cusheight); - return; - } - - if ((window.getPopupIFrame(nIndex).document.readyState == "complete") && - (window.getPopupIFrame(nIndex).document.body != null)) { - if (window.getPopupIFrame(nIndex).document.location.href.indexOf("about:blank") != -1) { // add this check. IE will use about:blank" as the default vaule for Iframe. - window.getPopupIFrame(nIndex).document.location = getPopupURL(nIndex); - setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 200); - } - else - { - setAbsPopupURL(nIndex, window.getPopupIFrame(nIndex).document.location.href); // change URL to abs url. - BSSCPopup_ResizeAfterLoad(nIndex, nToken, cuswidth, cusheight); - } - } else { - setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 200); - } + if (gbBsNS6) + { + setAbsPopupURL(nIndex, window.getPopupIFrame(nIndex).document.location.href); // change URL to abs url. + BSSCPopup_ResizeAfterLoad(nIndex, nToken, cuswidth, cusheight); + return; + } + + if ((window.getPopupIFrame(nIndex).document.readyState == "complete") && + (window.getPopupIFrame(nIndex).document.body != null)) { + if (window.getPopupIFrame(nIndex).document.location.href.indexOf("about:blank") != -1) { // add this check. IE will use about:blank" as the default vaule for Iframe. + window.getPopupIFrame(nIndex).document.location = getPopupURL(nIndex); + setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 200); + } + else + { + setAbsPopupURL(nIndex, window.getPopupIFrame(nIndex).document.location.href); // change URL to abs url. + BSSCPopup_ResizeAfterLoad(nIndex, nToken, cuswidth, cusheight); + } + } else { + setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 200); + } } function BSSCPopup_ResizeAfterLoad(nIndex, nToken, cuswidth, cusheight) { - if (window.gbPopupTimeoutExpired) return; + if (window.gbPopupTimeoutExpired) return; if (!IsValidToken(nToken)) return; - getPopupDivStyle(nIndex).visibility = gBsStyVisHide; - getPopupIFrameStyle(nIndex).visibility = gBsStyVisHide; - - // Determine the width and height for the window - _BSPSGetClientSize(); - - var size = new BSSCSize(0, 0); - - if (cuswidth <= 0 || cusheight <= 0) - BSSCGetContentSize(window.getPopupIFrame(nIndex), size); - else { - size.x = cuswidth; - size.y = cusheight; - } - - // Determine the width and height for the window - var nWidth = size.x; - var nHeight = size.y; - - // for small popup size, we should allow any size. - // The popup size should be ok if bigger than 0 - if (nWidth < 0 || nHeight < 0) return; // there must be something terribly wrong. - - getPopupDivStyle(nIndex).width = nWidth; - getPopupDivStyle(nIndex).height = nHeight; - - getPopupShadowStyle(nIndex).width = nWidth; - getPopupShadowStyle(nIndex).height = nHeight; - getPopupTopicStyle(nIndex).width = nWidth; - getPopupTopicStyle(nIndex).height = nHeight; - if (gbBsIE55) - { - getPopupShadowStyle(nIndex).width = nWidth + 2; - getPopupShadowStyle(nIndex).height = nHeight + 2; - getPopupTopicStyle(nIndex).width = nWidth + 2; - getPopupTopicStyle(nIndex).height = nHeight + 2; - } - - getPopupIFrameStyle(nIndex).width = nWidth; - getPopupIFrameStyle(nIndex).height = nHeight; - if (gbBsIE55 || gbBsNS6) - { - getPopupIFrameStyle(nIndex).top = 0; - getPopupIFrameStyle(nIndex).left = 0; - } - - var strURL = getPopupURL(nIndex); - if (strURL.indexOf("#") != -1&&gbBsNS6) - getPopupIFrame(nIndex).location.reload(); - else if (strURL.indexOf("#") != -1||gbBsNS6) - getPopupIFrame(nIndex).location.href = strURL; // reload again, this will fix the bookmark misunderstand in IE5. - - MoveDivAndShow(nIndex, nToken, cuswidth, cusheight); + getPopupDivStyle(nIndex).visibility = gBsStyVisHide; + getPopupIFrameStyle(nIndex).visibility = gBsStyVisHide; + + // Determine the width and height for the window + _BSPSGetClientSize(); + + var size = new BSSCSize(0, 0); + + if (cuswidth <= 0 || cusheight <= 0) + BSSCGetContentSize(window.getPopupIFrame(nIndex), size); + else { + size.x = cuswidth; + size.y = cusheight; + } + + // Determine the width and height for the window + var nWidth = size.x; + var nHeight = size.y; + + // for small popup size, we should allow any size. + // The popup size should be ok if bigger than 0 + if (nWidth < 0 || nHeight < 0) return; // there must be something terribly wrong. + + getPopupDivStyle(nIndex).width = nWidth; + getPopupDivStyle(nIndex).height = nHeight; + + getPopupShadowStyle(nIndex).width = nWidth; + getPopupShadowStyle(nIndex).height = nHeight; + getPopupTopicStyle(nIndex).width = nWidth; + getPopupTopicStyle(nIndex).height = nHeight; + if (gbBsIE55) + { + getPopupShadowStyle(nIndex).width = nWidth + 2; + getPopupShadowStyle(nIndex).height = nHeight + 2; + getPopupTopicStyle(nIndex).width = nWidth + 2; + getPopupTopicStyle(nIndex).height = nHeight + 2; + } + + getPopupIFrameStyle(nIndex).width = nWidth; + getPopupIFrameStyle(nIndex).height = nHeight; + if (gbBsIE55 || gbBsNS6) + { + getPopupIFrameStyle(nIndex).top = 0; + getPopupIFrameStyle(nIndex).left = 0; + } + + var strURL = getPopupURL(nIndex); + if (strURL.indexOf("#") != -1&&gbBsNS6) + getPopupIFrame(nIndex).location.reload(); + else if (strURL.indexOf("#") != -1||gbBsNS6) + getPopupIFrame(nIndex).location.href = strURL; // reload again, this will fix the bookmark misunderstand in IE5. + + MoveDivAndShow(nIndex, nToken, cuswidth, cusheight); } function getScrollLeft() { - if (document.body.scrollLeft) - return document.body.scrollLeft; - else if (window.pageXOffset) - return window.pageXOffset; - else - return 0; + if (document.body.scrollLeft) + return document.body.scrollLeft; + else if (window.pageXOffset) + return window.pageXOffset; + else + return 0; } function getScrollTop() { - if (document.body.scrollTop) - return document.body.scrollTop; - else if (window.pageYOffset) - return window.pageYOffset; - else - return 0; + if (document.body.scrollTop) + return document.body.scrollTop; + else if (window.pageYOffset) + return window.pageYOffset; + else + return 0; } function MoveDivAndShow(nIndex, nToken, cuswidth, cusheight) { - if (window.getPopupIFrame(nIndex).document.location.href != getAbsPopupURL(nIndex)) { // if redirect, reload again. - window.getPopupIFrame(nIndex).document.location = getPopupURL(nIndex); - setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 200); - return; - } - - // Determine the position of the window - var nClickX = window.gnPopupClickX; - var nClickY = window.gnPopupClickY; - var nTop = 0; - var nLeft = 0; - - var nWidth = parseInt(getPopupDivStyle(nIndex).width); - var nHeight = parseInt(getPopupDivStyle(nIndex).height); - - if (nClickY + nHeight + 20 < gBsClientHeight + getScrollTop()) { - nTop = nClickY + 10; - } else { - nTop = (getScrollTop() + gBsClientHeight) - nHeight - 20; - } - if (nClickX + nWidth < gBsClientWidth + getScrollLeft()) { - nLeft = nClickX; - } else { - nLeft = (getScrollLeft() + gBsClientWidth) - nWidth - 8; - } - - if (nTop < getScrollTop()) nTop = getScrollTop() + 1; - if (nLeft< getScrollLeft()) nLeft = getScrollLeft() + 1; - - getPopupDivStyle(nIndex).left = nLeft; - getPopupDivStyle(nIndex).top = nTop; - - // Set the location of the background blocks - getPopupShadowStyle(nIndex).left = 6; - getPopupShadowStyle(nIndex).top = 6; - if (gbBsIE55) - { - getPopupShadowStyle(nIndex).left = 4; - getPopupShadowStyle(nIndex).top = 4; - } - - if (gbBsMac&&gbBsIE4) { - // Total hack on the iMac to get the IFrame to position properly - getPopupIFrameStyle(nIndex).pixelLeft = 100; - getPopupIFrameStyle(nIndex).pixelLeft = 0; - // Explicitly call BSSCOnLoad because the Mac doesn't seem to do it - getPopupIFrame(nIndex).window.BSSCOnLoad(); - } - - if (gbBsNS6&&IsDirty(nIndex)) - getElement(getPopupIFrameID(nIndex)).addEventListener("load", handleLoadNS, false); - else - BSSCPopup_Timeout(nIndex , nToken ); - return; -} - -function BSSCSize(x, y) + if (window.getPopupIFrame(nIndex).document.location.href != getAbsPopupURL(nIndex)) { // if redirect, reload again. + window.getPopupIFrame(nIndex).document.location = getPopupURL(nIndex); + setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 200); + return; + } + + // Determine the position of the window + var nClickX = window.gnPopupClickX; + var nClickY = window.gnPopupClickY; + var nTop = 0; + var nLeft = 0; + + var nWidth = parseInt(getPopupDivStyle(nIndex).width); + var nHeight = parseInt(getPopupDivStyle(nIndex).height); + + if (nClickY + nHeight + 20 < gBsClientHeight + getScrollTop()) { + nTop = nClickY + 10; + } else { + nTop = (getScrollTop() + gBsClientHeight) - nHeight - 20; + } + if (nClickX + nWidth < gBsClientWidth + getScrollLeft()) { + nLeft = nClickX; + } else { + nLeft = (getScrollLeft() + gBsClientWidth) - nWidth - 8; + } + + if (nTop < getScrollTop()) nTop = getScrollTop() + 1; + if (nLeft< getScrollLeft()) nLeft = getScrollLeft() + 1; + + getPopupDivStyle(nIndex).left = nLeft; + getPopupDivStyle(nIndex).top = nTop; + + // Set the location of the background blocks + getPopupShadowStyle(nIndex).left = 6; + getPopupShadowStyle(nIndex).top = 6; + if (gbBsIE55) + { + getPopupShadowStyle(nIndex).left = 4; + getPopupShadowStyle(nIndex).top = 4; + } + + if (gbBsMac&&gbBsIE4) { + // Total hack on the iMac to get the IFrame to position properly + getPopupIFrameStyle(nIndex).pixelLeft = 100; + getPopupIFrameStyle(nIndex).pixelLeft = 0; + // Explicitly call BSSCOnLoad because the Mac doesn't seem to do it + getPopupIFrame(nIndex).window.BSSCOnLoad(); + } + + if (gbBsNS6&&IsDirty(nIndex)) + getElement(getPopupIFrameID(nIndex)).addEventListener("load", handleLoadNS, false); + else + BSSCPopup_Timeout(nIndex , nToken ); + return; +} + +function BSSCSize(x, y) { - this.x = x; - this.y = y; + this.x = x; + this.y = y; } function BSSCGetContentSize(thisWindow, size) { - if (!gbBsIE4 && !gbBsOpera7 && !gbBsNS4) - return; - - if ((gbBsMac&&gbBsIE4)||gbBsNS4||gbBsOpera7) { - size.x = 320; - size.y = 180; - return; - } - - // Resize the width until it is wide enough to handle the content - // The trick is to start wide and determine when the scrollHeight changes - // because then we know a scrollbar is necessary. We can then go back - // to the next widest size (for no scrollbar) - - var ClientRate = gBsClientHeight / gBsClientWidth; - - - var GoldenSize = new BSSCSize(0,0); - GoldenSize.x = gBsClientWidth * gBMaxXOfParent; - GoldenSize.y = gBsClientHeight *gBMaxYOfParent ; - - if (ClientRate > gBRateH_W) { - GoldenSize.y = GoldenSize.x * gBRateH_W; - } - else { - GoldenSize.x = GoldenSize.y / gBRateH_W; - } - - // Try to using parent specified max x. - var x = 0; - var maxgoldx = GoldenSize.x; - var maxx = gBsClientWidth * gBMaxXOfParent; - - // This double resize causes the document to re-render (and we need it to) - if (!gbBsIE5) - thisWindow.moveTo(10000,10000); // this is used to fix the flash on IE4. - - thisWindow.resizeTo(1, 1); - thisWindow.resizeTo(1, 1); - thisWindow.resizeTo(maxgoldx, thisWindow.document.body.scrollHeight + gBscrollHeight); - thisWindow.resizeTo(maxgoldx, thisWindow.document.body.scrollHeight + gBscrollHeight); - - var miny = thisWindow.document.body.scrollHeight + gBscrollHeight; - - if (miny > GoldenSize.y) // the popup does not fix in the parent wanted golden area. so try to expand itself as large as it can - { - thisWindow.resizeTo(maxx , thisWindow.document.body.scrollHeight + gBscrollHeight); - thisWindow.resizeTo(maxx , thisWindow.document.body.scrollHeight + gBscrollHeight); - - miny = thisWindow.document.body.scrollHeight + gBscrollHeight; - maxy = gBsClientHeight * gBMaxYOfParent; - - if (miny > maxy) { // the popup must have a scroll, OK let it be. - miny = maxy; - size.x = maxx; - size.y = maxy; - thisWindow.document.body.scroll = 'yes'; // At this time we do want to show scroll any more. so it will looks better a little. - } - else { // popup still can fit in the parent area by someway. now we choose the same h/w rate as parent. - size.y = miny; - - // downsize from maxx , now I try to using binary divide. - x = maxx; - deltax = -maxx/2; - //j = 0; - while (true) { - x = x + deltax; - thisWindow.resizeTo(x, miny); - thisWindow.resizeTo(x, miny); - diffy = thisWindow.document.body.scrollHeight + gBscrollHeight - x * ClientRate; - if (diffy > gBpermitYDelta ) // it is higher than wanted, so x need to be wide a little bitter - deltax = Math.abs(deltax) /2; - else if (diffy < -gBpermitYDelta) // it is shorter than wanted, so x need to be narrow a little bitter - deltax = -Math.abs(deltax) /2; - else - // the y is close enough to wanted. - break; - if (Math.abs(deltax) < gBpermitXDelta) // the next change is too slight and it can be ignore. - break; - } - size.x = thisWindow.document.body.scrollWidth; //+ gBscrollWidth; - size.y = thisWindow.document.body.scrollHeight;// + gBscrollHeight; - thisWindow.document.body.scroll = 'no'; - } - } - else { - if (thisWindow.document.body.scrollWidth > maxgoldx) { - size.x = maxx; - size.y = miny; - thisWindow.document.body.scroll = 'yes'; - } - else { - // downsize from maxgoldx , now I try to using binary divide. - x = maxgoldx; - deltax = -maxgoldx/2; - while (true) { - x = x + deltax; - thisWindow.resizeTo(x, miny); - thisWindow.resizeTo(x, miny); - diffy = thisWindow.document.body.scrollHeight + gBscrollHeight - x * gBRateH_W; - if (diffy > gBpermitYDelta ) // it is higher than wanted, so x need to be wide a little bitter - deltax = Math.abs(deltax) /2; - else if (diffy < -gBpermitYDelta) // it is shorter than wanted, so x need to be narrow a little bitter - deltax = -Math.abs(deltax) /2; - else - // the y is close enough to wanted. - break; - if (Math.abs(deltax) < gBpermitXDelta) // the next change is too slight and it can be ignore. - break; - } - size.x = thisWindow.document.body.scrollWidth; //+ gBscrollWidth; - size.y = thisWindow.document.body.scrollHeight ; - thisWindow.document.body.scroll = 'no'; // At this time we do not want to show scroll any more. so it will looks better a little. - thisWindow.resizeTo(size.x, size.y); - if (thisWindow.document.body.scrollWidth > size.x) - { - size.x = thisWindow.document.body.scrollWidth; - } - if (thisWindow.document.body.scrollHeight > size.y) - { - size.y = thisWindow.document.body.scrollHeight; - } - } - } - thisWindow.resizeTo(size.x, size.y); - thisWindow.resizeTo(size.x, size.y); - return; + if (!gbBsIE4 && !gbBsOpera7 && !gbBsNS4) + return; + + if ((gbBsMac&&gbBsIE4)||gbBsNS4||gbBsOpera7) { + size.x = 320; + size.y = 180; + return; + } + + // Resize the width until it is wide enough to handle the content + // The trick is to start wide and determine when the scrollHeight changes + // because then we know a scrollbar is necessary. We can then go back + // to the next widest size (for no scrollbar) + + var ClientRate = gBsClientHeight / gBsClientWidth; + + + var GoldenSize = new BSSCSize(0,0); + GoldenSize.x = gBsClientWidth * gBMaxXOfParent; + GoldenSize.y = gBsClientHeight *gBMaxYOfParent ; + + if (ClientRate > gBRateH_W) { + GoldenSize.y = GoldenSize.x * gBRateH_W; + } + else { + GoldenSize.x = GoldenSize.y / gBRateH_W; + } + + // Try to using parent specified max x. + var x = 0; + var maxgoldx = GoldenSize.x; + var maxx = gBsClientWidth * gBMaxXOfParent; + + // This double resize causes the document to re-render (and we need it to) + if (!gbBsIE5) + thisWindow.moveTo(10000,10000); // this is used to fix the flash on IE4. + + thisWindow.resizeTo(1, 1); + thisWindow.resizeTo(1, 1); + thisWindow.resizeTo(maxgoldx, thisWindow.document.body.scrollHeight + gBscrollHeight); + thisWindow.resizeTo(maxgoldx, thisWindow.document.body.scrollHeight + gBscrollHeight); + + var miny = thisWindow.document.body.scrollHeight + gBscrollHeight; + + if (miny > GoldenSize.y) // the popup does not fix in the parent wanted golden area. so try to expand itself as large as it can + { + thisWindow.resizeTo(maxx , thisWindow.document.body.scrollHeight + gBscrollHeight); + thisWindow.resizeTo(maxx , thisWindow.document.body.scrollHeight + gBscrollHeight); + + miny = thisWindow.document.body.scrollHeight + gBscrollHeight; + maxy = gBsClientHeight * gBMaxYOfParent; + + if (miny > maxy) { // the popup must have a scroll, OK let it be. + miny = maxy; + size.x = maxx; + size.y = maxy; + thisWindow.document.body.scroll = 'yes'; // At this time we do want to show scroll any more. so it will looks better a little. + } + else { // popup still can fit in the parent area by someway. now we choose the same h/w rate as parent. + size.y = miny; + + // downsize from maxx , now I try to using binary divide. + x = maxx; + deltax = -maxx/2; + //j = 0; + while (true) { + x = x + deltax; + thisWindow.resizeTo(x, miny); + thisWindow.resizeTo(x, miny); + diffy = thisWindow.document.body.scrollHeight + gBscrollHeight - x * ClientRate; + if (diffy > gBpermitYDelta ) // it is higher than wanted, so x need to be wide a little bitter + deltax = Math.abs(deltax) /2; + else if (diffy < -gBpermitYDelta) // it is shorter than wanted, so x need to be narrow a little bitter + deltax = -Math.abs(deltax) /2; + else + // the y is close enough to wanted. + break; + if (Math.abs(deltax) < gBpermitXDelta) // the next change is too slight and it can be ignore. + break; + } + size.x = thisWindow.document.body.scrollWidth; //+ gBscrollWidth; + size.y = thisWindow.document.body.scrollHeight;// + gBscrollHeight; + thisWindow.document.body.scroll = 'no'; + } + } + else { + if (thisWindow.document.body.scrollWidth > maxgoldx) { + size.x = maxx; + size.y = miny; + thisWindow.document.body.scroll = 'yes'; + } + else { + // downsize from maxgoldx , now I try to using binary divide. + x = maxgoldx; + deltax = -maxgoldx/2; + while (true) { + x = x + deltax; + thisWindow.resizeTo(x, miny); + thisWindow.resizeTo(x, miny); + diffy = thisWindow.document.body.scrollHeight + gBscrollHeight - x * gBRateH_W; + if (diffy > gBpermitYDelta ) // it is higher than wanted, so x need to be wide a little bitter + deltax = Math.abs(deltax) /2; + else if (diffy < -gBpermitYDelta) // it is shorter than wanted, so x need to be narrow a little bitter + deltax = -Math.abs(deltax) /2; + else + // the y is close enough to wanted. + break; + if (Math.abs(deltax) < gBpermitXDelta) // the next change is too slight and it can be ignore. + break; + } + size.x = thisWindow.document.body.scrollWidth; //+ gBscrollWidth; + size.y = thisWindow.document.body.scrollHeight ; + thisWindow.document.body.scroll = 'no'; // At this time we do not want to show scroll any more. so it will looks better a little. + thisWindow.resizeTo(size.x, size.y); + if (thisWindow.document.body.scrollWidth > size.x) + { + size.x = thisWindow.document.body.scrollWidth; + } + if (thisWindow.document.body.scrollHeight > size.y) + { + size.y = thisWindow.document.body.scrollHeight; + } + } + } + thisWindow.resizeTo(size.x, size.y); + thisWindow.resizeTo(size.x, size.y); + return; } function BSSCPopupParentClicked() { - if (!window.gbPopupTimeoutExpired) { - return false; - } - - document.onmousedown = gbOrignalOnMouseDown; + if (!window.gbPopupTimeoutExpired) { + return false; + } + + document.onmousedown = gbOrignalOnMouseDown; - // Simply hide the popup - hideAll(); + // Simply hide the popup + hideAll(); - window.gbPopupTimeoutExpired = false; + window.gbPopupTimeoutExpired = false; - return true; + return true; } function isInsideHyperLink(obj) { - if (obj&&obj!=getParentNode(obj)) - { - if (obj.tagName=="A"||obj.tagName=="IMG") - return true; - else - return isInsideHyperLink(getParentNode(obj)); - } - else - return false; + if (obj&&obj!=getParentNode(obj)) + { + if (obj.tagName=="A"||obj.tagName=="IMG") + return true; + else + return isInsideHyperLink(getParentNode(obj)); + } + else + return false; } function BSSCPopupClicked(e) { - if (!window.gbPopupTimeoutExpired) { - return false; - } - - var popupIFrame = getCurrentPopupIFrame(); - if (popupIFrame == null) { - return true; - } - - if (gbBsIE4 && (!((popupIFrame.window.event != null) && - (popupIFrame.window.event.srcElement != null) && - isInsideHyperLink(popupIFrame.window.event.srcElement)))) { - document.onmousedown = gbOrignalOnMouseDown; - - // Simply hide the popup - hideAll(); - window.gbPopupTimeoutExpired = false; - return true; - } - else if (gbBsNS6 && (!((e != null) && - (e.target!= null) && isInsideHyperLink(e.target)))) - { - document.addEventListener("mousedown", gbOrignalOnMouseDown,false); - // Simply hide the popup - hideAll(); - window.gbPopupTimeoutExpired = false; - return true; - } + if (!window.gbPopupTimeoutExpired) { + return false; + } + + var popupIFrame = getCurrentPopupIFrame(); + if (popupIFrame == null) { + return true; + } + + if (gbBsIE4 && (!((popupIFrame.window.event != null) && + (popupIFrame.window.event.srcElement != null) && + isInsideHyperLink(popupIFrame.window.event.srcElement)))) { + document.onmousedown = gbOrignalOnMouseDown; + + // Simply hide the popup + hideAll(); + window.gbPopupTimeoutExpired = false; + return true; + } + else if (gbBsNS6 && (!((e != null) && + (e.target!= null) && isInsideHyperLink(e.target)))) + { + document.addEventListener("mousedown", gbOrignalOnMouseDown,false); + // Simply hide the popup + hideAll(); + window.gbPopupTimeoutExpired = false; + return true; + } } //trace the mouse over's position for hotspot function BSPSPopupOnMouseOver(event) { - if (gbBsIE4 || gbBsOpera7||gbBsKonqueror3) { - window.gnPopupClickX = event.clientX + getScrollLeft(); - window.gnPopupClickY = event.clientY + getScrollTop(); - window.gnPopupScreenClickX = event.screenX; - window.gnPopupScreenClickY = event.screenY; - } else if (gbBsSafari) { - window.gnPopupClickX = event.clientX + getScrollLeft(); - window.gnPopupClickY = event.clientY + getScrollTop(); - window.gnPopupScreenClickX = event.screenX + window.screenX; - window.gnPopupScreenClickY = event.screenY + window.screenY; - } else if (gbBsNS4) { - window.gnPopupClickX = event.pageX - window.pageXOffset; - window.gnPopupClickY = event.pageY - window.pageYOffset; - window.gnPopupScreenClickX = event.screenX - window.pageXOffset; - window.gnPopupScreenClickY = event.screenY - window.pageYOffset; - } + if (gbBsIE4 || gbBsOpera7||gbBsKonqueror3) { + window.gnPopupClickX = event.clientX + getScrollLeft(); + window.gnPopupClickY = event.clientY + getScrollTop(); + window.gnPopupScreenClickX = event.screenX; + window.gnPopupScreenClickY = event.screenY; + } else if (gbBsSafari) { + window.gnPopupClickX = event.clientX + getScrollLeft(); + window.gnPopupClickY = event.clientY + getScrollTop(); + window.gnPopupScreenClickX = event.screenX + window.screenX; + window.gnPopupScreenClickY = event.screenY + window.screenY; + } else if (gbBsNS4) { + window.gnPopupClickX = event.pageX - window.pageXOffset; + window.gnPopupClickY = event.pageY - window.pageYOffset; + window.gnPopupScreenClickX = event.screenX - window.pageXOffset; + window.gnPopupScreenClickY = event.screenY - window.pageYOffset; + } } function BSSCHidePopupWindow() { - if (window.gPopupWindow != null) { - if (gbBsNS4) { - if ((typeof window.gPopupWindow != "undefined") && (!window.gPopupWindow.closed)) { - window.gPopupWindow.close(); - window.gPopupWindow = null; - } - } - } - return; + if (window.gPopupWindow != null) { + if (gbBsNS4) { + if ((typeof window.gPopupWindow != "undefined") && (!window.gPopupWindow.closed)) { + window.gPopupWindow.close(); + window.gPopupWindow = null; + } + } + } + return; } // Add the PopupOnClick to the onclick array. if (typeof(BsscRegisterOnClick) != "undefined") { - BsscRegisterOnClick(BsPopupOnClick); + BsscRegisterOnClick(BsPopupOnClick); } //End to support previous popup functions @@ -3429,36 +3339,36 @@ if (typeof(BsscRegisterOnClick) != "undefined") function BSSCCreatePopupDiv() { - return; + return; } function WritePopupMenuLayer() { - if (BsscHasExtJs()) {_WritePopupMenuLayer();} + if (BsscHasExtJs()) {_WritePopupMenuLayer();} } function BSSCPopup(strURL, width, height) { - var re = new RegExp("'", 'g'); - strURL = strURL.replace(re, "%27"); - - if (BsscHasExtJs()) { - _BSSCPopup(strURL, width, height); - }else{ - //Create a temporary window first to ensure the real popup comes up on top - var wndTemp = null; - if (!gbBsNS3) { - wndTemp = window.open("", "temp", "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes,height=3,width=4"); - } - // Create the real popup window - var wndPopup = window.open(strURL, "BSSCPopup", "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes,height=300,width=400"); - // Close the temporary - if (!gbBsNS3) { - wndTemp.close(); - } else { - wndPopup.focus(); - } - } + var re = new RegExp("'", 'g'); + strURL = strURL.replace(re, "%27"); + + if (BsscHasExtJs()) { + _BSSCPopup(strURL, width, height); + }else{ + //Create a temporary window first to ensure the real popup comes up on top + var wndTemp = null; + if (!gbBsNS3) { + wndTemp = window.open("", "temp", "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes,height=3,width=4"); + } + // Create the real popup window + var wndPopup = window.open(strURL, "BSSCPopup", "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes,height=300,width=400"); + // Close the temporary + if (!gbBsNS3) { + wndTemp.close(); + } else { + wndPopup.focus(); + } + } } var gbWndTemp = null, gbWndPopupLinks = null; @@ -3466,104 +3376,104 @@ var gbstrParaTotal = ""; function PopupMenu_Invoke() { - if (typeof(wfRelatedTopic) == 'function' && typeof(IsFlashSupported) == 'function') - { - if (Number(gsSkinVersion) > 2 && IsFlashSupported()) - { - return wfRelatedTopic(PopupMenu_Invoke.arguments); - } - } - if (BsscHasExtJs()) { - return _PopupMenu_Invoke(PopupMenu_Invoke.arguments); - } - if (gbBsNS3Before || gbBsIE3Before ) { - var argLen = PopupMenu_Invoke.arguments.length; - if (argLen < 5) { - window.document.location.href = PopupMenu_Invoke.arguments[3]; - return false; - } - gbWndTemp = null; - gbWndPopupLinks = null; - gbstrParaTotal = ""; - for (var i = 0; i < (argLen - 2) / 2; i++) { - var strParaLine = ""; - if (gbBsNS2){ - strParaLine += "" - strParaLine += PopupMenu_Invoke.arguments[2 * i + 2]; - strParaLine += ""; - } else { - strParaLine += " 2 && IsFlashSupported()) + { + return wfRelatedTopic(PopupMenu_Invoke.arguments); + } + } + if (BsscHasExtJs()) { + return _PopupMenu_Invoke(PopupMenu_Invoke.arguments); + } + if (gbBsNS3Before || gbBsIE3Before ) { + var argLen = PopupMenu_Invoke.arguments.length; + if (argLen < 5) { + window.document.location.href = PopupMenu_Invoke.arguments[3]; + return false; + } + gbWndTemp = null; + gbWndPopupLinks = null; + gbstrParaTotal = ""; + for (var i = 0; i < (argLen - 2) / 2; i++) { + var strParaLine = ""; + if (gbBsNS2){ + strParaLine += "" + strParaLine += PopupMenu_Invoke.arguments[2 * i + 2]; + strParaLine += ""; + } else { + strParaLine += ""); - if (gbBsNS2) { - gbWndPopupLinks.document.write(""); - } else { - //YJ: IE301,302 and NS3.x works fine - gbWndPopupLinks.document.write("<"); - gbWndPopupLinks.document.write("script>"); - gbWndPopupLinks.document.write("function gotoUrl(aUrl) {opener.window.location=aUrl; close();}"); - gbWndPopupLinks.document.write("<"); - gbWndPopupLinks.document.write("/script>"); - } - gbWndPopupLinks.document.write(""); - gbWndPopupLinks.document.write(gbstrParaTotal); - gbWndPopupLinks.document.write(""); - gbWndPopupLinks.document.close(); - - // Close the temporary - if (!gbBsNS3 && gbWndTemp != null) { - gbWndTemp.close(); - }else { - gbWndPopupLinks.focus(); - } - - return true; - } - return false; + if (gbWndPopupLinks != null) { + gbWndPopupLinks.document.open("text/html"); + gbWndPopupLinks.document.write(""); + if (gbBsNS2) { + gbWndPopupLinks.document.write(""); + } else { + //YJ: IE301,302 and NS3.x works fine + gbWndPopupLinks.document.write("<"); + gbWndPopupLinks.document.write("script>"); + gbWndPopupLinks.document.write("function gotoUrl(aUrl) {opener.window.location=aUrl; close();}"); + gbWndPopupLinks.document.write("<"); + gbWndPopupLinks.document.write("/script>"); + } + gbWndPopupLinks.document.write(""); + gbWndPopupLinks.document.write(gbstrParaTotal); + gbWndPopupLinks.document.write(""); + gbWndPopupLinks.document.close(); + + // Close the temporary + if (!gbBsNS3 && gbWndTemp != null) { + gbWndTemp.close(); + }else { + gbWndPopupLinks.focus(); + } + + return true; + } + return false; } /// Section End - Embedded Stub (JavaScript 1.0) @@ -3576,400 +3486,400 @@ function PopupMenu_InvokeReady() //Begin to support extended and dropdown text effects. function kadovIsParagraph(el) { - return( el.tagName == "P" || el.tagName.indexOf("H") == 0 ) ? true : false; + return( el.tagName == "P" || el.tagName.indexOf("H") == 0 ) ? true : false; } function kadovInitEachChild(el) -{ - for(var i=0; i "") ) - child.style.setAttribute( "x-on-pageload", "" ); - } - - var href = child.getAttribute("href") - if( href != null && href > "" && href.indexOf( "BSSCPopup" ) >= 0 ) - kadovFilePopupInit(child.id); // Init for Popup - else if( child.className == "dropspot" || child.className == "expandspot" || - child.className == "glossterm" ) - kadovTextPopupInit(child.id);// Init for Expanding/Glossary or DropDown text - else if( child.className == "trigger") - kadovInitTrigger(child.id);// Init for Trigger - else - { - kadovInitEffects(child.id);// Init for DHTML effects - CEngine.SetOneTargetInitialState( child.id ); - } - } - - if( (child.tagName == "IMG") && (child.getAttribute("dynsrc") > "") ) - child.start = "mouseover";// to start a AVI file. fileopen doesn't work - - kadovInitEachChild(child); - } +{ + for(var i=0; i "") ) + child.style.setAttribute( "x-on-pageload", "" ); + } + + var href = child.getAttribute("href") + if( href != null && href > "" && href.indexOf( "BSSCPopup" ) >= 0 ) + kadovFilePopupInit(child.id); // Init for Popup + else if( child.className == "dropspot" || child.className == "expandspot" || + child.className == "glossterm" ) + kadovTextPopupInit(child.id);// Init for Expanding/Glossary or DropDown text + else if( child.className == "trigger") + kadovInitTrigger(child.id);// Init for Trigger + else + { + kadovInitEffects(child.id);// Init for DHTML effects + CEngine.SetOneTargetInitialState( child.id ); + } + } + + if( (child.tagName == "IMG") && (child.getAttribute("dynsrc") > "") ) + child.start = "mouseover";// to start a AVI file. fileopen doesn't work + + kadovInitEachChild(child); + } } function kadovRetrieveTextInner(el) -{ - var x = ""; - if( (!el) || (el.tagName == "!") || (el.tagName == "SCRIPT" )) - return x; - - if( kadovIsParagraph(el) ) - { - var strNewID = " "; - if( el.id != "" ) - strNewID += "id=" + el.id + "_NewSpan "; - x = "" + el.innerHTML + ""; - } - else - { - for(var i=0; i" + el.innerHTML + ""; + } + else + { + for(var i=0; i 0 ) - if( (nTagClose - nTagOpen) != nDistance ) - return strRawHTML; - - var strCleanOnce = strRawHTML.substring(0, nTagOpen) + strRawHTML.substr(nTagClose + strTagClose.length) ; - return kadovRetrieveCleanHTML( strCleanOnce, strTagOpen, strTagClose ); +{ + var nTagOpen = strRawHTML.indexOf( strTagOpen, 0 ); + if( nTagOpen < 0 ) + return strRawHTML; + + var nTagClose = strRawHTML.indexOf( strTagClose, nTagOpen); + if( nTagClose < nTagOpen ) + return strRawHTML; + + if( typeof(nDistance) == "number" && nDistance > 0 ) + if( (nTagClose - nTagOpen) != nDistance ) + return strRawHTML; + + var strCleanOnce = strRawHTML.substring(0, nTagOpen) + strRawHTML.substr(nTagClose + strTagClose.length) ; + return kadovRetrieveCleanHTML( strCleanOnce, strTagOpen, strTagClose ); } function kadovAdjustObjectTag(strRawHTML, nStartPos) {// adjust object tag for related topics HTML control, because innerHTML misses out the item settings - - //Is there any DTC? - var strDTCTagOpen = ''; - var nDTCTagOpen = strRawHTML.indexOf( strDTCTagOpen, nStartPos ); - if( nDTCTagOpen < 0 ) - return strRawHTML; - var nDTCTagClose = strRawHTML.indexOf( strDTCTagClose, nDTCTagOpen ); - if( nDTCTagClose < nDTCTagOpen) - return strRawHTML; // no Design Time Controls; - - //Is the DTC HTML Help Control? - var strRTObjTagOpen = 'classid=clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11'; - var strRTObjTagClose = ''; - var nRTObjTagOpen = strRawHTML.indexOf( strRTObjTagOpen, nDTCTagOpen ); - if( nRTObjTagOpen < nDTCTagOpen ) - return strRawHTML; - var nRTObjTagClose = strRawHTML.indexOf( strRTObjTagClose, nRTObjTagOpen ); - if( nRTObjTagClose < nRTObjTagOpen ) - return strRawHTML; // is not a HTML help control - - // Is it a related Topics html help control? - var strRTObjLabel = ''; - } - - // to insert the reconstructed item params into runtime object tag - var strAdjustedHTML = strRawHTML.substring(0,nRTObjTagClose) + strRunTimeItemParam + strRawHTML.substring(nRTObjTagClose, strRawHTML.length); - return kadovAdjustObjectTag(strAdjustedHTML, nDTCTagClose + strDTCTagClose.length); + + //Is there any DTC? + var strDTCTagOpen = ''; + var nDTCTagOpen = strRawHTML.indexOf( strDTCTagOpen, nStartPos ); + if( nDTCTagOpen < 0 ) + return strRawHTML; + var nDTCTagClose = strRawHTML.indexOf( strDTCTagClose, nDTCTagOpen ); + if( nDTCTagClose < nDTCTagOpen) + return strRawHTML; // no Design Time Controls; + + //Is the DTC HTML Help Control? + var strRTObjTagOpen = 'classid=clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11'; + var strRTObjTagClose = ''; + var nRTObjTagOpen = strRawHTML.indexOf( strRTObjTagOpen, nDTCTagOpen ); + if( nRTObjTagOpen < nDTCTagOpen ) + return strRawHTML; + var nRTObjTagClose = strRawHTML.indexOf( strRTObjTagClose, nRTObjTagOpen ); + if( nRTObjTagClose < nRTObjTagOpen ) + return strRawHTML; // is not a HTML help control + + // Is it a related Topics html help control? + var strRTObjLabel = ''; + } + + // to insert the reconstructed item params into runtime object tag + var strAdjustedHTML = strRawHTML.substring(0,nRTObjTagClose) + strRunTimeItemParam + strRawHTML.substring(nRTObjTagClose, strRawHTML.length); + return kadovAdjustObjectTag(strAdjustedHTML, nDTCTagClose + strDTCTagClose.length); } function kadovTextPopupOnLoad( el ) { - if( typeof(el) == "string" ) - el = getElement(el); - - var src = el.getAttribute( "x-use-popup" ); - var bNeedMove=true; - if(!src&&el.id) - { - for (var i=0;i"); - strCleanHTML = kadovRetrieveCleanHTML(strCleanHTML, ""); - - //work around the bug in HH.exe that highlight the phrases when use Search tab - //this approach is just removing the tag inserted by Microsoft in the runtime - strCleanHTML = kadovRetrieveCleanHTML(strCleanHTML, "", 52); - - var strStyle = " style='display:none; position:relative;"; - var newDiv = "
" + strCleanHTML + "
"; - - removeThis(srcDiv); // empty the original DIV tag - var elParentPra = kadovFindParentParagraph(el); - if( elParentPra ) - insertAdjacentHTML(elParentPra, "afterEnd", newDiv ); - } - else if( type == "expanding" ) - { - var inner = kadovRetrieveTextInner(srcDiv); - if( inner == "" ) - inner = srcDiv.innerHTML; - var strAdjust = kadovAdjustObjectTag(inner,0); - var strCleanHTML = kadovRetrieveCleanHTML(strAdjust, ""); - strCleanHTML = kadovRetrieveCleanHTML(strCleanHTML, ""); - var strClassName = (el.className == "glossterm") ? "glosstext" : "expandtext"; - var newSpan = ""; - removeThis(srcDiv); // empty the original DIV tag - insertAdjacentHTML(el, "afterEnd", newSpan ); - } - } - } - else - { - srcDiv.style.display = "none"; - } - return 0; + if( typeof(el) == "string" ) + el = getElement(el); + + var src = el.getAttribute( "x-use-popup" ); + var bNeedMove=true; + if(!src&&el.id) + { + for (var i=0;i"); + strCleanHTML = kadovRetrieveCleanHTML(strCleanHTML, ""); + + //work around the bug in HH.exe that highlight the phrases when use Search tab + //this approach is just removing the tag inserted by Microsoft in the runtime + strCleanHTML = kadovRetrieveCleanHTML(strCleanHTML, "", 52); + + var strStyle = " style='display:none; position:relative;"; + var newDiv = "
" + strCleanHTML + "
"; + + removeThis(srcDiv); // empty the original DIV tag + var elParentPra = kadovFindParentParagraph(el); + if( elParentPra ) + insertAdjacentHTML(elParentPra, "afterEnd", newDiv ); + } + else if( type == "expanding" ) + { + var inner = kadovRetrieveTextInner(srcDiv); + if( inner == "" ) + inner = srcDiv.innerHTML; + var strAdjust = kadovAdjustObjectTag(inner,0); + var strCleanHTML = kadovRetrieveCleanHTML(strAdjust, ""); + strCleanHTML = kadovRetrieveCleanHTML(strCleanHTML, ""); + var strClassName = (el.className == "glossterm") ? "glosstext" : "expandtext"; + var newSpan = ""; + removeThis(srcDiv); // empty the original DIV tag + insertAdjacentHTML(el, "afterEnd", newSpan ); + } + } + } + else + { + srcDiv.style.display = "none"; + } + return 0; } function getElementsByTag(obj,sTagName) { - if(obj.getElementsByTagName) - return obj.getElementsByTagName(sTagName); - else if(obj.all) - return obj.all.tags(sTagName); - return null; + if(obj.getElementsByTagName) + return obj.getElementsByTagName(sTagName); + else if(obj.all) + return obj.all.tags(sTagName); + return null; } function getElement(sID) { - if(document.getElementById) - return document.getElementById(sID); - else if(document.all) - return document.all(sID); - return null; + if(document.getElementById) + return document.getElementById(sID); + else if(document.all) + return document.all(sID); + return null; } function getParentNode(obj) { - if(obj.parentNode) - return obj.parentNode; - else if(obj.parentElement) - return obj.parentElement; - return null; + if(obj.parentNode) + return obj.parentNode; + else if(obj.parentElement) + return obj.parentElement; + return null; } function getChildNodes(obj) { - if(obj.childNodes) - { - var children = new Array(); - for (var i = 0; i < obj.childNodes.length; i++) - { - if (obj.childNodes[i].nodeType == 1) - children[children.length] = obj.childNodes[i]; - } - return children; - } - else if(obj.children) - return obj.children; - return null; + if(obj.childNodes) + { + var children = new Array(); + for (var i = 0; i < obj.childNodes.length; i++) + { + if (obj.childNodes[i].nodeType == 1) + children[children.length] = obj.childNodes[i]; + } + return children; + } + else if(obj.children) + return obj.children; + return null; } function removeThis(obj) { - if(obj.parentNode) - obj.parentNode.removeChild(obj); - else - obj.outerHTML=""; + if(obj.parentNode) + obj.parentNode.removeChild(obj); + else + obj.outerHTML=""; } function kadovTextPopup( el ) { - if (!gbBsIE4 && !gbBsOpera7 && !gbBsSafari && !gbBsNS6 && !gbBsKonqueror3 ) - return; - - var bNeedMove=true; - - if (window.event) - window.event.cancelBubble = true; - - if( typeof(el) == "string" ) - el = getElement(el); - - if (!el||el==window) - return; - - var src = el.getAttribute( "x-use-popup" ); - if(!src&&el.id) - { - for (var i=0;i= 0 && nNext < values.length ) - { - functions[nIdx] = values.substr( nStart, nNext-nStart+1); - nStart = nNext + 1; - nIdx++; - nNext = values.indexOf( "\)", nStart); - } - - for( var i=0; i= 0 ) - { - nPageClick = arrForClickCount[j].indexOf("="); - if( nPageClick > 0 ) - { - nClickTimes = arrForClickCount[j].substring( nPageClick + 1, arrForClickCount[j].length) * 1; - break; - } - } - } - var args = srcargs; - if( j < arrForClickCount.length ) - {// to strip out the "clicks=99" from the arguments string - args = ""; - for( var k = 0; k < arrForClickCount.length; k ++ ) - { - if( k != j ) - { - args += arrForClickCount[k]; - if( k < arrForClickCount.length - 1 ) - args += ","; - } - } - } - bsscFXInit( null, id, translatedProp, fnname, args, nClickTimes ); - } + var values = null; + if( element.getAttribute( "currentStyle" ) && element.currentStyle.getAttribute) + values = element.currentStyle.getAttribute( prop ); + else if (element.style.getAttribute) + values = element.style.getAttribute( prop ); + if( !values ) + return; + + var functions = new Array(); + var nIdx = 0, nStart = 0; + var nNext = values.indexOf( "\)", 0); + while( nNext >= 0 && nNext < values.length ) + { + functions[nIdx] = values.substr( nStart, nNext-nStart+1); + nStart = nNext + 1; + nIdx++; + nNext = values.indexOf( "\)", nStart); + } + + for( var i=0; i= 0 ) + { + nPageClick = arrForClickCount[j].indexOf("="); + if( nPageClick > 0 ) + { + nClickTimes = arrForClickCount[j].substring( nPageClick + 1, arrForClickCount[j].length) * 1; + break; + } + } + } + var args = srcargs; + if( j < arrForClickCount.length ) + {// to strip out the "clicks=99" from the arguments string + args = ""; + for( var k = 0; k < arrForClickCount.length; k ++ ) + { + if( k != j ) + { + args += arrForClickCount[k]; + if( k < arrForClickCount.length - 1 ) + args += ","; + } + } + } + bsscFXInit( null, id, translatedProp, fnname, args, nClickTimes ); + } } function kadovTranslateProp( prop ) { - switch( prop ) - { - case "x-on-hover" : return "bsschover"; - case "x-on-pageclick" : return "bsscpageclick"; - case "x-on-pageload" : return "bsscpageload"; - case "x-on-trigger-1" : return "bssctrigger1"; - case "x-on-trigger-2" : return "bssctrigger2"; - } - return null; + switch( prop ) + { + case "x-on-hover" : return "bsschover"; + case "x-on-pageclick" : return "bsscpageclick"; + case "x-on-pageload" : return "bsscpageload"; + case "x-on-trigger-1" : return "bssctrigger1"; + case "x-on-trigger-2" : return "bssctrigger2"; + } + return null; } //End to convert iWrite format to RoboEditor Format for DHTML effects //Begin the definition of one entry to DHTML effects function bsscFXInit( trigger_ID, target_ID, event_type, - action_type, action_setting, event_addional ) + action_type, action_setting, event_addional ) { - if( (!gbBsWindows && !gbBsSunOS && !(gbBsMac&&gbBsIE5)) || typeof(target_ID) != "string" )//MUST have a target_ID - return; // we don't support Navigator yet - - if( typeof(event_type) == "string" ) - event_type = event_type.toLowerCase(); - if( typeof(action_type) == "string" ) - action_type = action_type.toLowerCase(); - if( typeof(action_setting) == "string" ) - action_setting = action_setting.toLowerCase(); - - // to get the target element then add it to the target list - var eleTarget = CCSSP.GetObject( target_ID ); - if( (eleTarget != null) && (event_type != null) && (action_type != null) ) - { - CEngine.AddOneTarget( target_ID, eleTarget ); - CEngine.BuildTargetObject(target_ID, event_type, action_type, action_setting, event_addional); - } - - // to validate the trigger_ID parameter - if( typeof(trigger_ID) == "string" && trigger_ID != "" ) - CEngine.BuildTriggerObject( trigger_ID, target_ID ); -} + if( (!gbBsWindows && !gbBsSunOS && !(gbBsMac&&gbBsIE5)) || typeof(target_ID) != "string" )//MUST have a target_ID + return; // we don't support Navigator yet + + if( typeof(event_type) == "string" ) + event_type = event_type.toLowerCase(); + if( typeof(action_type) == "string" ) + action_type = action_type.toLowerCase(); + if( typeof(action_setting) == "string" ) + action_setting = action_setting.toLowerCase(); + + // to get the target element then add it to the target list + var eleTarget = CCSSP.GetObject( target_ID ); + if( (eleTarget != null) && (event_type != null) && (action_type != null) ) + { + CEngine.AddOneTarget( target_ID, eleTarget ); + CEngine.BuildTargetObject(target_ID, event_type, action_type, action_setting, event_addional); + } + + // to validate the trigger_ID parameter + if( typeof(trigger_ID) == "string" && trigger_ID != "" ) + CEngine.BuildTriggerObject( trigger_ID, target_ID ); +} //End the definition of one entry to DHTML effects /// Section End - kadov DHTM (JavaScript 1.2) @@ -4170,306 +4080,306 @@ function CCSSP(){} // constructor of CCSSP class CCSSP.GetObject = function( obj ) {//convert object name string or reference into a valid object reference - if( typeof(obj) == "object" ) - return obj; - else if( typeof(obj) == "string" && obj != "") - { - if( gbBsNS4 ) - return eval("document." + obj); - else - return eval("document.all(\"" + obj + "\")"); - } - else - return null; + if( typeof(obj) == "object" ) + return obj; + else if( typeof(obj) == "string" && obj != "") + { + if( gbBsNS4 ) + return eval("document." + obj); + else + return eval("document.all(\"" + obj + "\")"); + } + else + return null; } CCSSP.MoveObjectTo = function(obj, x, y) {//positioning an object at a specific pixel coordinate - if( gbBsNS4 ) - obj.moveTo(x,y); - else - { - obj.style.pixelLeft = x; - obj.style.pixelTop = y; - } + if( gbBsNS4 ) + obj.moveTo(x,y); + else + { + obj.style.pixelLeft = x; + obj.style.pixelTop = y; + } } CCSSP.MoveObjectBy = function(obj, dx, dy) {//moveing a object by x and/or y pixel - if( gbBsNS4 ) - obj.moveBy(dx,dy); - else - { - obj.style.pixelLeft += dx; - obj.style.pixelTop += dy; - } + if( gbBsNS4 ) + obj.moveBy(dx,dy); + else + { + obj.style.pixelLeft += dx; + obj.style.pixelTop += dy; + } } CCSSP.SetObjectBGColor = function(obj, color) {//set the background color of an object - if( gbBsNS4 ) - obj.bgColor = color; - else - obj.style.backgroundColor = color; + if( gbBsNS4 ) + obj.bgColor = color; + else + obj.style.backgroundColor = color; } CCSSP.ShowObject = function(obj, bShow) {// set the object to be visible or invisible - if( gbBsNS4 ) - obj.visibility = (bShow == true) ? 'show' : 'hide'; - else - obj.style.visibility = (bShow == true) ? 'visible' : 'hidden';// when hidden, it still occupy some space. + if( gbBsNS4 ) + obj.visibility = (bShow == true) ? 'show' : 'hide'; + else + obj.style.visibility = (bShow == true) ? 'visible' : 'hidden';// when hidden, it still occupy some space. } CCSSP.GetObjectLeft = function(obj) {// retrieve the x coordinate of a posionable object - if( gbBsNS4 ) - return obj.left; - else - return obj.style.pixelLeft; + if( gbBsNS4 ) + return obj.left; + else + return obj.style.pixelLeft; } CCSSP.GetObjectTop = function(obj) {// retrieve the y coordinate of a posionable object - if( gbBsNS4 ) - return obj.top; - else - return obj.style.pixelTop; + if( gbBsNS4 ) + return obj.top; + else + return obj.style.pixelTop; } CCSSP.GetObjectContainLeft = function(obj) {// retrieve the x coordinate of a posionable object relative to it's parent element - if( gbBsNS4 ) - return obj.pageX; - else - { - if( obj == document.body ) - return obj.clientLeft; - else - return obj.offsetLeft; - } + if( gbBsNS4 ) + return obj.pageX; + else + { + if( obj == document.body ) + return obj.clientLeft; + else + return obj.offsetLeft; + } } CCSSP.GetObjectWindowLeft = function(obj) {// retrieve the x coordinate of a posionable object relative to browser window - if( gbBsNS4 ) - return obj.pageX; - else - { - var nOffsetWindowLeft = 0; - for(var element = obj; element; element = element.offsetParent) - nOffsetWindowLeft += CCSSP.GetObjectContainLeft(element); - return nOffsetWindowLeft; - } + if( gbBsNS4 ) + return obj.pageX; + else + { + var nOffsetWindowLeft = 0; + for(var element = obj; element; element = element.offsetParent) + nOffsetWindowLeft += CCSSP.GetObjectContainLeft(element); + return nOffsetWindowLeft; + } } CCSSP.GetObjectContainTop = function(obj) {// retrieve the y coordinate of a posionable object relative to it's parent element - if( gbBsNS4 ) - return obj.pageY; - else - { - if( obj == document.body ) - return obj.clientTop; - else - return obj.offsetTop; - } + if( gbBsNS4 ) + return obj.pageY; + else + { + if( obj == document.body ) + return obj.clientTop; + else + return obj.offsetTop; + } } CCSSP.GetObjectWindowTop = function(obj) {// retrieve the y coordinate of a posionable object relative to browser window - if( gbBsNS4 ) - return obj.pageY; - else - { - var nOffsetWindowTop = 0; - for(var element = obj; element; element = element.offsetParent) - nOffsetWindowTop += CCSSP.GetObjectContainTop(element); - return nOffsetWindowTop; - } + if( gbBsNS4 ) + return obj.pageY; + else + { + var nOffsetWindowTop = 0; + for(var element = obj; element; element = element.offsetParent) + nOffsetWindowTop += CCSSP.GetObjectContainTop(element); + return nOffsetWindowTop; + } } CCSSP.GetObjectHeight = function(obj) {// retrieve the height of a posionable object - if( gbBsNS4 ) - return obj.clip.height; - else - return obj.offsetHeight; + if( gbBsNS4 ) + return obj.clip.height; + else + return obj.offsetHeight; } CCSSP.GetObjectWidth = function(obj) {// retrieve the width of a posionable object - if( gbBsNS4 ) - return obj.clip.width; - else - return obj.offsetWidth; + if( gbBsNS4 ) + return obj.clip.width; + else + return obj.offsetWidth; } CCSSP.RegisterEventHandler = function( srcObj, rawEventName, funcHandler ) { // to add the "funcHandler" as the "rawEventName" 's handler to the "srcObj" object,the original event handler will be combined - if (gbBsNS4 && !gbBsNS6) - return ; - - var oldHandler = ""; - - if (gbBsMac &&gbBsIE4&&!gbBsIE5) - { - if (typeof(srcObj[rawEventName.toLowerCase()])=="unknown") - { //search for