ExtFloodFill Won't Fill Over QBColors (1-8) If AutoRedraw=True

ID Number: Q75640

1.00

WINDOWS

Summary:

There is a problem in the Windows 3.0 environment with the

ExtFloodFill() API function. If you try to use the ExtFloodFill() API

along with the QBColor function that is included in Microsoft Visual

Basic version 1.0, the first eight colors are displayed incorrectly.

Microsoft has confirmed this to be a problem in the Microsoft Windows

3.0 environment. We are researching this problem and will post new

information here as it becomes available.

This problem causes the Fill Tool of the Iconworks sample application

(provided with Microsoft Visual Basic programming system version 1.0

for Windows) to fail when attempting to fill over QBColors (1-8).

This information applies to Microsoft Visual Basic programming system

version 1.0 for Windows.

More Information:

Steps to Reproduce Problem

--------------------------

1. Start Visual Basic with a New Project.

2. Place a picture box on the Form. Set the AutoRedraw equal

to True and the FillStyle equal to Solid from the Properties

bar for the picture box.

3. Place the the following code in the General Declarations section of

the code window for Form1:

DefInt A-Z

Declare Function ExtFloodFill% Lib "GDI" (ByVal hdc, ByVal x, ByVal y,

ByVal crcolor as Long, ByVal wfilltype)

4. Place the following code inside the Form_Click event procedure.

Sub Form_Click ()

Static I

I= I + 1

Picture1.BackColor = QBColor(I)

x = ExtFloodFill(Picture1.hdc, 1, 1, Picture1.BackColor, 1)

Print I;x

Picture1.Refresh

End Sub

5. Run the sample by pressing the F5 key. Notice that various colors

are incorrectly displayed for QBColors 1-8 and that the return

value from ExtFloodFill, held in x, is 0. QBColors 1-8 should be

displaying black and the value for x should equal 1, not 0.

QBColors 9-15 are correctly displayed.

Additional reference words: 1.00 3.00