mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-28 07:19:23 +02:00
* fixes some allochwnd functions for FPC_UNICODE_RTL (use -A explicitly)
git-svn-id: trunk@24690 -
This commit is contained in:
parent
5869747cca
commit
958c7a142b
@ -24,7 +24,7 @@ Resourcestring
|
||||
SErrFailedToCreateWindow = 'Failed to create message window %s';
|
||||
|
||||
var
|
||||
MsgWindowClass: TWndClass = (
|
||||
MsgWindowClass: TWndClassA = (
|
||||
style: 0;
|
||||
lpfnWndProc: Nil;
|
||||
cbClsExtra: 0;
|
||||
@ -90,18 +90,18 @@ end;
|
||||
function TWinMsgServerComm.AllocateHWnd(const aWindowName: String): HWND;
|
||||
|
||||
var
|
||||
cls: TWndClass;
|
||||
cls: TWndClassA;
|
||||
isreg : Boolean;
|
||||
|
||||
begin
|
||||
Pointer(MsgWindowClass.lpfnWndProc):=@MsgWndProc;
|
||||
MsgWindowClass.hInstance := HInstance;
|
||||
MsgWindowClass.lpszClassName:=MsgWndClassName;
|
||||
isreg:=GetClassInfo(HInstance,MsgWndClassName,cls);
|
||||
isreg:=GetClassInfoA(HInstance,MsgWndClassName,cls);
|
||||
if not isreg then
|
||||
if (Windows.RegisterClass(MsgWindowClass)=0) then
|
||||
if (Windows.RegisterClassA(MsgWindowClass)=0) then
|
||||
Owner.DoError(SErrFailedToRegisterWindowClass,[]);
|
||||
Result:=CreateWindowEx(WS_EX_TOOLWINDOW, MsgWndClassName,
|
||||
Result:=CreateWindowExA(WS_EX_TOOLWINDOW, MsgWndClassName,
|
||||
PChar(aWindowName), WS_POPUP {!0}, 0, 0, 0, 0, 0, 0, HInstance, nil);
|
||||
if (Result=0) then
|
||||
Owner.DoError(SErrFailedToCreateWindow,[aWindowName]);
|
||||
@ -221,7 +221,7 @@ end;
|
||||
|
||||
procedure TWinMsgClientComm.Connect;
|
||||
begin
|
||||
FHWND:=FindWindow(MsgWndClassName,PChar(FWindowName));
|
||||
FHWND:=FindWindowA(MsgWndClassName,PChar(FWindowName));
|
||||
If (FHWND=0) then
|
||||
Owner.DoError(SErrServerNotActive,[Owner.ServerID]);
|
||||
end;
|
||||
@ -265,7 +265,7 @@ end;
|
||||
|
||||
function TWinMsgClientComm.ServerRunning: Boolean;
|
||||
begin
|
||||
Result:=FindWindow(MsgWndClassName,PChar(FWindowName))<>0;
|
||||
Result:=FindWindowA(MsgWndClassName,PChar(FWindowName))<>0;
|
||||
end;
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user