Ejemplo n.º 1
0
HRESULT ConfigureSeekbar(IMediaSeeking *pMS, CSliderCtrl Seekbar, CStatic& strPosition, HWND hwndOwner)
{
    HRESULT hr;

    // Disable seekbar for new file and reset tracker/position label
    Seekbar.SetPos(0);
    Seekbar.EnableWindow(FALSE);
    g_rtTotalTime=0;

	LANGID dwLanguageID = GetSystemLanguagePrimaryID();
	switch (dwLanguageID)
	{
	case LANG_SPANISH :
		strPosition.SetWindowText(TEXT("Position: 00m:00s\0"));
		break;
	default:
		strPosition.SetWindowText(TEXT("Position: 00m:00s\0"));
		break;
	}	

    DWORD dwSeekCaps = AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanGetDuration;

    // Can we seek this file?  If so, enable trackbar.
    if (pMS && (S_OK == pMS->CheckCapabilities(&dwSeekCaps))) 
    {
        hr = pMS->GetDuration(&g_rtTotalTime);
        Seekbar.EnableWindow(TRUE);
    }

    g_hwnd = hwndOwner;

    return hr;
}
Ejemplo n.º 2
0
void CFilesHashDlg::CalcSpeed(ULONGLONG tsize)
{
	KillTimer(m_timer);
	double speed;
	if(m_calculateTime > 0.1)
	{
		speed = tsize / m_calculateTime;
		CString speedStr, measure = _T("B/s");
		if((speed / 1024) > 1)
		{
			speed /= 1024;
			measure = _T("KB/s");
			if((speed / 1024) > 1)
			{
				speed /= 1024;
				measure = _T("MB/s");
			}
		}
		speedStr.Format(_T("%4.2f "), speed);
		CStatic* pWnd = (CStatic*)GetDlgItem(IDC_STATIC_SPEED);
		speedStr.Append(measure);
		pWnd->SetWindowText(speedStr);
	}
	else
	{
		CStatic* pWnd = (CStatic*)GetDlgItem(IDC_STATIC_SPEED);
		pWnd->SetWindowText(_T(""));
	}
}
Ejemplo n.º 3
0
//建立连接
void CTCPClientDlg::OnBnClickedBtnConn()
{
	UpdateData(TRUE);
	CStatic *pStatus = (CStatic*)GetDlgItem(IDC_LBL_CONNSTATUS);
	ASSERT(pStatus != NULL);
	//设置m_tcpClient属性
	m_tcpClient.m_remoteHost = m_remoteHost;
	m_tcpClient.m_port = m_remotePort;
	m_tcpClient.OnDisConnect = OnDisConnect;
	m_tcpClient.OnRead = OnRead;
	m_tcpClient.OnError = OnError;
	//打开客户端socket
	m_tcpClient.Open(this);

	//建立与服务器端连接
	if (m_tcpClient.Connect())
	{

		pStatus->SetWindowText(L"建立连接");
		UpdateData(FALSE);
	}
	else
	{
		AfxMessageBox(_T("建立连接失败"));
		pStatus->SetWindowText(L"连接断开");
		return;
	}
}
Ejemplo n.º 4
0
void CDlg3RGSegment::OnHScroll( UINT nSBCode, UINT nPos, CScrollBar* pScrollBar )
{
	CString str;
	CRect thumb;
	CStatic* pStatic;
	//UpdatePreproc();
	if ((m_chkDefaultThres.GetCheck() == BST_UNCHECKED) && (m_sldThreshold.GetPos() != m_nThresholdVal))
	{
		m_nThresholdVal = m_sldThreshold.GetPos();
		m_sldThreshold.GetThumbRect(&thumb);
		thumb += m_rThres.TopLeft();
		thumb += CPoint(0, SV_3DRG_TEXTHEIGHT);
		thumb.right += SV_3DRG_CHARWIDTH*3;
		pStatic = (CStatic*) GetDlgItem(IDC_TH_CUR);
		pStatic->MoveWindow(&thumb);
		str.Format(_T("%d"), m_nThresholdVal);
		pStatic->SetWindowText(str);		
	}

	m_sldBoundThres.GetThumbRect(&thumb);
	thumb += m_rBthres.TopLeft();
	thumb += CPoint(0, SV_3DRG_TEXTHEIGHT);
	thumb.right += SV_3DRG_CHARWIDTH*3;
	pStatic = (CStatic*) GetDlgItem(IDC_LBL_CURBTHRE);
	pStatic->MoveWindow(&thumb);
	str.Format(_T("%d"), m_sldBoundThres.GetPos());
	pStatic->SetWindowText(str);	

	UpdateLUT();
	UpdateSlices();
	DisplayImage();	
}
Ejemplo n.º 5
0
void UpdatePosition(IMediaSeeking *pMS, REFERENCE_TIME rtNow, CStatic& strPosition) 
{
    HRESULT hr;

    // If no reference time was passed in, read the current position
    if (rtNow == 0)
    {
        // Read the current stream position
        hr = pMS->GetCurrentPosition(&rtNow);
        if (FAILED(hr))
            return;
    }

    // Convert the LONGLONG duration into human-readable format
    unsigned long nTotalMS = (unsigned long) rtNow / 10000; // 100ns -> ms
    int nSeconds = nTotalMS / 1000;
    int nMinutes = nSeconds / 60;
    nSeconds %= 60;

    // Update the display
    TCHAR szPosition[32];
	//Verify the system language configuration
	LANGID dwLanguageID = GetSystemLanguagePrimaryID();
	switch (dwLanguageID)
	{
	case LANG_SPANISH :
		wsprintf(szPosition, _T("Position: %02dm:%02ds\0"), nMinutes, nSeconds);
		strPosition.SetWindowText(szPosition);
	break;
	default:
		wsprintf(szPosition, _T("Position: %02dm:%02ds\0"), nMinutes, nSeconds);
		strPosition.SetWindowText(szPosition);
	break;
	}
}
Ejemplo n.º 6
0
void COScopeCtrl::OnMouseMove(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default

 
 	if((point.x >= m_rectPlot.left) && (point.x <= m_rectPlot.right)
		&& (point.y >= m_rectPlot.top) && (point.y <= m_rectPlot.bottom))
	{
		m_iMousepointX = (point.x-m_rectPlot.left)/m_nShiftPixels + m_uiXAxisLabelMin;
		m_dMousepointY = (m_rectPlot.bottom - point.y)/m_dVerticalFactor + m_dLowerLimit;
		if(m_bLButtonDown == TRUE)
		{
			m_bMouseDrag = TRUE;
			m_pointMouseDragCur = point;
			InvalidateRect( m_rectPlot, FALSE );
		}
	}
	else
	{
		if(m_bLButtonDown == TRUE)
		{
			if(point.x > m_pointStart.x) 
			{
				m_pointMouseDragCur.x = min(point.x, m_rectPlot.right);
			}
			else
			{
				m_pointMouseDragCur.x = max(point.x, m_rectPlot.left);
			}
			if(point.y > m_pointStart.y)
			{
				m_pointMouseDragCur.y = min(point.y, m_rectPlot.bottom);
			}
			else
			{
				m_pointMouseDragCur.y = max(point.y, m_rectPlot.top);
			}
			m_bMouseDrag = TRUE;
			InvalidateRect( m_rectPlot, FALSE );
		}
	}

	CStatic* pWnd = (CStatic*)m_pParentWnd->GetDlgItem(IDC_STATIC_AXIS_X);
	CString str_x;
	str_x.Format(_T(" X = %d "), m_iMousepointX);//6位有效位数
	pWnd->SetWindowText(str_x);

	CStatic* sWnd = (CStatic*)m_pParentWnd->GetDlgItem(IDC_STATIC_AXIS_Y);
	CString str_y;
	str_y.Format(_T(" Y = %2.*lf "),m_nYDecimals, m_dMousepointY);//6位有效位数
	sWnd->SetWindowText(str_y);

	CWnd::OnMouseMove(nFlags, point);
}
Ejemplo n.º 7
0
LRESULT CProgressDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{   
  CString sRTL = Utility::GetINIString(_T("Settings"), _T("RTLReading"));
  if(sRTL.CompareNoCase(_T("1"))==0)
  {
    Utility::SetLayoutRTL(m_hWnd);
  }

  SetWindowText(Utility::GetINIString(_T("ProgressDlg"), _T("DlgCaption")));

  HICON hIcon = ::LoadIcon(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDR_MAINFRAME));
  SetIcon(hIcon, FALSE);
  SetIcon(hIcon, TRUE);

  m_prgProgress = GetDlgItem(IDC_PROGRESS);
  m_prgProgress.SetRange(0, 100);

  m_listView = GetDlgItem(IDC_LIST); 
  m_listView.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);
  m_listView.InsertColumn(0, _T("Status"), LVCFMT_LEFT, 2048);
  
  CStatic statCancel = GetDlgItem(IDCANCEL);
  statCancel.SetWindowText(Utility::GetINIString(_T("ProgressDlg"), _T("Cancel")));

  DlgResize_Init();

  return TRUE;
}
Ejemplo n.º 8
0
void CColorPannel::UpdateVideoDisplay(int nMode, BYTE byPos)
{
	CSliderCtrl *pSlider;
	CStatic  *pStatic;
	switch(nMode) {
	case VIDEO_BRIGHT:
		pSlider = &m_slider_bright;
		pStatic = (CStatic *)GetDlgItem(IDC_INT_BRIGHT);
		break;
	case VIDEO_CONTRAST:
		pSlider = &m_slider_contrast;
		pStatic = (CStatic *)GetDlgItem(IDC_INT_CONTRAST);
		break;
	case VIDEO_HUE:
		pSlider = &m_slider_hue;
		pStatic = (CStatic *)GetDlgItem(IDC_INT_HUE);
		break;
	case VIDEO_SATURATION:
		pSlider = &m_slider_saturation;
		pStatic = (CStatic *)GetDlgItem(IDC_INT_SATURTION);
		break;
	default:
		return;
	}
	pSlider->SetPos(byPos);
	CString str;
	str.Format("[%03d]", byPos);
	pStatic->SetWindowText(str);
}
Ejemplo n.º 9
0
void TwitterAuthSelectDialog::ShowCurrentStatus( bool rescan /* = FALSE */ )
{
    CButton *bp = (CButton *)GetDlgItem( IDC_BUTTON_GET_TOKEN );
    bp->EnableWindow( m_useOAuth );

    bp = (CButton *)GetDlgItem( IDC_RADIO_OAUTH );
    bp->SetCheck( m_useOAuth ? 1 : 0 );

    bp = (CButton *)GetDlgItem( IDC_RADIO_BASIC );
    bp->SetCheck( m_useBASIC ? 1 : 0 );

    CString status;
    CStatic *sp = (CStatic *)GetDlgItem( IDC_TOKEN_STATUS );
    if ( (m_oauthToken.GetLength()       > 0) &&
         (m_oauthTokenSecret.GetLength() > 0)    )
	    status.LoadString( IDS_ACCESSTOKEN_ACQUIRED );
    else
	    status.LoadString( IDS_ACCESSTOKEN_UNTAKEN );
    sp->SetWindowText( status );

    CEdit   *p = (CEdit *)GetDlgItem(IDC_EDIT_USERNAME);
    if ( rescan )
        p->GetWindowText( m_username );
    p->SetWindowText( m_username );
    p->EnableWindow( m_useBASIC );

    p = (CEdit *)GetDlgItem(IDC_EDIT_PASSWORD);
    if ( rescan )
        p->GetWindowText( m_password );
    p->SetWindowText( m_password );
    p->EnableWindow( m_useBASIC );
}
Ejemplo n.º 10
0
BOOL CAboutDlg::OnInitDialog()
{
    CDialog::OnInitDialog();

    // IDC_STATIC_APPNAME 的字体变粗 
    CStatic *pStatic = (CStatic*)GetDlgItem(IDC_STATIC_APPNAME);
    LOGFONT LogFont;
    pStatic->GetFont()->GetLogFont(&LogFont);
    LogFont.lfWeight = FW_BOLD;
    m_AppNameFont.CreateFontIndirect(&LogFont);
    pStatic->SetFont(&m_AppNameFont);

    // 设置文本
    pStatic = (CStatic*)GetDlgItem(IDC_STATIC_APPNAME);
    pStatic->SetWindowText(FormatString(TEXT("%s v%s"), APP_NAME, APP_VERSION));

    // 创建图标
    m_EmailIcon.Create(NULL, WS_CHILD | WS_VISIBLE | SS_ICON, CRect(62, 86, 0, 0), this);
    HICON hIcon = (HICON)::LoadImage(::AfxGetInstanceHandle(), 
        MAKEINTRESOURCE(IDI_ICON_EMAIL), IMAGE_ICON, 16, 16, 0);   
    m_EmailIcon.SetIcon(hIcon);

    m_HomepageIcon.Create(NULL, WS_CHILD | WS_VISIBLE | SS_ICON, CRect(62, 105, 0, 0), this);
    hIcon = (HICON)::LoadImage(::AfxGetInstanceHandle(), 
        MAKEINTRESOURCE(IDI_ICON_HOMEPAGE), IMAGE_ICON, 16, 16, 0);   
    m_HomepageIcon.SetIcon(hIcon);

    // 设置超链接
    m_EmailLink.SetWindowText(APP_EMAIL);
    m_EmailLink.SetUrl(CString(TEXT("mailto:")) + APP_EMAIL);
    m_HomepageLink.SetWindowText(APP_HOMEPAGE);
    m_HomepageLink.SetUrl(APP_HOMEPAGE);

    return TRUE;
}
Ejemplo n.º 11
0
void CFileFindDlg::OnOK() 
{
	UpdateData(TRUE);

	CUserCfg* pUsrCfg = ((CDbgRemoteApp*)AfxGetApp())->pGetUserCfg();
	pUsrCfg->AddFileFindPath(m_FindFolder); 
	pUsrCfg->AddFileFindTypes(m_FileType);
	pUsrCfg->AddFileFindWhat(m_FindText);

	LoadFindHistory();

	UpdateData(FALSE);

	CListCtrl* pLst = (CListCtrl*)GetDlgItem(IDC_RESULTS_LST);
	pLst->DeleteAllItems();

	if (m_hFindThread)
	{
		m_bCancelFind = TRUE;
		if (::WaitForSingleObject(m_hFindThread, 250) == WAIT_TIMEOUT)
		{
			TerminateThread(m_hFindThread, -1);
		}
		m_hFindThread = NULL;
	}

	m_bCancelFind = FALSE;
	m_hFindThread = (HANDLE)_beginthread(CFileFindDlg::FileFindThreadFn, 0, this);

	CStatic* pStc = (CStatic*)GetDlgItem(IDC_STATIC_NUMRESULTS);
	pStc->SetWindowText("Searching...");
	//CDialog::OnOK();
}
Ejemplo n.º 12
0
STDMETHODIMP CAtlBase::ShowProgressForm(LONG bShow)
{
	if (bShow)
	{
		if (!g_bProgressInited)
		{
			g_bProgressInited = TRUE;
			g_ProgressDlg.Create(NULL);
			g_ProgressDlg.CenterWindow();			

			HWND hName = g_ProgressDlg.GetDlgItem(IDC_STATIC_NAME);
			g_ProgressName.Attach(hName);
			HWND hProgress = g_ProgressDlg.GetDlgItem(IDC_PROGRESS1);
			g_ProgressProgress.Attach(hProgress);
		}
		g_ProgressDlg.ShowWindow(SW_SHOW);
	}
	else
	{
		g_ProgressDlg.ShowWindow(SW_HIDE);
		g_ProgressName.SetWindowText("");
		g_ProgressProgress.SetPos(0);
	}

	return S_OK;
}
Ejemplo n.º 13
0
// VerConfig 消息处理程序
BOOL VerConfig::OnInitDialog()
{
	CDialog::OnInitDialog();

	CStatic *hStatic;
	CString strout;
	static CFont font;

	font.CreatePointFont(100, font_list[font_index]);

	hStatic = (CStatic*)GetDlgItem(IDC_STATIC_VERCFG);
	strout.Format("");
	strout.Format(strout + "SAVE_TICK              %d\n", SAVE_TICK);
 	strout.Format(strout + "CONFIG_MAX_AUTO_MAIL   %d\n", CONFIG_MAX_AUTO_MAIL);
 	strout.Format(strout + "PROGRAM_VERSION        %s\n", PROGRAM_VERSION);
 	strout.Format(strout + "EMAIL_TITLE            %s\n", EMAIL_TITLE);
 	strout.Format(strout + "PROGRAM_TITLE          %s\n", PROGRAM_TITLE);
	hStatic->SetFont(&font);
	hStatic->SetWindowText(strout);
	
	
	

	SetWindowText("软件配置信息");
	return true;
}
Ejemplo n.º 14
0
BOOL UserPassDialog::OnInitDialog() 
{
	CDialog::OnInitDialog();
	m_SiteURL.SetWindowText(m_site_url);
	m_User.SetWindowText(m_user);
	m_Pass.SetWindowText("");
	return TRUE;
}
Ejemplo n.º 15
0
void CFilesHashDlg::OnBnClickedContext()
{
	if(m_bLimited)
	{
		OSVERSIONINFOEX osvi;
		BOOL bOsVersionInfoEx;
		if(GetWindowsVersion(osvi, bOsVersionInfoEx) &&
			osvi.dwMajorVersion >= 6)
		{
			if(ElevateProcess())
				ExitProcess(0);
		}
	}

	// May not a limited process.
	CStatic* pWnd = (CStatic *)GetDlgItem(IDC_STATIC_ADDRESULT);
	CString buttonText = _T("");

	m_btnContext.GetWindowText(buttonText);

	if(buttonText.Compare(MAINDLG_ADD_CONTEXT_MENU) == 0)
	{
		RemoveContextMenu(); // Try to delete all items related to fHash
		if(AddContextMenu())
		{
			pWnd->SetWindowText(MAINDLG_ADD_SUCCEEDED);
			m_btnContext.SetWindowText(MAINDLG_REMOVE_CONTEXT_MENU);
		}
		else
		{
			pWnd->SetWindowText(MAINDLG_ADD_FAILED);
		}
	}
	else if(buttonText.Compare(MAINDLG_REMOVE_CONTEXT_MENU) == 0)
	{
		if(RemoveContextMenu())
		{
			pWnd->SetWindowText(MAINDLG_REMOVE_SUCCEEDED);
			m_btnContext.SetWindowText(MAINDLG_ADD_CONTEXT_MENU);
		}
		else
		{
			pWnd->SetWindowText(MAINDLG_REMOVE_FAILED);
		}
	}
}
Ejemplo n.º 16
0
//客户端连接断开消息函数
LONG CTCPClientDlg::OnClientDisconnect(WPARAM wParam,LPARAM lParam)
{
	//得到状态栏标签
	CStatic * pStatus = (CStatic *)GetDlgItem(IDC_LBL_CONNSTATUS);
	ASSERT(pStatus != NULL);

	pStatus->SetWindowText(_T("连接断开"));
	return 0;
}
Ejemplo n.º 17
0
BOOL CChrSheetEquip::OnInitDialog()
{
	CPropertyPage::OnInitDialog();

	// TODO :  ここに初期化を追加してください

	CStatic *label;

	// 名前

	label = (CStatic *)GetDlgItem( IDC_CHR_SHEET_EQUIP_NAME );
	label->SetWindowText( m_StrName );

	label = (CStatic *)GetDlgItem( IDC_CHR_SHEET_EQUIP_PREV );
	if( get_flg_mbr_data_change_page_is_crsr() )
		label->SetWindowText( MSG_MBR_DATA_PREV_MBR );
	else
		label->SetWindowText( MSG_MBR_DATA_PREV_PAGE );

	label = (CStatic *)GetDlgItem( IDC_CHR_SHEET_EQUIP_NEXT );
	if( get_flg_mbr_data_change_page_is_crsr() )
		label->SetWindowText( MSG_MBR_DATA_NEXT_MBR );
	else
		label->SetWindowText( MSG_MBR_DATA_NEXT_PAGE );

	// 装備

	m_Equip_0.SetWindowText( m_StrEquip[0] );
	m_Equip_1.SetWindowText( m_StrEquip[1] );
	m_Equip_2.SetWindowText( m_StrEquip[2] );
	m_Equip_3.SetWindowText( m_StrEquip[3] );
	m_Equip_4.SetWindowText( m_StrEquip[4] );
	m_Equip_5.SetWindowText( m_StrEquip[5] );
	m_Equip_6.SetWindowText( m_StrEquip[6] );
	m_Equip_7.SetWindowText( m_StrEquip[7] );
	m_Equip_8.SetWindowText( m_StrEquip[8] );
	m_Equip_9.SetWindowText( m_StrEquip[9] );
	m_Equip_10.SetWindowText( m_StrEquip[10] );
	m_Equip_11.SetWindowText( m_StrEquip[11] );
	m_Equip_12.SetWindowText( m_StrEquip[12] );

	return TRUE;  // return TRUE unless you set the focus to a control
	// 例外 : OCX プロパティ ページは必ず FALSE を返します。
}
Ejemplo n.º 18
0
// set the text at the specified column of this row
void CCustomListRowWnd::SetText(INT32 col, CString text)
{
    CStatic* pStat = (CStatic*)m_ColumnObjects[col];
    if( pStat == NULL )
        AddText(col,text);
    else
    {
        pStat->SetWindowText(text);
        pStat->UpdateWindow();
    }
}
Ejemplo n.º 19
0
LRESULT CFileFindDlg::OnFindComplete(WPARAM wParam, LPARAM lParam)
{
	CStatic* pStc = (CStatic*)GetDlgItem(IDC_STATIC_NUMRESULTS);

	CString resultString;

	CListCtrl* pLst = (CListCtrl*)GetDlgItem(IDC_RESULTS_LST);
	resultString.Format("Search Results - %d\n", pLst->GetItemCount());
	pStc->SetWindowText(resultString);
	return 1;
}
Ejemplo n.º 20
0
void CFuncDialog::OnSelchangeFunclist() 
{
    CHawkApp* app = (CHawkApp*)AfxGetApp();
    CStatic* tip = (CStatic*)GetDlgItem(IDC_FUNCTIP);
    CListBox* pList = (CListBox*)GetDlgItem(IDC_FUNCLIST);
    CString current;
    pList->GetText(pList->GetCurSel(), current);

    current = app->GenDecl(current);
    tip->SetWindowText(current);
}
Ejemplo n.º 21
0
void    ProceedingDialog::ChangeDialogText(
                const char *title,
                const char *message
            )
{
    SetWindowText( title );

    CStatic *sp = (CStatic *)GetDlgItem( IDC_STATIC_PROCEED_STRING );
    sp->SetWindowText( message );

    SetFocus();
}
Ejemplo n.º 22
0
VOID CBindTypePage::UpdateControls (UINT32 nType)
{
	CComboBox ctlComboBox;
	ctlComboBox.Attach(GetDlgItem(IDC_COMBO_DISKCOUNT));
	ctlComboBox.ResetContent();

	CString strDesc;

	switch(nType)
	{
	case NMT_AGGREGATE :
		ctlComboBox.InsertString(-1, _T("2"));
		ctlComboBox.InsertString(-1, _T("3"));
		ctlComboBox.InsertString(-1, _T("4"));
		ctlComboBox.InsertString(-1, _T("5"));
		ctlComboBox.InsertString(-1, _T("6"));
		ctlComboBox.InsertString(-1, _T("7"));
		ctlComboBox.InsertString(-1, _T("8"));
		strDesc.LoadString(IDS_BNZ_DESC_AGGREGATION);
		break;
	case NMT_RAID0 :
		ctlComboBox.InsertString(-1, _T("2"));
		ctlComboBox.InsertString(-1, _T("4"));
		ctlComboBox.InsertString(-1, _T("8"));
		strDesc.LoadString(IDS_BNZ_DESC_RAID0);
		break;
	case NMT_RAID1R3 :
		ctlComboBox.InsertString(-1, _T("2"));
		strDesc.LoadString(IDS_BNZ_DESC_RAID1);
		break;
	case NMT_RAID4R3 :
		ctlComboBox.InsertString(-1, _T("3"));
		ctlComboBox.InsertString(-1, _T("5"));
		ctlComboBox.InsertString(-1, _T("9"));
		strDesc.LoadString(IDS_BNZ_DESC_RAID4);
		break;
	case NMT_RAID5 :
		ctlComboBox.InsertString(-1, _T("3"));
		ctlComboBox.InsertString(-1, _T("5"));
		ctlComboBox.InsertString(-1, _T("9"));
		strDesc.LoadString(IDS_BNZ_DESC_RAID5);
		break;
	default:
		break;
	}

	ctlComboBox.SetCurSel(0);

	CStatic ctlStatic;
	ctlStatic.Attach(GetDlgItem(IDC_BIND_TYPE_DESCRIPTION));
	ctlStatic.SetWindowText(strDesc);

}
Ejemplo n.º 23
0
void CAboutDlg::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CDialog::OnShowWindow(bShow, nStatus);
	
    if ( bShow ) {
        // Web の URLとメールアドレスを下線付きで表示する
        LOGFONT tLogFont;
        CFont   *cWndFont;

        cWndFont = GetFont(); 
        cWndFont->GetLogFont( &tLogFont );
        tLogFont.lfUnderline = 1;
        m_cFont.CreateFontIndirect( &tLogFont );

        CStatic *s = (CStatic *)GetDlgItem( IDC_JBOOKLET_MAIL_ADDR );
        s->SetFont( &m_cFont, TRUE );

        s = (CStatic *)GetDlgItem( IDC_JBOOKLET_WEB_URL );
        s->SetFont( &m_cFont, TRUE );

        CString str;
        str.LoadString( IDS_JBOOKLET_VERSION );
        str = "JBOOKlet Version " + str;
        s = (CStatic *)GetDlgItem( IDC_JBOOKLET_VERSION );
        s->SetWindowText( str );

        // OpenSSL 版数表示
        char    buf[BUFSIZ];
        size_t  sz = BUFSIZ;

        s = (CStatic *)GetDlgItem( IDC_OPENSSL );
        s->SetWindowText( getOpenSSLversion( buf, sz ) );

        // iconv 版数表示
        s = (CStatic *)GetDlgItem( IDC_ICONV );
        s->SetWindowText( getIconvVersion( buf, sz ) );
    }
}
Ejemplo n.º 24
0
void CFilesHashDlg::DoMD5()
{
	if(m_hWorkThread)
	{
		CloseHandle(m_hWorkThread);
	}
	
	m_bFind = FALSE;
	m_btnClr.SetWindowText(MAINDLG_CLEAR);

	PrepareAdvTaskbar();

	m_prog.SetPos(0);
	//m_progWhole.SetPos(0);
	SetWholeProgPos(0);

	m_thrdData.uppercase = (m_chkUppercase.GetCheck() != FALSE);

	m_calculateTime = 0.0;
	m_timer = SetTimer(1, 100, NULL);
	CStatic* pWnd = (CStatic*)GetDlgItem(IDC_STATIC_TIME);
	CString cstrZero(_T("0 "));
	cstrZero.Append(SECOND_STRING);
	pWnd->SetWindowText(cstrZero);
	pWnd = (CStatic*)GetDlgItem(IDC_STATIC_SPEED);
	pWnd->SetWindowText(_T(""));

	DWORD thredID;

	m_thrdData.stop = FALSE;
	m_hWorkThread = (HANDLE)_beginthreadex(NULL, 
											0, 
											(unsigned int (WINAPI *)(void *))md5_file, 
											&m_thrdData, 
											0, 
											(unsigned int *)&thredID);

}
Ejemplo n.º 25
0
BOOL CMainDlg::OnInitDialog() {
	CDialog::OnInitDialog();

	CStatic *label = (CStatic *)GetDlgItem(IDC_VERSION);
	char version[32];
	SSCE_Version(version, sizeof(version));
	CString v;
	v.Format(_T("Version %s"), version);
	label->SetWindowText(v);

	licenseKey = SentryLicenseKey;

	return (TRUE);
}
Ejemplo n.º 26
0
//断开连接
void CTCPClientDlg::OnBnClickedBtnDisconn()
{
	CStatic *pStatus = (CStatic*)GetDlgItem(IDC_LBL_CONNSTATUS);
	ASSERT(pStatus != NULL);
	//关闭客户端套接字
	if (m_tcpClient.Close())
	{
		pStatus->SetWindowText(L"连接断开");
	}
	else
	{
		AfxMessageBox(_T("连接断开失败"));
	}	
}
Ejemplo n.º 27
0
void COScopeCtrl::OnMouseMove(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default

 
 	if((point.x >= m_rectPlot.left) && (point.x <= m_rectPlot.right)
		&& (point.y >= m_rectPlot.top) && (point.y <= m_rectPlot.bottom))
	{
		MousepointX = (point.x-m_rectPlot.left)/m_nShiftPixels + XAxisLabelMin;
		MousepointY = (m_rectPlot.bottom - point.y)/m_dVerticalFactor + m_dLowerLimit;
	}

	CStatic* pWnd = (CStatic*)m_pParentWnd->GetDlgItem(IDC_STATIC_AXIS_X);
	CString str_x;
	str_x.Format(_T(" X = %d "), MousepointX);//6位有效位数
	pWnd->SetWindowText(str_x);

	CStatic* sWnd = (CStatic*)m_pParentWnd->GetDlgItem(IDC_STATIC_AXIS_Y);
	CString str_y;
	str_y.Format(_T(" Y = %3.3f "), MousepointY);//6位有效位数
	sWnd->SetWindowText(str_y);

	CWnd::OnMouseMove(nFlags, point);
}
Ejemplo n.º 28
0
void CFilesHashDlg::OnBnClickedClean()
{
	if(!m_thrdData.threadWorking)
	{
		CString strBtnText;
		m_btnClr.GetWindowText(strBtnText);
		if(strBtnText.Compare(MAINDLG_CLEAR) == 0)
		{
			EnterCriticalSection(&g_criticalSection);
			{
				m_thrdData.strAll = _T("");
				m_thrdData.resultList.clear();
			
				m_editMain.SetWindowText(m_thrdData.strAll);
			}
			LeaveCriticalSection(&g_criticalSection);

			CStatic* pWnd =(CStatic *)GetDlgItem(IDC_STATIC_TIME);
			pWnd->SetWindowText(_T(""));
			pWnd = (CStatic*)GetDlgItem(IDC_STATIC_SPEED);
			pWnd->SetWindowText(_T(""));

			m_prog.SetPos(0);
			//m_progWhole.SetPos(0);
			SetWholeProgPos(0);
		}
		else if(strBtnText.Compare(MAINDLG_CLEAR_VERIFY) == 0)
		{
			m_bFind = FALSE; // 退出搜索模式
			m_btnClr.SetWindowText(MAINDLG_CLEAR);

			RefreshResult();
			RefreshMainText();
		}
	}
}
Ejemplo n.º 29
0
HRESULT ITxFormView::UpdateTxView()
{
    int hResult = LoadAllMsgItems();
    if (S_OK == hResult)
    {
        EnsureLastItemVisible();
        //Based on the connection status the form has to be updated.
        hResult = OnBusStatusChanged(m_eBusStatus);
    }
    CStatic* pomStatic = (CStatic*)GetDlgItem(IDC_STATIC_DATA_BYTE_VIEW);
    if (nullptr != pomStatic)
    {
        if (true == m_bHexMode)
        {
            pomStatic->SetWindowText(def_DATA_BYTE_HEX);
        }
        else
        {
            pomStatic->SetWindowText(def_DATA_BYTE_DEC);
        }
    }

    return hResult;
}
//----------------------------- FUNCTION -------------------------------------*
void ExtUserParamValues::OnSelchangeExtPrmValues() 
{
	// TODO: Add your control notification handler code here
	int iSel = m_cboExtPrmValues.GetCurSel();
	
	DWORD Value = m_cboExtPrmValues.GetItemData(iSel);
	CString szBits;
	if (Value != CB_ERR) {
        if (m_pParam->IsBitArea()) {
            Value <<= m_pParam->GetBitAreaStart();
        }
		szBits = ::ConvertDWORD2BitString(Value);
    }

	CStatic* pBits = (CStatic*)GetDlgItem(IDC_PARAM_BITS);
	if (pBits)
		pBits->SetWindowText(szBits);
}