SkinWin | |||||||||
Syntax: | |||||||||
SkinWin( hWnd, hBitmap [, x, y] ) | |||||||||
Parameters: | |||||||||
| |||||||||
Description: | |||||||||
This command takes the BitmapHandle provided by hBitmap and skins the Window with this Bitmap. The first color in the Bitmap (location 0,0) is used as the transparency color for the skin, if the optional x & y values are not specified (defaults to 0,0). | |||||||||
Example: | |||||||||
hWnd = OpenWindow(0, x, y, x2, y2, #WS_POPUP, "Window Name") hBitmap = LoadImage(0, "Image.bmp") SkinWin(hWnd, hBitmap) hWnd = OpenWindow(0, x, y, x2, y2, #WS_POPUP, "Window Name") SkinWin(hWnd, LoadImage(0, "Image.bmp")) ; ; use pixel 10,20 for transparency: ; OpenWindow(0, x, y, x2, y2, #WS_POPUP, "Window Name") SkinWin(WindowID(), LoadImage(0, "Image2.bmp"), 10, 20) | |||||||||
Remarks: | |||||||||
The 1st color in the image (x=0,y=0) is used as the transparency color by default. The bigger the image, the slower is the window "skinned". Its the best to open the Window hidden (#PB_Window_Invisible), skin the window, and show it with HideWindow(#Win,#FALSE). Look at the Skin-Examples for more info. Open the Window in the same dimension as the image. ( ImageWidth() and ImageHeight() ) You must use the #PB_Window_BorderLess / #WS_POPUP flag for the Window. If you use a window with a normal titlebar, the image doesnt show correctly. | |||||||||
|