Jump to content

DllStruct functions equivalent c++


bub
 Share

Recommended Posts

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
EndFunc

SendMessage 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:

Posted Image

can anyone help me?

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...