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
!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 | |
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
!Search and Replace inside a STRING | |
MAP | |
ReplaceInto PROCEDURE(*STRING Into, STRING FindTxt,STRING ReplaceTxt,BYTE ClipInto=0),LONG,PROC !Returns Count | |
ReplaceText PROCEDURE(STRING InText,STRING FindTxt,STRING ReplaceTxt,BYTE ClipInto=0),STRING !Returns Strng with FindTxt Replaced | |
END | |
!------------------------------------------------------------------------------------------------------ | |
ReplaceInto PROCEDURE(*STRING Into, STRING Find,STRING Repl,BYTE ClipInto=0)!,LONG,PROC !Returns Count | |
X LONG,AUTO | |
L LONG,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
MAP | |
ListDropDown PROCEDURE(LONG FeqList, BOOL RollUp=0) !0=Down 1=Roll Up | |
MODULE('Win32') | |
PostMessage(LONG hWnd,LONG wMsg,LONG wParam,LONG lParam),BOOL,PROC,PASCAL,DLL(1),NAME('PostMessageA') | |
END | |
END | |
ListDropDown PROCEDURE(LONG FeqList, BOOL RollUp=0) !0=Down 1=Roll Up | |
CODE !CB_SHOWDROPDOWN = &H14F |
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
!This CLASS was written to **replace page checking code** in reports that was in many places | |
!For most all people the **replace** comment will NOT apply. | |
! | |
!This is not an easy an easy thing to do. I cannot explain it all here. | |
! | |
! Steps to Implement ManRpt Class | |
! | |
!1. Add the Extension Template ReportLineHeightMaxSet Template so all lines have | |
! a. Sets all DETAIL PROP:MaxHeight=Height so line Height is exactly correct | |
! b. For all DETAILs defines LnHt_Label LONG variable and sets = DETAIL PROP:Height for use with Height calcs |
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
! Version 2 - DROP and No DROP in one procedure. FORMAT() and ~Header option | |
! Generate LIST,DROP,FROM() reading OPTION and RADIOs -- or LIST without DROP | |
! Option + Radio's take mnore space that a LIST,DROP,FROM('radio|radio|radio') | |
! The Option can be easier for the User and more obvious of all the choices without dropping | |
! Some times you don't have the space, or too many Options can be visual clutter | |
! | |
PROGRAM | |
MAP | |
Option2DropList PROCEDURE() !Add this to your program and a button on the Window to call it, | |
MODULE('RTL') !Global MAP Requires this |
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
!See https://clarionhub.com/t/how-to-make-drop-list-more-visible-on-the-window/3760?u=carlbarnes | |
!Make Drop lists more visible coloring like Tool Tip, easier to see with Format and +1 Line Spacing | |
!------------------------- | |
DropListPretty PROCEDURE | |
Fld LONG,AUTO | |
LstFEQ LONG,AUTO !Drop List is separate control Fld{PROP:Drop} | |
CODE | |
Fld=0 | |
LOOP | |
Fld=0{PROP:NextField,Fld} |
NewerOlder