____________________________________________________________

 Systray/2                         Revision 0.2 (29/12/2000)
 Plugin making reference.           
____________________________________________________________
                                   Russian Team OS/2 project




 1. ।᫮

 !     㬥  뢠 ।⥫쭠
  䥩  ᮧ  .    ⥫쭮
 ᨨ ணࠬ   .



 2. 襭  ।⠢ 

   ᠭ ᯮ ᨭ⠪ 몠 . 



 3. ᠭ ଠ .


 3.1. 

 譨     (plug-ins)    ᮤঠ       譨
 ᪨  ⥪  (Dll)      㦠   ।
 Systray.   ᪮        ६    
 㦥 ᪮쪮  ।  (  ᪠,  ..  
 ᯮ짮    ࠧ    䠩    樠樨),   
 ࠧࠡ稪 室 ।ᬮ  .


 3.2. 樠

 樠       ந室           㧪
 ᯮ㥬 㭪樨 RegisterPluginProc.   ⮬ 
 楤 । ᫥騥 ࠬ:

 BOOL EXPENTRY RegisterPluginProc (

 HMODULE hSelf, // ਯ 㤠 
 HAB     hab,   // 类
 PWCLASS pwc,   // ᯨ᮪ ᮤঠ ᮢ  (.)
 PUSHORT pus    // ᨬ쭮 ⢮ ਭ ᮢ
 );

  ⮬   㭪樨 室 ॣ஢ 
    ᮮ⢥騬 ࠧ   pwc,  
 ⠪      ६ pus ⢮ ᯮ㥬
 ᮢ.


 3.3.  ᯨ᪠ ᮢ PWCLASS

 typedef struct _WCLASS {
 CHAR    szName[250]; //   
 ULONG   ulCfgSize;   // ࠧ 䨣樨  
                      //(    ࠡ)
 ULONG   ulSafeAlloc; // ࠧ 뤥塞   
                      // 䨣樨 
 BYTE    bInitalUnitWidthPercent;
                      // 砫쭠 ਭ   業
 } WCLASS;

 typedef WCLASS *PWCLASS;


 3.4. ਬ 樠樨  

 strcpy(pwc->szName,szClassName);
 pwc->ulCfgSize = sizeof(UNIT);
 pwc->ulSafeAlloc = sizeof(UNIT);
 pwc->bInitalUnitWidthPercent = 15;
 WinRegisterClass(hab,(PSZ)szClassName,
                        (PFNWP)classwndproc,CS_SIZEREDRAW,8L);

 *pus = 1;


 3.5. 䨪 㫥

 㫨 (Unit)  -      ஥    
 Systray.            ᮤঠ    ଠ,
 ᮮ⢥   .   ⤥쭮 
 ᮮ⢥   ᢮   䨣.    ⮬  
 쭠 ⠭⭠ 䨣 ᮤঠ  
 UNIT:

 typedef struct _UNIT {
 ULONG   cbFix;		  //  ࠧ 
 CHAR    szClass[200];   //  
 CHAR    szBubble[200]; //   ᪠
 HWND    hwnd;         // ਯ 
 SHORT   sFlags;      //  ᯮ, १ࢨ஢
 ULONG   ulRefresh;  // ᫨  ,  뫠 ᮮ饭
                    // WM_USERTIMER (WM_TIMER|0x8000)  ulRefresh 
	           // ᥪ㭤 (⮫쪮 稭  ᨨ Systray 1.0.19!)
 SHORT   sBottom,sLeft,sHeight,sWidth; // ᯮ  Systray
 ULONG   ulReserved[4]; // १ࢨ஢, ᯮ  Systray
 PFNWP   pfnOld; //  ᯮ, १ࢨ஢
 } UNIT;
 typedef UNIT *PUNIT;

 ------------->8----------------

 ਬ砭:   ,  UNIT  ᯮ짮 ࠧ筮
 ࠭⢮ , 뤥   䨣樨  ࠡ ६.
 ਬ ।   :

 [UUUUUUUUUEEEEEEE...........................................................]
  \<-(1)->/     /                                                           /
   \<---(2)--->/                                                           /
    \<----------------------------(3)------------------------------------>/

 (1) = sizeof(UNIT) - ࠧ ⠭⭮  UNIT' ()
 (2) = sizeof(UNIT)+⥫ 
 (3) = sizeof(UNIT)+⥫ +᢮ = ᥣ 뤥
           (WCLASS.ulSafeAlloc)
  䨣樨    - UNIT.cbFix,   
 sizeof(UNIT)  WCLASS.ulSafeAlloc.

 ------------8<-----------------

  ⮬  㪠⥫      ।  ᮧ
  .

 case WM_CREATE:

 punit = (PUNIT) mp1;
 WinSetWindowULong(hwnd, 0L, (ULONG)punit);
 break;

  㭨⮦   ᢮   

 case WM_DESTROY:

 DosFree((PVOID)punit);
 break;

           ᯮ짮   ⥫쭮
 ࠭⢮      㪠 ᫠  ᮮ⢥饬
     WCLASS.   砫   ࠧ   (쭮
 ) ⠪ 㪠뢠.  ⮬  cbFix 
 UNIT        ࠡ,      ᥣ
 ᮤঠ ࠧ  ᯮ㥬     㫥 ..
 ᯮ   䨣樨.


 3.6. ன 㫥.

 ன 㫥  ॡ    짮⥫  롨ࠥ
 "Configure"   "Units...".    ⮬  ᮮ⢥饬
   뫠  ᮮ饭 WM_COMMAND.   mp1 ᮤন
 100,    mp2 - ਯ  ,  ॡ㥬    㪠
  ࠬ   㭪樨  WinDlgBox.  ᫨    
 ।ᬠਢ   ன,         ᮮ饭    
 ஢.
 


 4. ⠪

  ணࠬ: 	਩ ஢, madint@os2.ru
 WWW ࠭ ஥:	http://os2.ru/projects/systray
 Russian Team OS/2:     http://team.os2.ru


____________________________________________________________
Systray/2 	Copyright () 1999-2001,   Russian Team OS/2
