Let's give r5163 a try.
In order to resize an object two additional functions were introduced in Win32RichMemo module:
* GetRichEditOLE - the function returns IRichEditOle interface. It is used in the next function
* SetOleObjectSize - the function sets the size of an object at the given cursor position. (If there's no object under the position, i.e. text only, the function returns false). The Size is specified in Points (1/72 of an inch).
For your convenience, there's also
* GetOleObjectSize - the function returns the current size of an object in points.
Here's an example of how to shrink the currently selected object twice:
var
ole : IRichEditOle;
sz : TSize;
begin
ole:=GetRichEditOLE(RichMemo1);
GetOleObjectSize(ole, RichMemo1.SelStart, sz);
sz.cx:=(sz.cx div 2);
sz.cy:=(sz.cy div 2);
SetOleObjectSize(ole, RichMemo1.SelStart, sz);
it just occurred to me... I am doing additional inserts. It may mean that the insert code needs a OLE callback.
Now flags for an inline object inserted can be controlled from your code.
Win32RichMemo is exposing InlineInsertFlag variable. The flag matches values of dwFlags field in REOBJECT structure.
MSDN documentation is here..
Values are declared at Win32RichMemoProc unit.
If you want to make any image inserted via InsertInline resizable you want to add the following line into your code.
uses ... Win32RichMemo, Win32RichMemoProc;
InsertInlineFlags:=REO_RESIZABLE;