Example #1
0
int CDlgPopup::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	// 设置窗口风格
	DWORD dwStyle = ::GetWindowLong(m_hWnd, GWL_STYLE)
		| WS_SIZEBOX | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_EX_LAYERED;
	dwStyle &= ~(WS_CAPTION);

	::SetWindowLong(m_hWnd, GWL_STYLE, dwStyle);
	::SetWindowLong(m_hWnd,GWL_EXSTYLE, WS_EX_TOOLWINDOW); 	

	SetBackMode(m_enBackMode);
	
	m_bInitFinish = true;
	
	CRect rcClient;
	GetClientRect(&rcClient);

	InitUI(rcClient);

	//DrawWindow();

	//启动定时器
	m_uTimerAnimation = CTimer::SetTimer(30);

	m_bInit = true;

	return TRUE;
}
Example #2
0
BOOL DLG_ERP_NEW_PROJECT::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	InitUI();

	// 用户修改项目信息
	if (m_bModify)
	{
		SetWindowText("项目修改");
		SetDlgItemText(IDC_EDIT1, m_strProject);
		SetDlgItemText(IDC_EDIT2, m_strNumber);
		SetDlgItemText(IDC_EDIT3, m_strCreator);
		SetDlgItemText(IDC_DETAIL, m_strDetail);
		SetDlgItemText(IDOK, "保存(&S)");
	}
	else
	{
		CString strNickName = ((CClient02Dlg*)AfxGetMainWnd())->m_strUNickName;
		SetDlgItemText(IDC_EDIT3, strNickName);
	}
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Example #3
0
void CUIDesignerView::OnInitialUpdate()
{
	__super::OnInitialUpdate();

	// TODO: 在此添加专用代码和/或调用基类
	CUIDesignerDoc* pDoc=GetDocument();

	m_LayoutManager.Init(this->GetSafeHwnd(),pDoc->GetPathName());
	CFormUI* pForm=m_LayoutManager.GetForm();

	g_pClassView->InsertUITreeItem(pForm,pDoc->GetTitle());
	if(pForm->GetRowCount()>0)
	{
		InitUI(pForm->GetItemAt(0), 1);
		m_LayoutManager.GetManager()->InitControls(pForm->GetItemAt(0));
	}
	g_pClassView->SelectUITreeItem(pForm);
	m_bInit=true;

	m_MultiTracker.SetHandleSize(TRACKER_HANDLE_SIZE);
	m_MultiTracker.SetStyle(dottedLine|resizeOutside);
	m_MultiTracker.SetFormSize(pForm->GetInitSize());
	m_MultiTracker.Add(CreateTracker(pForm));

	SetScrollSizes(MM_TEXT,CSize(FORM_INIT_WIDTH+80,FORM_INIT_HEIGHT+80));
}
Example #4
0
// 加载XML节点,解析节点中的属性信息设置到当前控件的属性中
BOOL CDlgPopup::Load(DuiXmlNode pXmlElem, BOOL bLoadSubControl)
{
	if(!__super::Load(pXmlElem))
	{
		return FALSE;
	}

	if(!bLoadSubControl)
	{
		// 不加载子控件
		return TRUE;
	}

	// 更新窗口大小
	SetRect(CRect(0, 0, m_size.cx, m_size.cy));

    // 使用XML节点初始化控件
	if(pXmlElem != NULL)
	{
		InitUI(m_rc, pXmlElem);
	}

	// 调用事件处理对象的初始化函数
	if(m_pDuiHandler)
	{
		m_pDuiHandler->OnInit();
	}

    return TRUE;
}
void CGyfxyHostView::OnInitialUpdate()
{	
	CGyfxyHostDoc *pDoc	= GetDocument();	
	pDoc->pHostCtrl		= pGyfxyHostCtrl;
	if(!pGyfxyHostCtrl->InitDevice(pDoc->pRDB))
	{
#ifndef _DEBUG 
		//初始化设备不成功100ms后关闭窗口,不能在此直接关闭窗口。
		SetTimer(TIME_EVENT_CLOSEWINDOWS,1000,NULL);		//1000 mS
#endif		 
	} 
	pRdb = pGyfxyHostCtrl->pRdb;
	pImg = pGyfxyHostCtrl->pImageSlave;
	pSample = pGyfxyHostCtrl->pRdb->SampleArray.Sample;
	////////////////////////////////////////////////////////////
	CFormView::OnInitialUpdate();
	/////////////////////////////////////////////////////////////
	GetParentFrame()->RecalcLayout();
	ResizeParentToFit(FALSE);
	InitUI();
	//SendMessage(WM_COMMAND,IDC_BUTTON_SAMPLE_DN,0);
	/////////////////////////////////
	GetParentFrame()->RecalcLayout();
	ResizeParentToFit();
}
/**
 * Initialize an EGL context for the current display.
 */
