Paul Thomas
01-31-2005, 06:24 AM
Hi I am using the following function to set null brushes and transparent backgrounds:
Public Function SetBkColour(Mode As Integer, Optional Colour As Long = 0)
Select Case Mode
Case 1
SelectObject hDrawBuffer, GetStockObject(NULL_BRUSH)
SetBkMode hDrawBuffer, 1
Case 2
SetBkMode hDrawBuffer, 2
SetBkColor hDrawBuffer, Colour
End Select
End Function
I works just fine for solid filled shapes and text but it doesn't always work for the hatch background, why is that? If I manage to get it to work as soon as the application is restarted it could be gone again. If I so much as change some calls it is gone again. What could be causing this?
Public Function SetBkColour(Mode As Integer, Optional Colour As Long = 0)
Select Case Mode
Case 1
SelectObject hDrawBuffer, GetStockObject(NULL_BRUSH)
SetBkMode hDrawBuffer, 1
Case 2
SetBkMode hDrawBuffer, 2
SetBkColor hDrawBuffer, Colour
End Select
End Function
I works just fine for solid filled shapes and text but it doesn't always work for the hatch background, why is that? If I manage to get it to work as soon as the application is restarted it could be gone again. If I so much as change some calls it is gone again. What could be causing this?