Sign in to follow this  
Followers 0
James

Converting .Net functions to AutoIt

9 posts in this topic

#1 ·  Posted (edited)

Hey,

I was looking at creating a button on a title bar of a GUI. I found this but it is in .Net

http://www.dotnet247.com/247reference/msgs/41/207281.aspx

I 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)
    
EndFunc

Anyone help me convert this?

Thanks,

James

Edit: This is the first time I have tried something like this. So dont be too harsh on me :)

Edited by JamesB

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0