Jump to content

_WinApi_GetWindowLong Help


 Share

Recommended Posts

I know how to obtain all these values

$GWL_EXSTYLE

$GWL_STYLE

$GWL_WNDPROC

$GWL_HINSTANCE

$GWL_HWNDPARENT

$GWL_ID

$GWL_USERDATA

but in .Net there are 3 extra values that i need to get for Autoit. Specifically DWL_USER.

Is there a way to get this value?

The additional values defined here: MSDN: GetWindowLong Function are:
GLOBAL CONST $DWL_DLGPROC = 4
GLOBAL CONST $DWL_MSGRESULT = 0
GLOBAL CONST $DWL_USER = 8

:mellow:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

  • Moderators

vladedoty,

Have you heard of Google? It is really easy to use! :(

Const GWL_EXSTYLE = -20
Const GWL_HINSTANCE = -6
Const GWL_HWNDPARENT = -8
Const GWL_ID = -12
Const GWL_STYLE = -16
Const GWL_USERDATA = -21
Const GWL_WNDPROC = -4
Const DWL_DLGPROC = 4
Const DWL_MSGRESULT = 0
Const DWL_USER = 8

M23

P.S. Do let us see the results. :mellow:

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

vladedoty,

Have you heard of Google? It is really easy to use! :(

Const GWL_EXSTYLE = -20
Const GWL_HINSTANCE = -6
Const GWL_HWNDPARENT = -8
Const GWL_ID = -12
Const GWL_STYLE = -16
Const GWL_USERDATA = -21
Const GWL_WNDPROC = -4
Const DWL_DLGPROC = 4
Const DWL_MSGRESULT = 0
Const DWL_USER = 8

M23

P.S. Do let us see the results. :mellow:

i realize the values in C and VB

but i notice that the autoit variables are GWL not DWL and when i search the index it does not show these values so i wasnt sure if i could use them

so its still DWL_USER and not GWL_USER?

i obviously used google and really didnt need to cause i program in C# so i already knew these values

my question was for autoit

Link to comment
Share on other sites

  • Moderators

vladedoty,

You can use the integer values directly in AutoIt. The $GWL_* values are just set as Global Consts in the relevant include file and are only a user-friendly way of using the integer values (just like all the style variables).

Sorry if I sounded a bit tetchy - it has not been a good day for various reasons. :mellow:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

GWL = GUI Window Long (or maybe "General Window Long")

DWL = Dialog Window Long

The DWL longs are only valid if it's a dialog window. See the MSDN article I linked earlier:

The following values are also available when the hWnd parameter identifies a dialog box.

DWL_DLGPROC

Retrieves the address of the dialog box procedure, or a handle representing the address of the dialog box procedure. You must use the CallWindowProc function to call the dialog box procedure.

DWL_MSGRESULT

Retrieves the return value of a message processed in the dialog box procedure.

DWL_USER

Retrieves extra information private to the application, such as handles or pointers.

Doesn't change how it's used in the function.

:mellow:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...