bub Posted August 28, 2011 Share Posted August 28, 2011 I need this function in C + + code:Func RichEditGetSelect($hWnd) Local $tCharRange = DllStructCreate("long cpMin;long cpMax") _SendMessage($hWnd, 1076, 0, DllStructGetPtr($tCharRange)) Local $aRet[2] $aRet[0] = DllStructGetData($tCharRange, 1) $aRet[1] = DllStructGetData($tCharRange, 2) Return $aRet EndFuncSendMessage is not a problem ...but functions DllStructCreate, DllStructGetPtr and DllStructGetData are a huge problem.so I created the C + + code trying to use a structure:long* DLL_EXPORT RichEditGetSelect(HWND a) { long Ret[2]; typedef struct Done { long cpMin; long cpMax; }; Done ptr; SendMessage(a,1076,0,ptr); Ret[0] = ptr.cpMin; Ret[1] = ptr.cpMax; return Ret; }But you need a LPARAM and then returns error:can anyone help me? Link to comment Share on other sites More sharing options...
Shaggi Posted August 28, 2011 Share Posted August 28, 2011 Pass a pointer to it: SendMessage(a,1076,0,&ptr); Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG Link to comment Share on other sites More sharing options...
bub Posted August 28, 2011 Author Share Posted August 28, 2011 THANKSSSSSSSSSSSSSSS!!!! SendMessage(a,1076,0,(LPARAM)&ptr); WORKKKKKKKKKKK!! =) 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