-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
2,638 additions
and
1,544 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,113 @@ | ||
(****************************************************************************** | ||
* Module GlobWin | ||
* | ||
* This module provides global access to some commonly used functions | ||
* which are closely tied to the Windows API. | ||
******************************************************************************) | ||
(*****************************************************************************) | ||
(* *) | ||
(* Project: BoostEd32 *) | ||
(* *) | ||
(* Module: GlobWin V 2.00.04 *) | ||
(* 2004OCT18 *) | ||
(* PURPOSE: This module provides global access to some commonly used *) | ||
(* functions which are closely tied to the Windows API. *) | ||
(* *) | ||
(* FUNCTIONS: *) | ||
(* *) | ||
(* Author(s): *) | ||
(* Michael Bogner, Max Mayrbäurl *) | ||
(* BL Bernhard Leisch *) | ||
(* Alexander Bergsmann *) | ||
(* KlS schultze-schoenberg@t-online.de *) | ||
(* *) | ||
(* Configuration Management *) | ||
(* *) | ||
(* created *) | ||
(* 1998 *) | ||
(* *) | ||
(* update *) | ||
(* *) | ||
(* release *) | ||
(* *) | ||
(* Comments *) | ||
(* *) | ||
(*****************************************************************************) | ||
|
||
MODULE GlobWin; | ||
|
||
IMPORT SYSTEM, | ||
WD:=WinDef, WB:=WinBase, WU:=WinUser, WN:=WinNT, | ||
Strings; | ||
IMPORT | ||
Strings, | ||
WinBase, WinDef, WinNT, WinUser, | ||
SYSTEM; | ||
|
||
CONST | ||
HELPFILENAME="BoostEd.hlp"; | ||
HELPFILENAME = "BoostEd.hlp"; | ||
|
||
VAR | ||
hInstance* : WD.HINSTANCE; | ||
hInstance*: WinDef.HINSTANCE; | ||
|
||
|
||
PROCEDURE DisplayError*(title: ARRAY OF CHAR; msg: ARRAY OF CHAR); | ||
(* Show a pop-up window with an error message. | ||
The procedure returns after the user has acknowledged | ||
the error message. *) | ||
VAR | ||
r: WD.BOOL; | ||
(*****************************************************************************) | ||
PROCEDURE DisplayError* (Title: ARRAY OF CHAR; | ||
Message: ARRAY OF CHAR); | ||
(* Show a pop-up window with an error message. *) | ||
(* The procedure returns after the user has acknowledged the error message. *) | ||
VAR | ||
ResultBool: WinDef.BOOL; | ||
BEGIN | ||
r := WU.MessageBoxA(WD.NULL, SYSTEM.ADR(msg), SYSTEM.ADR(title), WU.MB_OK); | ||
ResultBool := WinUser.MessageBoxA(WinDef.NULL, | ||
SYSTEM.ADR(Message), | ||
SYSTEM.ADR(Title), | ||
WinUser.MB_OK); | ||
END DisplayError; | ||
|
||
|
||
PROCEDURE ShowHelp*(hEdit:WD.HWND); | ||
VAR | ||
ret,i : LONGINT; | ||
tmp,help : ARRAY 128 OF CHAR; | ||
dmyi : LONGINT; | ||
(*****************************************************************************) | ||
PROCEDURE ShowHelp* (hEdit: WinDef.HWND); | ||
VAR | ||
ret, | ||
i: LONGINT; | ||
tmp, | ||
help: ARRAY 128 OF CHAR; | ||
dmyi: LONGINT; | ||
BEGIN | ||
ret:=WB.GetModuleFileNameA(hInstance,SYSTEM.ADR(help),128); | ||
IF ret=0 THEN DisplayError("Error","Problems getting helpfile"); | ||
ret := WinBase.GetModuleFileNameA(hInstance,SYSTEM.ADR(help),128); | ||
IF ret=0 THEN | ||
DisplayError("Error","Problems getting helpfile"); | ||
ELSE | ||
i:=ret-1; | ||
i := ret-1; | ||
WHILE (i>=0) & (help[i]#"\") DO | ||
help[i]:=0X; | ||
help[i] := 0X; | ||
DEC(i); | ||
END; | ||
Strings.Append(help,HELPFILENAME); | ||
dmyi:=WU.WinHelpA(hEdit, SYSTEM.ADR(help), WU.HELP_CONTENTS,0); | ||
IF dmyi=0 THEN | ||
tmp:="The helpfile must reside at "; | ||
|
||
dmyi := WinUser.WinHelpA(hEdit, SYSTEM.ADR(help), WinUser.HELP_CONTENTS,0); | ||
IF dmyi=0 THEN | ||
tmp := "The helpfile must reside at "; | ||
Strings.Append(tmp,help); | ||
DisplayError("HELP",tmp); | ||
END; | ||
END; | ||
END; | ||
END ShowHelp; | ||
|
||
PROCEDURE Beep*; | ||
|
||
|
||
(*****************************************************************************) | ||
PROCEDURE Beep* (); | ||
VAR | ||
res:WD.BOOL; | ||
ResultBool: WinDef.BOOL; | ||
BEGIN | ||
res:=WU.MessageBeep(WU.MB_ICONEXCLAMATION); | ||
END Beep; | ||
ResultBool := WinUser.MessageBeep(WinUser.MB_ICONEXCLAMATION); | ||
END Beep; | ||
|
||
PROCEDURE RGB*(r,g,b:INTEGER):LONGINT; | ||
|
||
(*****************************************************************************) | ||
PROCEDURE RGB* (r, | ||
g, | ||
b: INTEGER) | ||
:LONGINT; | ||
BEGIN | ||
RETURN (b*256+g)*256+r; | ||
END RGB; | ||
|
||
(*****************************************************************************) | ||
(*****************************************************************************) | ||
BEGIN; | ||
; | ||
END GlobWin. | ||
|
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
Oops, something went wrong.