|
@@ -23,10 +23,10 @@ type
|
|
|
function GetsdDataSetNewID(ADataSet: TsdDataSet; const AIndex: string): Integer;
|
|
|
|
|
|
{Message}
|
|
|
- procedure WarningMessage(const AMsg: string);
|
|
|
+ procedure WarningMessage(const AMsg: string; AHandle: THandle = 0);
|
|
|
procedure ErrorMessage(const AMsg: string);
|
|
|
- function QuestMessage(const AMsg: string): Boolean;
|
|
|
- function QuestMessageYesNo(const AMsg: string): Boolean;
|
|
|
+ function QuestMessage(const AMsg: string; AHandle: THandle = 0): Boolean;
|
|
|
+ function QuestMessageYesNo(const AMsg: string; AHandle: THandle = 0): Boolean;
|
|
|
procedure TipMessage(const AMsg: string);
|
|
|
procedure DataSetErrorMessage(var Allow: Boolean; const AMsg: string);
|
|
|
|
|
@@ -181,9 +181,12 @@ begin
|
|
|
end;
|
|
|
|
|
|
{Message}
|
|
|
-procedure WarningMessage(const AMsg: string);
|
|
|
+procedure WarningMessage(const AMsg: string; AHandle: THandle = 0);
|
|
|
begin
|
|
|
- MessageBox(Application.Handle, PChar(AMsg), PChar('¾¯¸æ'), MB_OK or MB_ICONWARNING);
|
|
|
+ if AHandle = 0 then
|
|
|
+ MessageBox(Application.Handle, PChar(AMsg), PChar('¾¯¸æ'), MB_OK or MB_ICONWARNING)
|
|
|
+ else
|
|
|
+ MessageBox(AHandle, PChar(AMsg), PChar('¾¯¸æ'), MB_OK or MB_ICONWARNING);
|
|
|
end;
|
|
|
|
|
|
procedure ErrorMessage(const AMsg: string);
|
|
@@ -191,14 +194,20 @@ begin
|
|
|
MessageBox(Application.Handle, PChar(AMsg), PChar('´íÎó'), MB_OK or MB_ICONERROR);
|
|
|
end;
|
|
|
|
|
|
-function QuestMessage(const AMsg: string): Boolean;
|
|
|
+function QuestMessage(const AMsg: string; AHandle: THandle = 0): Boolean;
|
|
|
begin
|
|
|
- Result := MessageBox(Application.Handle, PChar(AMsg), PChar('ѯÎÊ'), MB_OKCANCEL or MB_ICONQUESTION) = IDOK;
|
|
|
+ if AHandle = 0 then
|
|
|
+ Result := MessageBox(Application.Handle, PChar(AMsg), PChar('ѯÎÊ'), MB_OKCANCEL or MB_ICONQUESTION) = IDOK
|
|
|
+ else
|
|
|
+ Result := MessageBox(AHandle, PChar(AMsg), PChar('ѯÎÊ'), MB_OKCANCEL or MB_ICONQUESTION) = IDOK;
|
|
|
end;
|
|
|
|
|
|
-function QuestMessageYesNo(const AMsg: string): Boolean;
|
|
|
-begin
|
|
|
- Result := MessageBox(Application.Handle, PChar(AMsg), PChar('ѯÎÊ'), MB_YESNO or MB_ICONQUESTION) = IDYes;
|
|
|
+function QuestMessageYesNo(const AMsg: string; AHandle: THandle = 0): Boolean;
|
|
|
+begin
|
|
|
+ if AHandle = 0 then
|
|
|
+ Result := MessageBox(Application.Handle, PChar(AMsg), PChar('ѯÎÊ'), MB_YESNO or MB_ICONQUESTION) = IDYes
|
|
|
+ else
|
|
|
+ Result := MessageBox(AHandle, PChar(AMsg), PChar('ѯÎÊ'), MB_YESNO or MB_ICONQUESTION) = IDYes;
|
|
|
end;
|
|
|
|
|
|
procedure TipMessage(const AMsg: string);
|