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
!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
DowName PROCEDURE(LONG pDate)!,STRING | |
CODE | |
RETURN CHOOSE( pDate % 7 + 1,'Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','???') |
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
MonthName PROCEDURE(LONG DateOrMonth),STRING !Pass Clarion Date or Month Number 1 to 12 - Month name from @d04 | |
MonthName2 PROCEDURE(LONG DateOrMonth),STRING !Pass Clarion Date or Month Number 1 to 12 - Month name English Only | |
MonthName PROCEDURE(LONG DateOrMonth)!,STRING | |
N STRING(32),AUTO | |
CODE | |
IF DateOrMonth <= 12 THEN | |
DateOrMonth=DATE(DateOrMonth,1,2000) | |
END | |
N=FORMAT(DateOrMonth,@d04) !Format Month ##, YYYY |
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
#TEMPLATE (CBAltFix, 'Carl Barnes fix for Alt Key Lockup in Windows 7'),FAMILY('ABC','CW20') | |
#!=========================================================================== | |
#! Warning! Version 2 of the template changes things. | |
#! The Global template AltWin7Fix_Global has been removed and is no longer needed. | |
#! The Frame template AltWin7Fix_Frame has been renamed because it has new questions | |
#! Only the Frame Extension template is required, it is where you specify all choices. | |
#! It has a new name AltWin7Fix_Frame2 so you must populate it again on the Frame. | |
#! If you used the first version of the template you will get errors when you open | |
#! an APP. Ignore the errors, you should open the Frame, go to Extenstions and add the new template. | |
#! *** Removed ===>#EXTENSION (AltWin7Fix_Global,'Fix Windows 7 Alt Key Lockup-Global-by Carl Barnes'), APPLICATION |
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 | |
ParseTokenStringIntoQueue(CONST *STRING pString,STRING pToken,*QUEUE OutQueue,BYTE pBlanksOk=0),LONG,PROC !Return Count | |
END | |
ParseTokenStringIntoQueue PROCEDURE(CONST *STRING pString,STRING pToken,*QUEUE OutQueue,BYTE pBlanksOk=0)!,LONG,PROC !Return Count | |
SLen LONG,AUTO !pString Length | |
Ndx LONG,AUTO | |
TokenVal BYTE,AUTO !When hunting for chars I like VAL compares | |
BegPos LONG(1) !BegPos = 1 required to work right | |
EndPos LONG,AUTO !EndPos = 0 required to work right |
OlderNewer