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
!!! 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 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 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 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 |
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 | |
GetSetWindowLongFEQ_GWL_Style Procedure(LONG ControlFEQ, LONG BitsOFF, LONG BitsON) ,LONG,PROC | |
GetSetWindowLongFEQ_GWL_ExStyle Procedure(LONG ControlFEQ, LONG BitsOFF, LONG BitsON) ,LONG,PROC | |
GetSetWindowLongFEQ Procedure(LONG ControlFEQ, LONG WLnIndex, LONG BitsOFF, LONG BitsON) ,LONG,PROC | |
GetSetWindowLongHnd Procedure(LONG WndHandle, LONG WLnIndex, LONG BitsOFF, LONG BitsON) ,LONG,PROC | |
module('win32') | |
GetWindowLong(SIGNED hWnd, SIGNED nIndex ),PASCAL,RAW,LONG,PROC,NAME('GetWindowLongA'),DLL(1) | |
SetWindowLong(SIGNED hWnd, SIGNED nIndex, LONG dwNewLong ),PASCAL,RAW,LONG,PROC,NAME('SetWindowLongA'),DLL(1) | |
end |
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
!There are a few Remove() things here, what you want is FileApiRemove FUNCTION(STRING Fn2Delete),LONG,PROC | |
! | |
!In C8 Clarion REMOVE() was enhanced a second parameter with flags to allow wildcards, recursion, etc | |
!It was changed from calling API DeleteFile() to use the much more complicated ShFileOperation() | |
!This makes it much slower and more bug prone | |
! | |
!My replacement FileApiRemove() uses API DeleteFile() then sets the Claion Error so it can replace | |
!an existing REMOVE() in Clarion code. If you are using Remove(FILE) you'll need REMOVE(Name(File)) | |
!or you can create a FileApi2Remove(FILE FileRef) that calls FileApiRemove(FileRef{PROP:Name}) or NAME() | |
!I named it "FileApiRemove(" so if you are searching "REMOVE(" you'll file it, versus RemoveUsingAPI() would not. |
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
Backup_CW_Project.BAT https://gist.github.com/CarlTBarnes/bbb936e418226d55ff8651bb1bfbf7e4 Backup Clarion Project BAT files | |
CBAltWin7Fix.tpl https://gist.github.com/CarlTBarnes/5e0e7d5a3e3f0b5c991e8f0601e69004 Fix Alt key lockup problem with the latest version of Windows 10 that I wrote and published in ClarionMag | |
CascadeMdiChildren.clw https://gist.github.com/CarlTBarnes/ed29557b7142ec4695f7d460cabef3fd Cascade open MDI Child windows like Clarion RTL STD:CascadeWindow using Windows API | |
Clarion_Hub_Interesting.txt https://gist.github.com/CarlTBarnes/aabb812d5a34fcfe69d2421702799aef Clarion Hub links of interest | |
CloseWindowHook.clw https://gist.github.com/CarlTBarnes/f86f6b695276b2b3327f5959e5c57682 Prop:CloseWindowHook Example Clarion | |
DateSplit.clw |
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
!When a GROUP X/Y Position is changed it does NOT move the Child Controls | |
!This loops through the child controls and moves each one | |
! | |
!The XAdjust / YAdjust parameters allow some extra move from the TO Control X/Y | |
!------------------------------------------------------------------------------------ | |
MAP | |
GroupMoveChildren(LONG FromGroup, LONG ToControl, LONG XAdjust=0, LONG YAdjust=0) | |
END | |
NewerOlder