394______________________________________________ 6

,       

ftdefine WM_MyMessl WM_USER
ttdefine WM_MyMess2 WM_USER + 1

     WM_MyMessl  WM_MyMess2   -
  Windows. ,      -
:

MESSAGE_HANDLER(WM_MyMessl, TMessage, On MyMessI)

         TMessage.
    :

struct TMessage
{

unsigned int Msg;

long WParam;

long LParam;

long Result;

};

       WParam  Lpa-
ram   .

         PMessI 
 Formi  CSpinEdit  ,    .  -
           -
   PMess2,        ,
    CSpinEdit.

 ,   ,     UlMessl.h 
   , , WM_MyPost:

ttdefine WM_MyPost WMJJSER
         

SendMessage(FindWindow("TFormI"," Pmess2"),WM MyPost,0,CSpin-
Editl->Value) ;

  !   .     : 
 ,     SendMessage   WM_MyPost
   WM_USER.       .

        PMess2.
   ,      :

//  UlMess2.h

ttdefine WM_MyPost WM_USER

//-

class TFormI : public TForm
{

private:         // User declarations

void   fastcall OnMyPost(TMessages Message) ;

public:          // User declarations

fastcall TFormI(TComponent* Owner) ;

BEGIN_MESSAGE_MAP

MESSAGE_HANDLER(WM_MyPost, TMessage, OnMyPost)
END_MESSAGE_MAP(TComponent)
I;

//-