Jump to content

Chelly

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Chelly

    Catch WM_DROPFILES in TRichEdit

    Yes, the version of RichEdit in 12 is 4.1, starting from 11. However, I couldn't find any update logs about image drag-and-drop behavior on the Microsoft website.
  2. Chelly

    Catch WM_DROPFILES in TRichEdit

    Thank you for your answer. I have used DragAcceptFiles() and set the parent window to receive the notification, but it still can't handle the WM_DROPFILES message. Only image files are not accepted. By the way, the same code works correctly in XE6.
  3. Chelly

    Catch WM_DROPFILES in TRichEdit

    Hi, I upgraded the builder from XE6 to 12. How can I catch the WM_DROPFILES message when I drag an image file (like PNG or JPG) and drop it into a TRichEdit? Other types of files are correctly catching the WM_DROPFILES, but image files don't work. It seems like the image file is automatically converted to RTF text. How can I stop this behavior?
  4. Labelmanager2_tlb::IDocument* __fastcall Open(BSTR strDocName/*[in]*/, VARIANT_BOOL ReadOnly/*[in,def,opt]*/) { TDispID dispid(/ Open / DISPID(7)); TAutoArgs<2> _args; _args[1] = strDocName /*[VT_BSTR:0]*/; _args[2] = ReadOnly /*[VT_BOOL:0]*/; OleFunction(_dispid, _args); return (Labelmanager2_tlb::IDocument* /*[C1]*/)(LPDISPATCH) /*[VT_DISPATCH:1]*/_args.GetRetVariant(); } Its looks like the opterator= doesnt work. I tried step execution ,than i found _args[1] = strDocName /*[VT_BSTR:0]*/; this line is entering into the bool opertartor as follow OleVariant& operator =(const bool rhs) { PVariant(this)->operator=(rhs); return *this; } so ,maybe we can as follow Labelmanager2_tlb::IDocument* __fastcall Open(BSTR strDocName/*[in]*/, VARIANT_BOOL ReadOnly/*[in,def,opt]*/) { TDispID dispid(/ Open / DISPID(7)); TAutoArgs<2> _args; UnicodeString strChange = strDocName; _args[1] = strChange /*[VT_BSTR:0]*/; _args[2] = ReadOnly /*[VT_BOOL:0]*/; OleFunction(_dispid, _args); return (Labelmanager2_tlb::IDocument* /*[C1]*/)(LPDISPATCH) /*[VT_DISPATCH:1]*/_args.GetRetVariant(); }
×