James Posted August 15, 2007 Posted August 15, 2007 (edited) Hey,I was looking at creating a button on a title bar of a GUI. I found this but it is in .Nethttp://www.dotnet247.com/247reference/msgs/41/207281.aspxI tried starting, but only got to:#include <GUIConstants.au3> Global Const $WM_NCPAINT = 0x0085 $DLl = DllOpen("user32.dll") $hwnd = GUICreate("Button Example") GUISetState(@SW_SHOW) _AddButton($hwnd) While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _AddButton(ByRef $io_winhandle) DllCall($dll, "int", "GetWindowDC", "int_ptr", $io_winhandle) DllCall($dll, "int", "GetDC", "int_ptr", $io_winhandle) DllCall($dll, "int", "ReleaseDC", "int_ptr", $io_winhandle) EndFuncAnyone help me convert this?Thanks,JamesEdit: This is the first time I have tried something like this. So dont be too harsh on me Edited August 15, 2007 by JamesB Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
James Posted August 15, 2007 Author Posted August 15, 2007 Anyone? The script basically will create a button on the title bar Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Moderators SmOke_N Posted August 15, 2007 Moderators Posted August 15, 2007 Not sure about the title bar itself, but have a look at AnyGUI.au3 in the examples forum. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
James Posted August 15, 2007 Author Posted August 15, 2007 OK, what is easier to convert? C++? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Moderators SmOke_N Posted August 15, 2007 Moderators Posted August 15, 2007 OK, what is easier to convert? C++?What are you talking about "convert"? You asked how to do it in AutoIt... I gave you something to study... to see how it could possibly done. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
James Posted August 15, 2007 Author Posted August 15, 2007 Yeah, I know, but I was wandering if it is possible to convert. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Moderators SmOke_N Posted August 15, 2007 Moderators Posted August 15, 2007 Yeah, I know, but I was wandering if it is possible to convert.I'll let you answer that question with this question:Do you know both languages? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
James Posted August 15, 2007 Author Posted August 15, 2007 I can learn. Im trying to learn new stuff. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
James Posted August 16, 2007 Author Posted August 16, 2007 I also found a link which does it in C. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
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