- prBM = new Graphics::TBitmap;
- prBM->PixelFormat = pf24bit;
- hdc = prBM->Canvas->Handle; // is this the right handle to use here?
- PIXELFORMATDESCRIPTOR pfd = {
- sizeof(PIXELFORMATDESCRIPTOR),
- 1,
- PFD_DRAW_TO_BITMAP | PFD_SUPPORT_OPENGL | PFD_SUPPORT_GDI,
- PFD_TYPE_RGBA,
- 24,
- 0,0,0,0,0,0,
- 0,0,
- 0,0,0,0,0,
- 32,
- 0,
- 0,
- PFD_MAIN_PLANE,
- 0,
- 0,0,0
- };
- PixelFormat = ChoosePixelFormat(hdc, &pfd);
- if (!SetPixelFormat(hdc, PixelFormat, &pfd))
- ShowMessage("Pixel format not set");