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

Last reviewed: June 21, 1995
Article ID: Q75640
The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

  Windows, versions 2.0 and 3.0
- Microsoft Visual Basic programming system for Windows, version 1.0

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.


Additional reference words: buglist1.00 buglist2.00 buglist3.00 1.00 2.00
3.00
KBCategory: kbgraphic kbprg kbbuglist
KBSubcategory: APrgGrap


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 21, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.