Discussions related to Visual Prolog
Harrison Pratt
VIP Member
Posts: 443
Joined: 5 Nov 2000 0:01

gdiPlus stringFormat object behavior

Unread post by Harrison Pratt »

A gdiPlus stringFormat object seems to behave like a persistent object between clauses.

If I create stringFormat object in the onPaint/3 clause of a dialog, and in a sububordinate clause called by onPaint/3 create a new stringFormat object with different formatFlags (e.g., stringFormatFlagsDirectionVertical) then the next pass through onPaint/3 clause creates a stringFormatter object with the stringFormatFlagsDirectionVertical flag set.

It is not a problem to restore the original formatFlags in the subordinate clause, but it is unexpected behavior.

Sample code from a test dialog is attached.
Attachments
TestCode for Dialog.txt
(2.59 KiB) Downloaded 6 times
User avatar
Thomas Linder Puls
VIP Member
Posts: 1401
Joined: 28 Feb 2000 0:01

Re: gdiPlus stringFormat object behavior

Unread post by Thomas Linder Puls »

That is a bug. We will correct it (in build 1111).
Regards Thomas Linder Puls
PDC
Harrison Pratt
VIP Member
Posts: 443
Joined: 5 Nov 2000 0:01

Re: gdiPlus stringFormat object behavior

Unread post by Harrison Pratt »

There seems to be a lot of discussion about stringFormat object persistence:

https://groups.google.com/g/microsoft.p ... qwsn6MvfpM
Post Reply