Hi!
I have a static control created as follows:
hWndStatic = CreateWindowEx(0,"STATIC","NAME",%WS_CHILD OR %WS_VISIBLE OR %SS_BITMAP, _
rc.nleft,rc.ntop,,rc.nbottom, _
hWnd, ByVal %NULL, hInst, ByVal %NULL
This(%SS_BITMAP sytle) will load a bitmap image from the resource using the "NAME" Identifier.
This Static window will do its own repainting for the Image.
Now, when I load an image using:
hBitmap = LoadImage(0,ByVal StrPtr(BmpFileName), %IMAGE_BITMAP,0,0,%LR_LOADFROMFILE)
I have the handle(hBitmap) to an image in memory. Now I would like to create the static
control using the above method(%SS_BITMAP) using a Resource Identifier.
Is it possible to convert this handle(returned by LoadImage) to a Resource Identifier/name?
'---
Yes, I could do this...
Create the Static panel, Subclass the control, Load the image into memory, and handle
the WM_PAINT myself.
But the above method would be much simpler. (I want this control to be self painting)
'---
Any tips or help is appreciated!
Thank you! Jules [email protected]
I have a static control created as follows:
hWndStatic = CreateWindowEx(0,"STATIC","NAME",%WS_CHILD OR %WS_VISIBLE OR %SS_BITMAP, _
rc.nleft,rc.ntop,,rc.nbottom, _
hWnd, ByVal %NULL, hInst, ByVal %NULL
This(%SS_BITMAP sytle) will load a bitmap image from the resource using the "NAME" Identifier.
This Static window will do its own repainting for the Image.
Now, when I load an image using:
hBitmap = LoadImage(0,ByVal StrPtr(BmpFileName), %IMAGE_BITMAP,0,0,%LR_LOADFROMFILE)
I have the handle(hBitmap) to an image in memory. Now I would like to create the static
control using the above method(%SS_BITMAP) using a Resource Identifier.
Is it possible to convert this handle(returned by LoadImage) to a Resource Identifier/name?
'---
Yes, I could do this...
Create the Static panel, Subclass the control, Load the image into memory, and handle
the WM_PAINT myself.
But the above method would be much simpler. (I want this control to be self painting)
'---
Any tips or help is appreciated!
Thank you! Jules [email protected]
Comment