On Fri, 8 Nov 2002 17:56:05 -0500, you wrote: > GetCurrentObject returns 0, but as far as it knows, it is > returning successfully. This is because in the line > > case OBJ_BITMAP: ret = dc->hBitmap; break; > > dc->hBitmap is 0, although dc is a valid DC. The HDC that is passed > to GetCurrentObject to get dc is obtained by calling > CWindow::BegingPaint(PAINTSTRUCT *) from a class derived from ATL's > CWindow. I'm guessing that this is where the problem is probably > coming from - the app is written in C++ with ATL. > > -Steve
Here a patch that is lying around here for quite a while that I use to prevent an Eudora 4/5 crash with the same symptoms. I wonder if it helps you. And yes, GetCurrentObject(..,OBJ_BITMAP) on a freshly created dc returns != 0 in windows. I'm just not sure this patch is the real solution, although I haven't seen any negative effects. Rein. -- Rein Klazes [EMAIL PROTECTED]
--- wine/objects/dc.c 2002-10-02 20:33:21.000000000 +0200 +++ mywine/objects/dc.c 2002-11-09 10:00:54.000000000 +0100 @@ -578,6 +578,7 @@ return 0; } + dc->hBitmap = GetStockObject( DEFAULT_BITMAP ); dc->flags = 0; TRACE("(driver=%s, device=%s, output=%s): returning %04x\n",