COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :

Go Back   Cockos Incorporated Forums > Other Software Discussion > WDL users forum

Reply
 
Thread Tools Display Modes
Old 07-21-2020, 06:51 AM   #1
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 236
Default How can I draw directly with Lice without using IPlug

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?
__________________
Audio plugins | BrainWaveProducer | EmRysRa
SaschArt is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:12 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.