LiFan
2024-07-17 bf115a00a40d3af1fae7521d38b9b2ca70fcc161
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
use "xcontrol.vframe.vbusiness.vd"
use "xbase.vframe.vbusiness.vd"
 
unit trade 
[
    class TestRetrieveingWin:  public xframe
    {
        //xdwgrid    dw_list;
 
        xnode    m_agentNode;    //Agent Condition
 
        //½¹µã¼¤»î´¦Àíº¯Êý
        int OnSetFocus(ref TEvent evt,int param)
        {
            //ÖØÖù¤¾ßÌõ
            return 1;
        }
 
        //ÃüÁî·¢²¼º¯Êý
        int OnCmdDispatch(string comdid)
        {
            if(comdid=="RetrieveFinished")
            {
                CloseWindow();
                return 1;
            }
            return 0;
        }
        
        //ÃüÁî´¦Àíʼþ
        int OnXCommand(ref TXCommandEvent evt,int param)
        {
            return OnCmdDispatch(evt.pStrID);
        }
        
        int OnAttachEvent()
        {
            //°ó¶¨¹¤¾ßÌõµã»÷ʼþ
            AttachEvent("WM_XCOMMAND",OnXCommand);
            //»ñÈ¡½¹µãʼþ£¬ÓÃÓÚÖØÖù¤¾ßÌõ
            AttachEvent("WM_SETFOCUS",OnSetFocus);
        }
        
        int onload()
        {
            OnAttachEvent();    
            
            return 1;
        }
        
    };
]