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.