Using in handcoded projects |
![]() ![]() ![]() |
It is easy to use the Window fixer in a hand coded project.
First you need to add two lines to the project file:
_ITFixWinDllMode_=>0
_ITFixWinLinkMode_=>1
This is for stand alone exe or a base dll exporting declarations. For anything else use:
_ITFixWinDllMode_=>1
_ITFixWinLinkMode_=>0
You need to include the class in your global module:
Include('ITFixWindowClass.inc'),ONCE
You can now instanciate the class and use it anywhere in your project:
ITWinFix ITFixWindowClass
Code
Open(W)
!! Set the window position
ITWinFix.FixWindowXYPos
A simple hand coded project is included in the examples, that looks like this:
Program
Include('KEYCODES.CLW'),ONCE
Include('ITFixWindowClass.inc'),ONCE
Map
End
ITWinFix ITFixWindowClass
W WINDOW('Test window'),AT(,,256,159),SYSTEM,GRAY,RESIZE
PROMPT('Move the window partially outside of a montior and click the "Fix Window" button' &|
' on hit Ctrl-F'),AT(7,14,218,19),USE(?Prompt1),FONT('Arial',9,,FONT:bold)
BUTTON('Fix Window'),AT(102,64,45,14),USE(?Button1),KEY(CtrlF)
END
Code
Open(W)
SetPosition(0,-20,-10)
Display
Accept
Case Field()
Of ?Button1
Case Event()
Of EVENT:Accepted
ITWinFix.FixWindowXYPos
End
End
End
Close(W)
The project file looks like this:
--
#noedit
#system win32
#model clarion dll
#pragma debug(vid=>full)
#pragma optimize(cpu=>386)
#pragma define(_ITFixWinDllMode_=>0)
#pragma define(_ITFixWinLinkMode_=>1)
#compile "HCProject.clw"
#link "HCProject.exe"