Vaeb Posted December 6, 2007 Share Posted December 6, 2007 (edited) Hi! I would really like to make an imagemap in a Gui. Is there another way then do it by labels? Can an1 post an examle if there is another way? greets Vaeb Edited December 6, 2007 by Vaeb I <3 it:http://www.autoitscript.com/forum/index.php?showtopic=69912http://www.autoitscript.com/forum/index.php?showtopic=69914http://www.autoitscript.com/forum/index.php?showtopic=69911 Link to comment Share on other sites More sharing options...
Zedna Posted December 6, 2007 Share Posted December 6, 2007 Look here Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Vaeb Posted December 6, 2007 Author Share Posted December 6, 2007 ummm... yes... thats a good script, but... I think its a bit over my level. I just dont want to fill a part of a picture. This is a part of my code: $yellow = GUICtrlCreatePic(@ScriptDir & "\System\yellow.gif", "5", "5", "691", "631", $WS_CLIPSIBLINGS) GUISetState() $pic_hWnd = ControlGetHandle($Gui1,"",$yellow) While 1 $Msg = GUIGetMsg() Switch $Msg Case $og1 $msgn = "ers" $n = "1" Dis() GUICtrlSetState($Bahnhofplatz, $GUI_ENABLE) While 1 $Msg = GUIGetMsg() Switch $Msg Case $yellow Ort2() Wend EndSwitch WEnd DLLCall("gdi32.dll","int","SelectObject","int",$pic_hdc[0],"int",$obj_orig[0]) I would like to do it by coordinates. I <3 it:http://www.autoitscript.com/forum/index.php?showtopic=69912http://www.autoitscript.com/forum/index.php?showtopic=69914http://www.autoitscript.com/forum/index.php?showtopic=69911 Link to comment Share on other sites More sharing options...
Zedna Posted December 6, 2007 Share Posted December 6, 2007 ummm... yes... thats a good script, but...I think its a bit over my level.I just dont want to fill a part of a picture.I would like to do it by coordinates.Don't call FloodFill but Just look at principle of click on picture catching and retrieving of clicked position. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Vaeb Posted December 7, 2007 Author Share Posted December 7, 2007 Could you please give me an example? I am really not able to understand how it works without getting an example. Greets I <3 it:http://www.autoitscript.com/forum/index.php?showtopic=69912http://www.autoitscript.com/forum/index.php?showtopic=69914http://www.autoitscript.com/forum/index.php?showtopic=69911 Link to comment Share on other sites More sharing options...
Zedna Posted December 7, 2007 Share Posted December 7, 2007 Could you please give me an example?I am really not able to understand how it works without getting an example.GreetsI posted link to example which has 90% of your desired functionality. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Vaeb Posted December 7, 2007 Author Share Posted December 7, 2007 #include <GUIConstants.au3> $color = 0xFF0000 Or 0x0000FF Or 0xFCFF00 Opt("mousecoordmode",2) $gui = GuiCreate('Map of South America', 916, 800) $pic1 = GuiCtrlCreatePic(@ScriptDir & '\System\Imagemap1.bmp', 5, 5, 916, 790) ;Image is attached GUISetState() $pic_hWnd = ControlGetHandle($gui,"",$pic1) $pic_hdc = DLLCall("user32.dll","int","GetDC","hwnd",$pic_hWnd) $hBrush = DllCall("gdi32.dll", "long", "CreateSolidBrush", "int", 0xFF00FF) ; fill color $obj_orig = DLLCall("gdi32.dll","int","SelectObject","int",$pic_hdc[0],"int",$hBrush[0]) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $pic1 Then $mp = MouseGetPos() DllCall("gdi32.dll","int","FloodFill","int",$pic_hdc[0],"int",$mp[0],"int",$mp[1],"int",$color) ; border color EndIf WEnd DLLCall("gdi32.dll","int","SelectObject","int",$pic_hdc[0],"int",$obj_orig[0]) DLLCall("gdi32.dll","int","DeleteObject","int",$hBrush[0]) I tried something. There should happen Func1() when i click into the red boarder. And when i click into the blue boarder, Func2() should happen. And when i click into the yellow boarder, Func3() should happen. How can i do that? I <3 it:http://www.autoitscript.com/forum/index.php?showtopic=69912http://www.autoitscript.com/forum/index.php?showtopic=69914http://www.autoitscript.com/forum/index.php?showtopic=69911 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