Jump to content
Ian Branch

What is wrong with this component??

Recommended Posts

MyCustomCalendar.pas

Hi Team,

Delphi 12.2 p2.  32 bit App.

It builds and installs OK but when I go to add it to a form Delphi thinks about it for a while, way too long, and then falls over. 😞

It is a derivation of TMonthCalendar.

Appreciate any insights.

 

Regards & TIA,

Share this post


Link to post

Reading the code I believe it is the:

procedure TMyCustomCalendar.CreateWnd;
begin
  inherited CreateWnd;
  RecreateWnd; // Force the control to redraw and send MCN_GETDAYSTATE
end;
 

Why do you want to create windows handle all the time? (just after it was created?)

Share this post


Link to post

Tks Lajos,

You, that fixed it Tks.  I didn't think about the race condition it would set up.

 

Ian

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×