Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Mon, 28 Jul 2008 12:38:40 +0200,    group: microsoft.public.platformsdk.gdi        back       


Gdiplus::Bitmap destruction crash   
Hi,

I have a drawing routine in a class, two different instances alive:

void MyClass::DrawThumb(HDC hdc, RECT rc)
{
    static Gdiplus::Bitmap bmThumb(m_hResource, MAKEINTRESOURCE(IDB_THUMB));
    Gdiplus::Graphics gr(hdc);

    gr.DrawImage(&bmThumb, (INT)(CRect(rc).CenterPoint().x - bmThumb.GetWidth() / 2), m_rChannel.CenterPoint().y - bmThumb.GetHeight() / 2);
}

This compiles (VS2008)  and runs OK under Vista but crashes on some Vista systems when the final destruction is happening i.e. end of _crtMain().
What is the problem?
Thanks,
AR
date: Mon, 28 Jul 2008 12:38:40 +0200   author:   Alain Rist

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us