Esempio n. 1
0
    unsafe public void Create()
    {
        xc.XInitXCGUI("");
        int hWindow = XWnd.Create(0, 0, 500, 300, "xcgui", 0, xcConst.xc_window_style_default);
        int hBtn    = XBtn.Create(0, 0, 100, 100, "按钮", hWindow);

        XEle.RegEventC(hBtn, xcConst.XE_BNCLICK, new XE_BNCLICK_C(__OnBtnClick));
        XWnd.ShowWindow(hWindow, 5);
        xc.XRunXCGUI();
        xc.XExitXCGUI();
    }
Esempio n. 2
0
    unsafe public void Create()
    {
        xc.XInitXCGUI("");

        int hWindow = XWnd.Create(0, 0, 500, 300, "xcgui", 0, 15);
        int hBtn    = XBtn.Create(0, 0, 100, 100, "按钮", hWindow);

        //  Marshal.AllocCoTaskMem(Marshal.SizeOf(pBtnClick))
        XWnd.RegEventCPP(hWindow, xcConst.WM_LBUTTONDOWN, new WM_LBUTTONDOWN_CPP(OnWndLButtonDown));

        XWnd.ShowWindow(hWindow, 5);
        xc.XRunXCGUI();
        xc.XExitXCGUI();
    }