- - * - WhiteUnicorn - * - -




* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >


Frequently Asked Questions

Calling windows RegisterClass function.

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;



* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >



- - * - Anastasija aka WhiteUnicorn - * - - LJLiveJournal
PFPhotoFile