PDA

View Full Version : Error when creating context which is too big



Kilam Malik
11-11-2002, 04:15 AM
Hi,

I want to open a rendering context on a bitmap. For this I make a bitmap DC. I choose a pixel format, which uses software mode.

Then I want to create the render context:

hglrc=wglCreateContext((HDC)hDC);
int err=GetLastError();

If the bitmap is too big, I get error number 2000, which means "Wrong pixel format". This is strange, because I get the same pixel format independent of the size.

Is only the error message wrong here? What is the real error? I should have enough memory...
It also behaves different on different computers. On my machine, the maximum size is 3000x3000. On my colleages machine it is 5000x5000.

Kilam.