int Engine::InitDisplay(const int32_t cmd) {
  if (!initialized_resources_) {
    startup_mutex_.lock();
    gl_context_->Init(app_->window);
    InitUI();
    LoadResources();
    initialized_resources_ = true;
    startup_mutex_.unlock();
  } else {
    // initialize OpenGL ES and EGL
    if (EGL_SUCCESS != gl_context_->Resume(app_->window)) {
      UnloadResources();
      LoadResources();
    }

    jui_helper::JUIWindow::GetInstance()->Resume(app_->activity, cmd);
  }

  // Enable culling OpenGL state
  glEnable(GL_CULL_FACE);

  // Enabled depth test OpenGL state
  glEnable(GL_DEPTH_TEST);
  glDepthFunc(GL_LEQUAL);

  // Note that screen size might have been changed
  glViewport(0, 0, gl_context_->GetScreenWidth(),
             gl_context_->GetScreenHeight());
  renderer_.UpdateViewport();

  tap_camera_.SetFlip(1.f, -1.f, -1.f);
  tap_camera_.SetPinchTransformFactor(2.f, 2.f, 8.f);

  return 0;
}
Example #7
0
void CNewMessageBox::setShowInfo(int nType, int nBtns, std::string strMsg)
{
	USES_CONVERSION;
	m_nShowType = nType;
	m_strMsgShow = A2T(strMsg.c_str());
	m_nBtn = nBtns;

	//++判断将显示的行数
// 	int nLines = 1;
// 	int nSingleCount = 0;
// 	LOGFONT	logfont;
//	if (m_fontStatus.GetSafeHandle())
// 	{
// 		CRect client_rect;
// 		if (GetDlgItem(IDC_STATIC_ShowMsg)->GetSafeHwnd())
// 			GetDlgItem(IDC_STATIC_ShowMsg)->GetClientRect(&client_rect);
// 		m_fontStatus.GetLogFont(&logfont);
// 		int nCharW = logfont.lfWidth;
// 		nSingleCount = client_rect.Width() / nCharW - 1;
// 		int nLen = m_strMsgShow.GetLength() * sizeof(TCHAR);
// 		nLines = nLen / nSingleCount + 1;
//	}
	//--

	InitUI();
}
WidgetNetworkTimer::WidgetNetworkTimer(QWidget *parent)
    : QWidget(parent)
{
    InitUI();
    timer=new QTimer(this);
    timer_count=new QTimer(this);
    connect(timer,&QTimer::timeout,this,&WidgetNetworkTimer::TimerNetExec );
    connect(timer_count,&QTimer::timeout,this,&WidgetNetworkTimer::TimerCountExec);
    connect(checkbox_get_inf,&QCheckBox::stateChanged,this,&WidgetNetworkTimer::slot_check_inf);
    connect(checkbox_count,&QCheckBox::stateChanged,this,&WidgetNetworkTimer::slot_check_count);
    connect(combo_net_count,SIGNAL(currentIndexChanged(int)),this,SLOT(slot_cnc_index_changed(int)));
    connect(combo_net_power,SIGNAL(currentIndexChanged(int)),this,SLOT(slot_cnp_index_changed(int)));
    connect(te_count,SIGNAL(timeChanged(QTime)),this,SLOT(slot_tepow_timechanged(QTime )));
    connect(spin_net_va,SIGNAL(valueChanged(int)),this,SLOT(slot_sinpow_changed(int)));
    connect(button_update,SIGNAL(clicked()),this,SLOT(slot_button_update_click()));
    net_manager->updateConfigurations();
    this->setStyleSheet( "QGroupBox { background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #E0E0E0, stop: 1 #FFFFFF);"
                         "border: 2px solid gray;border-radius: 5px;margin-top: 1ex;}   "
                         "QGroupBox::title {subcontrol-origin: margin;subcontrol-position: top left; padding: 0 3px;"
                         "background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #E0E0E0, stop: 1 #FFFFFF); }");

    this->current_receive_value=0;
    this->current_transmit_value=0;
    checkbox_count->stateChanged(0);
    checkbox_count->setTristate(0);
    checkbox_get_inf->stateChanged(0);
    checkbox_get_inf->setTristate(0);
}
Example #9
0
ShaderLabGUI::ShaderLabGUI(IControllerSession* ctrl)
    :ApproxWindow(), m_ctrl(ctrl), m_rendererOnline(false)
{
    ui.setupUi(client);
    InitUI();

    m_Menu = new ApproxGUIMenuBar(client);
    m_btnSettings = new ApproxGUIMenuButton;
    m_btnAddView = new ApproxGUIMenuButton;
    m_settings = new GlobalSettingsForm(client);

    connect(m_btnSettings, SIGNAL(clicked()), SLOT(on_Settings()));
    connect(m_btnAddView, SIGNAL(clicked()), SLOT(on_NewView()));

    m_Menu->addWidget(m_btnSettings);
    m_Menu->addWidget(m_btnAddView);
    m_Menu->move(0, 0);
    m_Menu->setStyleSheet("background-color : rgb(30,30,30);");

    m_btnSettings->setText(QStringLiteral("Общие настройки"));

    m_btnAddView->move(m_btnAddView->width(), 0);
    m_btnAddView->setText(QStringLiteral("Новый проект"));

    m_settings->setGeometry(0, 25, m_settings->width(), client->height() - 50);
    m_settings->hide();

    ShaderEditor* newView = new ShaderEditor(m_ctrl, client);
    m_Views.insert(std::pair<QString, ShaderEditor*>(generateViewName(), newView));

    for (auto elem : m_Views)
    {
        elem.second->show();
    }
}
MLPDialog::MLPDialog(cv::PCA &p, QWidget *parent) :
    QDialog(parent),
    pca(p),
    ui(new Ui::MLPDialog)
{
    ui->setupUi(this);
    InitUI();
}
Example #11
0
	ChoiceForm::ChoiceForm(IChoiceControl * pChoiceControl, WinForm::GLForm * pOwnerForm, GraphicsUI::UIEntry * entry)
		: GraphicsUI::Form(entry)
	{
		this->ownerForm = pOwnerForm;
		this->choiceControl = pChoiceControl;
		SetText("Choice Control");
		InitUI();
	}
