trichview.com

trichview.support




How can i display pictures/icons in TMemo


Return to index


Author

Message

sphinxing

Posted: 12/12/2003 6:22:53


I want to write a custom component derived from TMemo or TEdit, that can

replace non-visual ANSI chars with small icons when I send those chars to

that component or load contents(e.g. file content) into it. My trouble is: I

have no idea how TMemo can treat icons as texts just like Richedit and how

caret can move through icons or select icons and even copy and paste them.


I have already readed TCustomRichedit source code in VCL, but I didn't find

how TCustomRichedit have capability of displaying graphics:( Code below

troubled me.


procedure TCustomRichEdit.CreateParams(var Params: TCreateParams);

const

  RichEditModuleName = 'RICHED32.DLL';

  HideScrollBars: array[Boolean] of DWORD = (ES_DISABLENOSCROLL, 0);

  HideSelections: array[Boolean] of DWORD = (ES_NOHIDESEL, 0);

begin

  if FRichEditModule = 0 then

  begin

    FRichEditModule := LoadLibrary(RichEditModuleName);

    if FRichEditModule <= HINSTANCE_ERROR then FRichEditModule := 0;

  end;

  inherited CreateParams(Params);

  CreateSubClass(Params, 'RICHEDIT');

.........


Can you help me?







Powered by ABC Amber Outlook Express Converter