BUG: ExtFloodFill Won't Fill Over QBColors If AutoRedraw=True (75640)



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition for Windows 2.0
  • Microsoft Visual Basic Standard Edition for Windows 3.0
  • Microsoft Visual Basic Professional Edition for Windows 2.0
  • Microsoft Visual Basic Professional Edition for Windows 3.0
  • Microsoft Visual Basic Standard Edition for Windows 1.0

This article was previously published under Q75640

SYMPTOMS

If you try to use the ExtFloodFill() API function in Windows version 3.0 or 3.1 along with the QBColor() function that is included in Visual Basic, the first eight colors are displayed incorrectly on some computers.

CAUSE

With some computers, this problem causes the Fill Tool of the Iconworks sample application provided with Microsoft Visual Basic to fail when attempting to fill over QBColors (1-8).

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article with Microsoft Windows versions 3.0 and 3.1. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Problem

  1. Start Visual Basic and begin a new project.
  2. Place a picture box on the Form. In the Properties bar for the picture box, set the AutoRedraw property to True and the FillStyle property to Solid.
  3. Place the the following code in the General Declarations section of the code window for Form1, and enter the entire Declare statement on one, single line:
       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 in 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.

Modification Type:MajorLast Reviewed:12/12/2003
Keywords:kbbug KB75640