Example #12
0
void CScanDlg::UpdateInfo()
{
	USES_CONVERSION;

	InitUI();
	UpdateData(FALSE);
	Invalidate();
}
Example #13
0
bool UIPublishTaskSet::init()
{
    if(!UIBaseTopLayer::init())
        return false;

    InitUI();
    
    return true;
}
bool UIPublishMainLayer::init()
{
    if (!UIBaseCenterLayer::init())
        return false;
    
    InitUI();
    
    return true;
}
Example #15
0
DWindowUI::DWindowUI(QWidget *parent) :
    QMainWindow(parent)
{
    resize(680, 440);
    setWindowFlags(Qt::FramelessWindowHint | Qt::Window);
    setAttribute(Qt::WA_TranslucentBackground, true);
    bootMaker_ = new BootMaker(this);
    InitUI();
}
Example #16
0
// CLostCornerDlg 消息处理程序
BOOL CLostCornerDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	InitUI();
	InitData();

	return TRUE;
}
Example #17
0
bool UITaskInfoLayer::init()
{
    if (!UIBaseTopLayer::init())
        return false;
    
    InitUI();
    
    return true;
}
Example #18
0
BOOL CNewModelDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	InitUI();
	InitCtrlPosition();

	return TRUE;
}
VisibilityToolPanel::VisibilityToolPanel(QWidget* parent)
:	LandscapeEditorBasePanel(parent)
,	buttonSetVisibilityPoint(NULL)
,	buttonSetVisibilityArea(NULL)
,	buttonSaveTexture(NULL)
,	sliderWidgetAreaSize(NULL)
{
	InitUI();
	ConnectToSignals();
}
Example #20
0
BOOL CSingleExamDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	InitUI();
	InitData();
	SetFontSize(m_nStatusSize);
	InitCtrlPosition();

	return TRUE;
}
Example #21
0
BOOL CSpliceScreenConfigDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	InitUI();

	LMIU(this);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Example #22
