ZeraKakkade Posted January 18, 2008 Share Posted January 18, 2008 Hi,I try to explain my problem with pics becouse my english is bad ^^thats my ingame window (charackter creation)now i want add the head from a charackterthe 255 0 255 colore should be transparent but it looks like thisbut i want thisI have try the BMP2RGN.dll but now is the complete window transparent and the head is blackHow can i make only the Pic (255 0 255) transparent?thanks Link to comment Share on other sites More sharing options...
DjDeep00 Posted January 18, 2008 Share Posted January 18, 2008 Post some example script... Link to comment Share on other sites More sharing options...
ZeraKakkade Posted January 18, 2008 Author Share Posted January 18, 2008 func _char_creation($GameMenu) $Set_Rasse = "Mensch" $Set_Klasse = "Kämpfer" $Set_Element = "Wasser" $Set_Name = "" $Set_HeadGrafik = 1 $Set_KFT = 1 $Set_ASD = 1 $Set_ENG = 1 $Set_FIT = 1 $Set_REF = 1 $Set_SIC = 1 $set_Gender = 1 $Set_Free_Stats = 10 $Set_ArmorGrafik = 1 $window_charcreation = GUICreate("charcreation", 500, 430, -1, -1, $WS_POPUPWINDOW, -1, $GameMenu) $layout_rass = GUICtrlCreatePic("texture\common\lable_a.bmp", 20, 30, 160, 30, $WS_CHILD) $layout_klass = GUICtrlCreatePic("texture\common\lable_a.bmp", 20, 80, 160, 30, $WS_CHILD) $layout_element = GUICtrlCreatePic("texture\common\lable_a.bmp", 20, 130, 160, 30, $WS_CHILD) $layout_char = GUICtrlCreatePic("texture\common\lable_char.bmp", 270, 30, 160, 160, $WS_CHILD) $layout_charview = GUICtrlCreatePic("texture\char\" & $Set_Rasse & $set_Gender & "-" & $Set_HeadGrafik & "-0.bmp", 335, 60, 32, 40,$WS_CHILD) GUICtrlSetBkColor($layout_charview, 0xFF00FF) GUICtrlSetBkColor($layout_charview, $GUI_BKCOLOR_TRANSPARENT) GUISetState() $a = DllCall("BMP2RGN.dll", "int", "BMP2RGN", "str", "texture\char\" & $Set_Rasse & $set_Gender & "-" & $Set_HeadGrafik & "-0.bmp", "int", 255, "int", 0, "int", 255) SetWindowRgn($window_charcreation, $a[0]) endfunc Func SetWindowRgn($h_win, $rgn) DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1) EndFunc ;==>SetWindowRgn $GameMenu is my main window $GameMenu = GUICreate("Core", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUPWINDOW) ____________________________________________________________________ GUICtrlSetBkColor($layout_charview, 0xFF00FF) GUICtrlSetBkColor($layout_charview, $GUI_BKCOLOR_TRANSPARENT) there i have tryed to set the background colore to the same like my pic colore 255 0 255 but it look like screen 2 ____________________________________________________________________ $a = DllCall("BMP2RGN.dll", "int", "BMP2RGN", "str", "texture\char\" & $Set_Rasse & $set_Gender & "-" & $Set_HeadGrafik & "-0.bmp", "int", 255, "int", 0, "int", 255) SetWindowRgn($window_charcreation, $a[0]) and here with the BMP2RGN.dll but it make he complete window transparent like screen 4 Link to comment Share on other sites More sharing options...
DjDeep00 Posted January 18, 2008 Share Posted January 18, 2008 Please also include the images...so it would be easier to help you... Link to comment Share on other sites More sharing options...
ZeraKakkade Posted January 18, 2008 Author Share Posted January 18, 2008 (edited) ok i have get the pic transparenti have download the latest Autoit version and than a have create 2 windows$window_charcreation_trans = GUICreate("charcreation", 500, 430, -1, -1, $WS_POPUPWINDOW) $layout_char_trans = GUICtrlCreatePic("texture\common\lable_char.bmp", 270, 30, 160, 160, $WS_CHILD) GUISetState() $window_charcreation = GUICreate("charcreation", 500, 430, -1, -1, $WS_POPUPWINDOW,$WS_EX_LAYERED,$window_charcreation_trans) $layout_rass = GUICtrlCreatePic("texture\common\lable_a.bmp", 20, 30, 160, 30, $WS_CHILD) $layout_klass = GUICtrlCreatePic("texture\common\lable_a.bmp", 20, 80, 160, 30, $WS_CHILD) $layout_element = GUICtrlCreatePic("texture\common\lable_a.bmp", 20, 130, 160, 30, $WS_CHILD) $layout_char = GUICtrlCreatePic("texture\common\lable_char.bmp", 270, 30, 160, 160, $WS_CHILD) $layout_charview = GUICtrlCreatePic("texture\char\" & $Set_Rasse & $set_Gender & "-" & $Set_HeadGrafik & "-0.bmp", 335, 60, 32, 40,-1) GUISetState()behind the pic is the second window complete transparent so i have create the first window with the same background.now can i choose different head styles and gender styles and all are transparent----thanks for try to help my ^.^ Edited January 18, 2008 by ZeraKakkade Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now