* RegisterClass returns a BOOL in windows 3.0 and earlier, and an ATOM in 3.1+

git-svn-id: trunk@31729 -
This commit is contained in:
nickysn 2015-09-17 12:05:15 +00:00
parent 1dff9bf025
commit fc6837799e
2 changed files with 14 additions and 2 deletions

View File

@ -650,6 +650,15 @@ function SubtractRect(var rcDest: RECT; var rcSource1, rcSource2: RECT): BOOL; e
function GetMessageExtraInfo: LPARAM; external 'USER';
function GetQueueStatus(flags: UINT): DWORD; external 'USER';
{ Window class management }
{ in Windows 3.1+, RegisterClass returns an ATOM that unquely identifies the
class. In Windows 3.0 and earlier, the return value is BOOL. That's why we
redefine this function in the win31 unit. }
function RegisterClass(lpwc: LPWNDCLASS): ATOM; external 'USER';
{$ifdef VAR_PARAMS_ARE_FAR}
function RegisterClass(var wc: WNDCLASS): ATOM; external 'USER';
{$endif}
implementation
end.

View File

@ -792,9 +792,12 @@ procedure PostQuitMessage(nExitCode: SmallInt); external 'USER';
{ Window class management }
function RegisterClass(lpwc: LPWNDCLASS): ATOM; external 'USER';
{ in Windows 3.1+, RegisterClass returns an ATOM that unquely identifies the
class. In Windows 3.0 and earlier, the return value is BOOL. That's why we
redefine this function in the win31 unit. }
function RegisterClass(lpwc: LPWNDCLASS): BOOL; external 'USER';
{$ifdef VAR_PARAMS_ARE_FAR}
function RegisterClass(var wc: WNDCLASS): ATOM; external 'USER';
function RegisterClass(var wc: WNDCLASS): BOOL; external 'USER';
{$endif}
function UnregisterClass(lpszClassName: LPCSTR; hinst: HINST): BOOL; external 'USER';