bub 0 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? Share this post Link to post Share on other sites
Shaggi 25 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 Share this post Link to post Share on other sites
bub 0 Posted August 28, 2011 THANKSSSSSSSSSSSSSSS!!!! SendMessage(a,1076,0,(LPARAM)&ptr); WORKKKKKKKKKKK!! =) Share this post Link to post Share on other sites