This file contains hidden or 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
| !Report Test ABCPreview And Window Framework by Carl Barnes from https://gist.github.com/CarlTBarnes | |
| !Using ABC Report Previewer instead of my simple previewer | |
| ! | |
| !This includes a Window to have controls to configure the Report output, and set the Printer, etc. | |
| ! | |
| !----------------------------------------------------------------------------- | |
| !Try various REPORT specs and PROP Settings quicky in this little Win32 project that has its own simple Previewer. | |
| !If you want to report a bug this can be used to create a small example | |
| ! | |
| !1. Create a new Win32 Project and paste this code. |
This file contains hidden or 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
| PROGRAM !Scratch program by Carl Barnes - Version 8/1/2020 - Download https://git.io/JtPKE | |
| INCLUDE('TplEqu.CLW') | |
| INCLUDE('KeyCodes.CLW') | |
| MAP | |
| main PROCEDURE() | |
| DB PROCEDURE(STRING DebugMessage) | |
| DBClear PROCEDURE() !Clear DebugView Buffer | |
| Hex8 PROCEDURE(LONG LongInt),STRING |
This file contains hidden or 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
| Carl's Class Template to make a Basic Class: _Class_Make_Basic_v5.inc.clw | |
| Find and Replace _Token_ like _ClassFile_ _ClassName_ | |
| Find and Replace __Proc_# with the Procedure Name you prefer. Add any addional. Optional, I used do this as I code each method. | |
| Save this as 2 files an .INC and .CLW | |
| !Region Class Description ----------------------------------------------------- | |
| ! _ClassFile_ by Carl Barnes created on // for | |
| ! | |
| ! This Class description |
This file contains hidden or 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
| Do not use | |
| In testing Cla$FASTCLIP has problems in Release builds. I cannot recall exacyly what. I will not use it any longer. | |
| Note that StringTheory docs show it was added, then removed | |
| Version 3.23 - 13 June 2020 | |
| Fix: The use of FastClip has been removed. The function seems to be unreliable, failing one test in release mode (but nor debug mode) leading to an off-by-one error. Worse the problem is fixed by adding unrelated TRACE calls nearby, suggesting some sort of internal memory issue in the function. | |
| --------------------------- | |
| MODULE('RTL') | |
| LenFastClip PROCEDURE(CONST *STRING Text2Measure),LONG,NAME('Cla$FASTCLIP'),DLL(dll_mode) |
This file contains hidden or 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
| !Add local ReportPrint() | |
| !Define: DbgString BYTE | |
| ! | |
| !Change PRINT(Rpt:Detail) to ReportPrint(?Detail,'Rpt:Detail') | |
| !If desired set DbgString=1 and each Band gets a String Label 'Rpt:Detail' | |
| MAP | |
| ReportPrint PROCEDURE(LONG BandFEQ, STRING BandName) | |
| END |
This file contains hidden or 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
| !Use the POPUP('xxx', X, Y, 1=Relative) to position a POPUP() right under a Button so it appears to drop down | |
| !The fourth parameter is not documented well. Pass 1 to indicate the X/Y are Relative so can use Clarion GetPosition() | |
| ! | |
| !Replace existing Popup() placing the ?Control as the first parameter | |
| !Example: OF ?MenuBtn ; CASE PopupUnder(?,'Copy|Delete') | |
| !--------------------------------------- | |
| MAP | |
| PopupBeside(LONG BesideCtrlFEQ, STRING PopMenu),LONG | |
| PopupUnder(LONG UnderCtrlFEQ, STRING PopMenu),LONG | |
| PopupBeside PROCEDURE(LONG BesideCtrlFEQ, STRING PopMenu),LONG |
This file contains hidden or 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 hidden or 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
| !!! 1. In Global Data / Program add thse 2 lines | |
| PRAGMA('compile(ResCode.CLW)') | |
| INCLUDE('ResDef.CLW'),ONCE | |
| !!! 2. For each Window to Resize | |
| !!! 2a. Add to Procedure DATA | |
| WinResize WindowResizeType |
This file contains hidden or 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(LONG Hours=0, LONG Mins=0, LONG Secs=0, LONG Hundredths=0),LONG !Time Join H:M:S.D | |
| TimeHMS2 PROCEDURE(BYTE Hours=0, BYTE Mins=0, BYTE Secs=0, BYTE Hundredths=0),LONG !Must have valid H,M,S | |
| DateSplit PROCEDURE(LONG Date2Split, <*? OutMonth>, <*? OutDay>, <*? OutYear>) | |
| !========================================================================================================== | |
| TimeHMS PROCEDURE(LONG H=0, LONG M=0, LONG S=0, LONG Hundredths=0)!,LONG | |
| !This allows out of range HMS values, e.g. you can pass 90 minutes | |
| CODE | |
| RETURN (H * 60*60*100) + | !3600 Seconds in 1 Hour *100=360,000 | |
| (M * 60*100) + | ! 60 Seconds in 1 Minute *100= 6,000 |
This file contains hidden or 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
| DateSplit PROCEDURE(LONG Date2Split, <*? OutMonth>, <*? OutDay>, <*? OutYear>) | |
| !========================================================================================================== | |
| DateSplit PROCEDURE(LONG Date2Split, <*? OutMonth>, <*? OutDay>, <*? OutYear>) | |
| !Use DateSplit(Today,M,D,Y) instead of M=MONTH(Today) ; D=DAY(Today) ; Y=YEAR(Today) | |
| D1 DATE,AUTO | |
| DG GROUP, OVER(D1) | |
| D BYTE | |
| M BYTE | |
| Y USHORT | |
| END |
NewerOlder