lokster Posted February 1, 2007 Posted February 1, 2007 I have a WM_NOTIFY message handler. The lParam returns a struct of type SCNotification. How to create this struct using DllStructCreate("_help-needed-here_",$lParam)?I dont know how long will be the "const char *text;" Here are the struct's according to the documentation:struct NotifyHeader { // This matches the Win32 NMHDR structure void *hwndFrom; uptr_t idFrom; unsigned int code; }; struct SCNotification { struct NotifyHeader nmhdr; int position; int ch; int modifiers; int modificationType; const char *text; int length; int linesAdded; int message; uptr_t wParam; sptr_t lParam; int line; int foldLevelNow; int foldLevelPrev; int margin; int listType; int x; int y; };
PaulIA Posted February 2, 2007 Posted February 2, 2007 I have a WM_NOTIFY message handler. The lParam returns a struct of type SCNotification. How to create this struct using DllStructCreate("_help-needed-here_",$lParam)? I dont know how long will be the "const char *text;" Here are the struct's according to the documentation: struct NotifyHeader { // This matches the Win32 NMHDR structure void *hwndFrom; uptr_t idFrom; unsigned int code; }; struct SCNotification { struct NotifyHeader nmhdr; int position; int ch; int modifiers; int modificationType; const char *text; int length; int linesAdded; int message; uptr_t wParam; sptr_t lParam; int line; int foldLevelNow; int foldLevelPrev; int margin; int listType; int x; int y; };This should get you started: Func WM_SCNOTIFICATION($hWnd, $iMsg, $iwParam, $ilParam) Local $tTag, $hFrom, $iID, $iCode, $iPos $tTag = DllStructCreate("hwnd;int;int;int;int;int;int;ptr;int;int;int;int;int;int;int;int;int;int;int;int", $ilParam) $hFrom = DllStructGetData($tTag, 1) $iID = DllStructGetData($tTag, 2) $iCode = DllStructGetData($tTag, 3) $iPos = DllStructGetData($tTag, 4) ; ; etc., etc., etc. ; EndFunc I dont know how long will be the "const char *text;"*text is a pointer to a null terminated string. Auto3Lib: A library of over 1200 functions for AutoIt
lokster Posted February 2, 2007 Author Posted February 2, 2007 Yeah... I figured it out already, but anyway, 10x PaulIA:)
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