This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DB PROCEDURE(STRING xMsg) | |
Prfx EQUATE('Prefix: ') | |
sz CSTRING(SIZE(Prfx)+SIZE(xMsg)+3),AUTO | |
CODE | |
sz=Prfx & CLIP(xMsg) & '<13,10>' | |
OutputDebugString(sz) | |
!---------------------------------------- | |
DB PROCEDURE(STRING xMessage) | |
Prfx EQUATE('PrefixText: ') !All output gets this | |
sz CSTRING(SIZE(Prfx)+SIZE(xMessage)+3),AUTO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- #################### Clarion110.RED #################### -- | |
-- Project Redirection for Clarion 11.0 to Copy the Clarion10\Bin\Debug DLLs only for Debug builds | |
-- This RED has a [Copy] *.dll = %BIN%\debug | |
{include clarion_DebugDllCopy.red} | |
-- this includes the normal RED -- | |
{include %REDDIR%\%REDNAME%} | |
-- review: https://clarionhub.com/t/how-to-improve-the-call-stack-when-your-program-gpfs/188 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ManifestFixup PROCEDURE(BYTE SheetNoTheme=1, BYTE ColorAsWindow=0) | |
FEQ LONG,AUTO | |
CODE !Changes VistaManifest.TPW Template makes ... | |
FEQ=0 | |
LOOP | |
FEQ=0{PROP:NextField,FEQ} ; IF ~FEQ THEN BREAK. | |
CASE FEQ{PROP:Type} | |
OF Create:sheet | |
IF SheetNoTheme THEN FEQ{PROP:NoTheme}=1. !%ForceSHEETNoTheme | |
OF Create:OPTION OROF Create:GROUP OROF Create:RADIO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!--Step 1.-- Define MAP with Function that has DLL(1) or DLL(_fp_), and must have NAME() that matches LONG in step 2 | |
MAP | |
GetProcsByName PROCEDURE(BYTE ShowErrors=0),BOOL | |
MODULE('Win32') | |
SetWindowDisplayAffinity PROCEDURE(SIGNED hWnd, UNSIGNED dwAffinity),BOOL,PROC,PASCAL,DLL(_fp_),NAME('SetWinDspAff') | |
! ^^^^ ^^^^^^^^^^^^ | |
LoadLibraryA PROCEDURE(*CSTRING pszModuleFileName),LONG,RAW,PASCAL,DLL(1) | |
FreeLibrary PROCEDURE(LONG hModule),BOOL,PASCAL,DLL(1),PROC | |
GetModuleHandleA PROCEDURE(*CSTRING lpModuleName),LONG,RAW,PASCAL,DLL(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!An update program used MANY procedures and the tree was not well defined. | |
!Some were Process Templates that had a Cancel button showing. I wanted to hide the Cancel buttons. | |
!How to find the procedures? | |
!I used PROP:CloseWindowHook and checked for a PROGRESS and BUTTON that was Visible and Enabled | |
!------------------------------------------------------------------------------------------------ | |
!My Templates have been modified after Open(Window) to store the procedure name in a user Property | |
!This is handy at times for Debug | |
! | |
! STANDARD.TPW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAP | |
FileExtension PROCEDURE(*STRING FN),STRING | |
MODULE('RTL') | |
LenFastClip PROCEDURE(CONST *STRING Text2Measure),LONG,NAME('Cla$FASTCLIP') | |
END | |
END | |
!-------------------------------------- | |
FileExtension PROCEDURE(*STRING FN)!,STRING | |
L USHORT,AUTO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!From https://clarionhub.com/t/how-to-detect-if-an-outputdebugstring-viewer-is-running/241 | |
!I have not tested this code | |
PROGRAM | |
!INCLUDE('Windows.inc'),ONCE | |
MAP | |
OutputDebugStringNotReady(),BOOL !0=Ready, Non-Zero indicates Not Ready | |
MODULE('Standard Windows APIs') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAP | |
MODULE('Win32') | |
SendMessageA(LONG hWnd, LONG nMsg, LONG wParam, LONG lParam),LONG,PROC,PASCAL,DLL(1) | |
!https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-mdicascade | |
. . | |
CascadeWindows ROUTINE !Like STD:CascadeWindow Clarion RTL | |
!Message must be sent to the Frame MDI Client Handle and not the Frame Handle | |
SendMessageA( AppFrame{PROP:ClientHandle} , 0227H, 4, 0) | |
EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAP | |
Hex8(LONG Lng),STRING !Return 8 digit hex with trailing 'h' | |
HexFmt(LONG Lng),STRING !Return minimum hex pairs w/o 'h' | |
HexDigits(ULONG Lng),STRING !Return minimum Hex Digits, may be odd | |
HexPairs(ULONG Lng),STRING !Return minimum Hex Pairs | |
HexClarion(ULONG Lng),STRING !Clarion Valid Hex with trailing 'h', plus leading '0' for A-F | |
END | |
!================================= | |
Hex8 PROCEDURE(LONG Lng)!,STRING !Return 8 digit hex with trailing 'h' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TimeSplit PROCEDURE(LONG Time2Split, *? OutHour, *? OutMinute, <*? OutSecond>, <*? OutHundred>) | |
TimeHMS PROCEDURE(SHORT Hours, SHORT Mins, SHORT Secs=0, SHORT Hundredths=0),LONG !Time Join H:M:S.D | |
TimeHMS2 PROCEDURE(BYTE Hours, BYTE Mins, BYTE Secs=0, BYTE Hundredths=0),LONG !Must have valid H,M,S | |
DateSplit PROCEDURE(LONG Date2Split, *? OutMonth, *? OutDay, *? OutYear) | |
!========================================================================================================== | |
TimeHMS PROCEDURE(SHORT H, SHORT M, SHORT S=0, SHORT Hundredths=0)!,LONG | |
!This allows out of range HMS values, e.g. you can pass 90 minutes | |
CODE | |
RETURN (H * 60*60*100) + | | |
(M * 60*100) + | |
OlderNewer