WindowBlinds : DirectSkin
SetDllHandle
 

DirectSkin supports skins which store their images in a dll file. In order to use the SetDllHandle method, you need to tell DirectSkin which dll the images are in. This is done by calling this function before calling InitWB or ReloadUIS and passing in the handle to the dll.

void SetDllHandle(
long
handle);

Parameters

handle
The handle to the loaded resource DLL.

Return Values

 

This method does not return a value.

Remarks

For example : to load the images from the current exe, you do this     

m_wb.SetDllHandle ((long) GetModuleHandle (NULL));

You can insert the images into your dll using Visual Studio.  To set
the resource ids, change the name from say IDB_BITMAP1 to a number (for
example 123). Then in the UIS file, instead of putting \myskin\mybitmap.bmp, you just put
123.

You MUST only use numbers as DS doesn't support text ids.

So :

[Personality]
BUTTONCOUNT=9
TextAlignment=1
TextShift=67
TextShiftVert=3
TextRightClip=85
Top=222
Left=skin\border-left.bmp
Right=skin\border-right.bmp
Bottom = skin\border-bottom.bmp

The above shows a section of a UIS file where Top is resource 222 from the
dll and the other files are loaded from disk. Please note that only .bmp files can be inserted into the resource dll. .TGA
files are not supported from dlls.

See Also

 

There are no related topics to this method.