Ejemplo n.º 1
0
void GUIShowWindow( gui_window *wnd )
{
    GUIInvalidatePaintHandles( wnd );
    if( wnd->root != NULLHANDLE ) {
        ShowWnd( wnd->root_frame );
    }
    if( wnd->hwnd != NULLHANDLE ) {
        ShowWnd( wnd->hwnd_frame );
    }
}
Ejemplo n.º 2
0
static void MustMakePartition()
{
    TCHAR szMsg[cchRESOURCE];

    GetString(szMsg, IDS_MUST_MAKE_PARTITION);

    ShowWnd(hDlg, IDC_CREATE_PARTITION, FALSE);
    ShowWnd(hDlg, IDC_DONT_CREATE_PARTITION, FALSE);

    SetWndText(hDlg, IDC_ASK_CREATE_PARTITION, szMsg);
}
Ejemplo n.º 3
0
/*
 * Utility Functions _________________________________________________________________
 *
 */
static void ShowStatusMsg(UINT nMsgID)
{
    TCHAR szMsg[cchRESOURCE];

    GetString(szMsg, nMsgID);

    // Hide the controls that are at the same position as the message
    ShowWnd(hDlg, IDC_ROOT_AFS_QUESTION, FALSE);
    ShowWnd(hDlg, IDC_CREATE_ROOT_VOLUMES, FALSE);
    ShowWnd(hDlg, IDC_DONT_CREATE_ROOT_VOLUMES, FALSE);

    SetWndText(hDlg, IDC_ROOT_AFS_MSG, szMsg);
    ShowWnd(hDlg, IDC_ROOT_AFS_MSG);
}
Ejemplo n.º 4
0
/*
 * Utility Functions _________________________________________________________________
 *
 */
static void ConfigMsg(UINT nMsgID)
{
    TCHAR szMsg[cchRESOURCE];

    GetString(szMsg, nMsgID);

    // Hide the controls that are at the same position as the message
    ShowWnd(hDlg, IDC_CREATE_FS_QUESTION, FALSE);
    ShowWnd(hDlg, IDC_SHOULD_CONFIG_FILE_SERVER, FALSE);
    ShowWnd(hDlg, IDC_DONT_CONFIG_FILE_SERVER, FALSE);

    SetWndText(hDlg, IDC_MSG, szMsg);
    ShowWnd(hDlg, IDC_MSG);
}
Ejemplo n.º 5
0
void WndTrailModify::CaculateWhichToDisplay()
{
	if (m_pNode == NULL)
		return;
	ShowWnd(false);
	const char * name = m_pNode->GetName();
	if (strcmp(name,"timelength") == 0 || strcmp(name,"top_color") == 0 || strcmp(name,"bottom_color") == 0)
	{
		m_pEditBox->ShowWnd(true);
		m_pBtnConfirm->ShowWnd(true);
		m_pBtnCancel->ShowWnd(true);
		ShowWnd(true);
	}
}
Ejemplo n.º 6
0
void WndTrailModify::Update()
{
	//UPDATE DEFAULT
	ui::Wnd::UpdateDefault();

	DWORD &dwStyle = m_tWindowInfo.dwStyle;
	ui::Manager::_tagINPUTINFO *pInputInfo = ui::Manager::GetInstance()->GetInputInfoBuffer();
	if (dwStyle & FWS_VISIBLE && !(dwStyle & FWS_DISABLE))
	{
		ui::Wnd::UpdateChild();		
		if(pInputInfo->eType == UIMT_MS_BTNDOWN && pInputInfo->dwData & MK_LBUTTON)
		{
			if(!m_pNode)
				return;
			RECT rect;
			GetWndRect(&rect);
			if (::PtInRect(&rect,pInputInfo->ptMouse))
			{			
				m_pBtnConfirm->GetWndRect(&rect);
				if(::PtInRect(&rect,pInputInfo->ptMouse) && m_pBtnConfirm->IsVisible())
				{
					WndViewer  * pWndViewer	= (WndViewer *)GetParent();
					WndTrailTree *pWndTrailTree = pWndViewer->GetWndTrailTree();
					char strValue[128];
					m_pEditBox->GetEditText(strValue,127);
					if (strlen(strValue)>0)
					{
						m_pNode->SetValue(strValue);
						pWndTrailTree->SaveTrailFile();
					}
					ShowWnd(false);
				}

				m_pBtnCancel->GetWndRect(&rect);
				if(::PtInRect(&rect,pInputInfo->ptMouse) && m_pBtnCancel->IsVisible())
				{
					ShowWnd(false);
				}
			}
		}
	}
}
Ejemplo n.º 7
0
void ShowAndEnable(HWND hDlg, UINT uiCtrlID, BOOL bShowAndEnable)
{
    int nShow = SW_SHOW;
    ENABLE_STATE es = ES_ENABLE;

    if (!bShowAndEnable) {
	nShow = SW_HIDE;
	es = ES_DISABLE;
    }

    ShowWnd(hDlg, uiCtrlID, nShow);
    SetEnable(hDlg, uiCtrlID, es);
}
Ejemplo n.º 8
0
/*
 * Utility Functions _________________________________________________________________
 *
 */
