Главная страница | назад





Article #17804: Calling windows RegisterClass function.

 Question and Answer Database
FAQ2804D.txt Calling windows RegisterClass function.
Category :Windows API
Platform :All
Product :All 32 bit
Question:
I want to call the Windows RegisterClass() function, but I get the
error "Incompatible types: 'TPersistantClass' and 'TWndClassA'"
when compiling. How can I get around this?
Answer:
The RegisterClass() function is declared both in the Classes unit
and the Windows unit. To call the Windows version, simply
prefix the call with the unit name.
Example:
procedure TForm1.Button1Click(Sender: TObject);
wc : TWndClass;
begin
Windows.RegisterClass(wc)
end;
7/16/98 4:31:28 PM

Last Modified: 01-SEP-99