ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Error creating GDI+ object (#21001)
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Flashcqxg

96 Posts

Posted - Jan 18 2024 :  03:05:59  Show Profile  Reply
Hello:
My Code show the error message:Error creating GDI+ object (#21001)
Proc: TImageEnProc;

        Bitmap.Create(3000, 2000, clWhite);
        Proc := TImageEnProc.CreateFromBitmap(Bitmap);
        try
          J := 0;
          K := 0;
           for I := 1 to 80 do
          begin
            X := 80 + J * 1000;
            Y := 300 + K * 50;
            Proc.TextOut(X, Y, I.ToString, '#23435;#20307;', 25, clRed, []);
            if (I mod 30) = 0 then
            begin
              Inc(J);
              K := 0;
            end
            else
              Inc(K);
          end;
        finally
          Proc.Free;
        end;

xequte

38457 Posts

Posted - Jan 18 2024 :  19:00:49  Show Profile  Reply
Hi

Your object creation code is not correct. It should read:

        Bitmap := TIEBitmap.Create(3000, 2000, clWhite);


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: