Home Left side cannot be assigned for a record type
Reply: 0

Left side cannot be assigned for a record type

user779 Published in June 24, 2018, 3:06 am

I am trying to upgrade my application from Delphi 2007 to Delphi 10 Seattle. I understand that a record needs to be copied to a local variable before changing and then assigned back. I am trying the same but I still get the error that I cannot assign to a left side. Could someone please help.

procedure TMydlg.WMGetMinMaxInfo(var Msg:TMessage);
     MinMaxInfo: TMinMaxInfo;
   MinMaxInfo := (PMinMaxInfo(Msg.LParam)^);

   with MinMaxInfo do

      ptMinTrackSize.X := MinWidth;
      ptMinTrackSize.Y := MinHeight;
      ptMaxTrackSize.X := MinWidth;


   // Error here. Left side cannot be assigned to
   (PMinMaxInfo(Msg.LParam)^) := MinMaxInfo;

TMinMaxInfo is from Winapi.windows

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.320494 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO