Exemple #1
0
static void
CheckbuttonInitialize(Tcl_Interp *interp, void *recordPtr)
{
    Checkbutton *checkPtr = recordPtr;
    Tcl_Obj *variableObj;

    /* default -variable is the widget name:
     */
    variableObj = Tcl_NewStringObj(Tk_PathName(checkPtr->core.tkwin), -1);
    Tcl_IncrRefCount(variableObj);
    checkPtr->checkbutton.variableObj = variableObj;
    BaseInitialize(interp, recordPtr);
}
Exemple #2
0
bool CBaseOglControl::CreateControl(HWND wnd)
{
	MyRegisterClass();
	hParent = wnd;
	hMy = CreateWindowEx(WS_EX_WINDOWEDGE,"MAINOGLCONTROL","",
      WS_CHILD | WS_VISIBLE ,//| BS_PUSHBUTTON,
      0,0,0,0,wnd,0,
      GetModuleHandle(0),
      this//Передаем в оконную функцию указатель на класс нашего окна
      );
	if (hMy == 0)return false;
	
	controls[hMy] = this;	//добавляем в список контролов

	ShowWindow(hMy, SW_SHOW);
	BaseInitialize();
	UpdateWindow(hMy);
	return true;
}