窗体上有一个memo1,想用这个消息来改变阅读顺序,从左到右,和从右到左。
看了Win32 Developer's References,还是不知道怎么用。谢了。

解决方案 »

  1.   

    可以使用,不过好像是用于TEDIT的,呵呵,你不如换RICHEDIT:
    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
      StdCtrls;type
      TForm1 = class(TForm)
        Edit1: TEdit;
        Button1: TButton;
        ListBox1: TListBox;
        Memo1: TMemo;
        procedure FormCreate(Sender: TObject);
        procedure FormDestroy(Sender: TObject);
      private
        { Private declarations }
        FBrush: HBRUSH;
        procedure WMCTLCOLOREDIT(var Msg: TMessage); message WM_CTLCOLOREDIT;
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.DFM}{ TForm1 }procedure TForm1.WMCTLCOLOREDIT(var Msg: TMessage);
    begin
      SetTextColor(Msg.wParam, clWhite);
      SetBkColor(Msg.wParam, clGreen);
      SetBkMode(Msg.wParam, OPAQUE);
      Msg.Result := FBrush;
    end;procedure TForm1.FormCreate(Sender: TObject);
    begin
      FBrush := CreateSolidBrush(clRed);
    end;procedure TForm1.FormDestroy(Sender: TObject);
    begin
      DeleteObject(FBrush);
    end;