How can I draw directly on a windows create (API MS) with Lice without using IPlug. I tested this code in the window messages:
Code:
case WM_PAINT: {
PAINTSTRUCT paintStruct; // painting structure
HDC hDC = BeginPaint(hWnd, &paintStruct);
// get the window dimensions
RECT clientRect; // client window dimensions
GetClientRect(hWnd, &clientRect);
LICE_pixel lc=LICE_RGBA(255,0,255,255);
LICE_SysBitmap* mDrawBitmap = new LICE_SysBitmap(clientRect.right-clientRect.left, clientRect.bottom-clientRect.top);
static LICE_IBitmap* srcbmp=LICE_LoadPNGFromResource(hInstance, ID_KNOB);
debugPrint("LoadPNG",srcbmp->getWidth(), srcbmp->getHeight());
LICE_FillRect(mDrawBitmap, 10, 10, 100, 100, lc, 1.0f, 0);
LICE_Blit(mDrawBitmap, srcbmp, 40, 40, 0, 0, 40, 40, 1.0f, 0);
EndPaint(hWnd, &paintStruct);
return 0;
}
Nothing draw. LoadPNGFromResource Load the image correctly, with the right dimensions. What is missing from the code?