Code simplification and warning fixes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-07-18 13:43:42 +00:00
parent 0a13502d18
commit 78a054f667
2 changed files with 13 additions and 36 deletions

View File

@@ -634,7 +634,7 @@ wxPalette *wxDIB::CreatePalette() const
// and the colour table
wxCharBuffer rgb(sizeof(RGBQUAD) * biClrUsed);
RGBQUAD *pRGB = (RGBQUAD*)rgb.data();
SelectInHDC(hDC, m_handle);
SelectInHDC selectHandle(hDC, m_handle);
::GetDIBColorTable(hDC, 0, biClrUsed, pRGB);
for ( DWORD i = 0; i < biClrUsed; i++, pRGB++ )
{