0
BOOL CScanDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	SetFontSize(m_nStatusSize);
	InitCtrlPosition();
	InitUI();
	m_comboScanner.AdjustDroppedWidth();
	m_comboDuplex.AdjustDroppedWidth();

	return TRUE;
}
UISingleTextInputDialog::UISingleTextInputDialog(
        UIContainer* pParent,
        DialogType type,
        BOOL bSupportFont)
    : UIDialog(pParent)
    , m_bIsDisposed(FALSE)
    , m_bSupportFont(bSupportFont)
    , m_iDialogType(type)

{
    InitUI();
}
Example #24
0
// CScanModelPaperDlg 消息处理程序
BOOL CScanModelPaperDlg::OnInitDialog()
{
	CTipBaseDlg::OnInitDialog();

//	InitScanner();
	SetScanSrcInfo(m_vecScanSrc);
	InitUI();
	SetFontSize(m_nStatusSize);
	InitCtrlPosition();
	
	return TRUE;
}
Example #25
0
BOOL CNewMessageBox::OnInitDialog()
{
	CTipBaseDlg::OnInitDialog();

	InitUI();

	m_staticMsgShow.SubclassDlgItem(IDC_STATIC_ShowMsg, this);
	m_staticMsgShow.SetCenterAlign();
	SetFontSize(m_nStatusSize);
	InitCtrlPosition();

	return TRUE;
}
Example #26
0
void CUIDesignerView::RedoUI(CControlUI* pControl, CControlUI* pParent)
{
	ASSERT(pControl && pParent);
	if(!pControl || !pParent)
		return;

	CContainerUI* pContainer = static_cast<CContainerUI*>(pParent->GetInterface(_T("Container")));
	ExtendedAttributes* pExtended = (ExtendedAttributes*)pContainer->GetTag();
	pContainer->Add(pControl);
	m_MultiTracker.Add(CreateTracker(pControl));
	InitUI(pControl, pExtended->nDepth + 1, TRUE);
	pContainer->SetPos(pContainer->GetPos());
}
Example #27
0
BOOL CDlgMainTabRss::OnInitDialog()
{
	CDialog::OnInitDialog();

	// TODO:  在此添加额外的初始化
	
	InitUI();
	InitFeedManager();

	SetTimer(UPDATE_FEED_TIME_ID, UPDATE_FEED_INTERVAL, NULL);

	return TRUE;  // return TRUE unless you set the focus to a control
	// 异常: OCX 属性页应返回 FALSE
}
LandscapeEditorControlsPlaceholder::LandscapeEditorControlsPlaceholder(QWidget* parent)
:	QWidget(parent)
,	currentPanel(NULL)
,	activeScene(NULL)
{
	InitUI();
	ConnectToSignals();

	customColorsPanel = new CustomColorsPanel();
	rulerToolPanel = new RulerToolPanel();
	visibilityToolPanel = new VisibilityToolPanel();
	tilemaskEditorPanel = new TilemaskEditorPanel();
	heightmapEditorPanel = new HeightmapEditorPanel();
}
Example #29
0
void CScanDlg::SetScanSrcInfo(std::vector<CString>& vec)
{
	m_comboScanner.ResetContent();

	int nDefaultItem = -1;
	for (int i = 0; i < vec.size(); i++)
	{
		nDefaultItem = 0;
		m_comboScanner.AddString(vec[i]);
		m_comboScanner.SetItemData(i, i);
	}
	m_comboScanner.SetCurSel(nDefaultItem);

	InitUI();
}
Example #30
0
// 加载XML节点,解析节点中的属性信息设置到当前控件的属性中
BOOL CDuiPanel::Load(DuiXmlNode pXmlElem, BOOL bLoadSubControl)
{
	if(!__super::Load(pXmlElem))
	{
		return FALSE;
	}

    // 使用XML节点初始化div控件
	if(pXmlElem != NULL)
	{
		InitUI(m_rc, pXmlElem);
	}

    return TRUE;
}