static void CantMakePartition(UINT nMsgID)
{
    TCHAR szMsg[cchRESOURCE];

    GetString(szMsg, nMsgID);

    ShowWnd(hDlg, IDC_CREATE_PARTITION, FALSE);
    ShowWnd(hDlg, IDC_DONT_CREATE_PARTITION, FALSE);
    ShowWnd(hDlg, IDC_ASK_CREATE_PARTITION, FALSE);
    ShowWnd(hDlg, IDC_SELECT_DRIVE, FALSE);
    ShowWnd(hDlg, IDC_DRIVE_LIST, FALSE);
    ShowWnd(hDlg, IDC_NAME_LABEL, FALSE);
    ShowWnd(hDlg, IDC_PARTITION_NAME, FALSE);

    ShowWnd(hDlg, IDC_PARTITION_COVER);
    HWND hMsg = GetDlgItem(hDlg, IDC_PARTITION_MSG);
    ShowWindow(hMsg, SW_SHOW);
    SetWindowText(hMsg, szMsg);

    bCantCreate = TRUE;
}
Ejemplo n.º 9
0
static void ConfigMsg(UINT nMsgID)
{
    TCHAR szMsg[cchRESOURCE];

    GetString(szMsg, nMsgID);

    // Hide the controls that are at the same position as the message
    ShowWnd(hDlg, IDC_DB_SERVER_QUESTION, FALSE);
    ShowWnd(hDlg, IDC_CONFIG_DB_SERVER, FALSE);
    ShowWnd(hDlg, IDC_SCM_PROMPT, FALSE);
    ShowWnd(hDlg, IDC_SYS_CONTROL_MACHINE_LABEL, FALSE);
    ShowWnd(hDlg, IDC_SYS_CONTROL_MACHINE, FALSE);

    ShowWnd(hDlg, IDC_DONT_CONFIG_DB_SERVER, FALSE);

    SetWndText(hDlg, IDC_MSG, szMsg);
    ShowWnd(hDlg, IDC_MSG);
}
Ejemplo n.º 10
0
static void ShowInitialConfig()
{
    // FS
    bFsRunning = Configured(g_CfgData.configFS);
    if (bFsRunning) {
	SetCheck(hDlg, IDC_FS_SERVICE);
	SetWndText(hDlg, IDC_FS_STATUS_MSG, IDS_FS_RUNNING);
	SetWndText(hDlg, IDC_FS_ACTION_MSG, IDS_FS_HOW_TO_STOP);
    } else {
	SetCheck(hDlg, IDC_FS_SERVICE, FALSE);
	SetWndText(hDlg, IDC_FS_STATUS_MSG, IDS_FS_STOPPED);
	SetWndText(hDlg, IDC_FS_ACTION_MSG, IDS_FS_HOW_TO_RUN);
    }

    bFsOn = bFsRunning;

    // DB
    Set2State(hDlg, IDC_DB_SERVICE);

    bDbRunning = Configured(g_CfgData.configDB);
    if (bDbRunning) {
	SetCheck(hDlg, IDC_DB_SERVICE);
	SetWndText(hDlg, IDC_DB_STATUS_MSG, IDS_DB_RUNNING);
	SetWndText(hDlg, IDC_DB_ACTION_MSG, IDS_DB_HOW_TO_STOP);
    } else if (bDbParial) {
	SetCheck(hDlg, IDC_DB_SERVICE, BST_INDETERMINATE);
	SetWndText(hDlg, IDC_DB_STATUS_MSG, IDS_DB_PARTIAL_CONFIG);
	SetWndText(hDlg, IDC_DB_ACTION_MSG, IDS_DB_DETAILS);
	ShowWnd(hDlg, IDC_DB_DETAILS);
	Set3State(hDlg, IDC_DB_SERVICE);
    } else {
	SetCheck(hDlg, IDC_DB_SERVICE, FALSE);
	SetWndText(hDlg, IDC_DB_STATUS_MSG, IDS_DB_STOPPED);
	SetWndText(hDlg, IDC_DB_ACTION_MSG, IDS_DB_HOW_TO_RUN);
    }

    bDbOn = bDbRunning;

    // BK
    bBakRunning = Configured(g_CfgData.configBak);
    SetEnable(hDlg, IDC_BK_SERVICE, ES_ENABLE);
    if (bBakRunning) {
	SetCheck(hDlg, IDC_BK_SERVICE);
	SetWndText(hDlg, IDC_BK_STATUS_MSG, IDS_BK_RUNNING);
	SetWndText(hDlg, IDC_BK_ACTION_MSG, IDS_BK_HOW_TO_STOP);
    } else {
	SetCheck(hDlg, IDC_BK_SERVICE, FALSE);
	SetWndText(hDlg, IDC_BK_STATUS_MSG, IDS_BK_STOPPED);
	SetWndText(hDlg, IDC_BK_ACTION_MSG, IDS_BK_HOW_TO_RUN);
    }

    bBakOn = bBakRunning;

    // SC Server
    bScsRunning = Configured(g_CfgData.configSCS);
    SetEnable(hDlg, IDC_SCS, ES_ENABLE);
    if (bScsRunning) {
	SetCheck(hDlg, IDC_SCS);
	SetWndText(hDlg, IDC_SCS_ACTION_MSG, IDS_SCS_HOW_TO_STOP);
    } else {
	SetCheck(hDlg, IDC_SCS, FALSE);
	SetWndText(hDlg, IDC_SCS_STATUS_MSG, IDS_SCS_STOPPED);
	SetWndText(hDlg, IDC_SCS_ACTION_MSG, IDS_SCS_HOW_TO_RUN);
    }

    bScsOn = bScsRunning;

    // SC Client
    bSccRunning = Configured(g_CfgData.configSCC);
    SetEnable(hDlg, IDC_SCC, ES_ENABLE);
    if (bSccRunning) {
	SetCheck(hDlg, IDC_SCC);
	SetWndText(hDlg, IDC_SCC_ACTION_MSG, IDS_SCC_HOW_TO_STOP);
	EnableScMachine();
	lstrcpy(szScMachine, g_CfgData.szSysControlMachine);
    } else {
	SetCheck(hDlg, IDC_SCC, FALSE);
	SetWndText(hDlg, IDC_SCC_STATUS_MSG, IDS_SCC_STOPPED);
	SetWndText(hDlg, IDC_SCC_ACTION_MSG, IDS_SCC_HOW_TO_RUN);
	EnableScMachine(FALSE);
    }

    bSccOn = bSccRunning;
}	
Ejemplo n.º 11
0
void HideAndDisable(HWND hDlg, UINT uiCtrlID)
{
    ShowWnd(hDlg, uiCtrlID, SW_HIDE);
    SetEnable(hDlg, uiCtrlID, ES_DISABLE);
}