コード例 #1
0
BOOL CJXCRetailOnlineDlg::OnInitDialog()
{
	CNDDialog::OnInitDialog();
	//未查询,初始不在线
	m_bOnline = 2;

	InitListView();

	SetEditFont();

	CIBAHelpper::CreateFont(m_BigFont, 23, 700);
	GetDlgItem(IDC_STATIC_MONEY)->SetFont(&m_BigFont);
	//编辑框的各种限制
	m_edtCount.DisableMask();
	m_edtCount.SetValidChars(_T("1234567890"));
	m_edtCount.SetLimitText(3);
	m_edtCount.SetWindowText(_T("1"));

	GetDlgItem(IDOK)->EnableWindow(FALSE);
	GetDlgItem(IDC_BUTTON_CLEAR)->EnableWindow(FALSE);
	GetDlgItem(IDC_BUTTON_DEL)->EnableWindow(FALSE);
	GetDlgItem(IDC_BUTTON_ADD)->EnableWindow(FALSE);
	//捆绑快捷键
	AddFocusEnter(IDC_EDIT_IDCARDSNO, IDC_BUTTON_QUERY);
	AddFocusEnter(IDC_EDIT_TERMID, IDC_BUTTON_QUERY);
	AddFocusEnter(IDC_EDIT_COUNT, IDC_BUTTON_ADD);
	//首次焦点位置
	GetDlgItem(IDC_EDIT_TERMID)->SetFocus();

	return FALSE;  // return TRUE unless you set the focus to a control
	// 异常: OCX 属性页应返回 FALSE
}
コード例 #2
0
void CShiftCashView::OnInitialUpdate()
{
	CIBAFormView::OnInitialUpdate();

	InitListView();
	SetEditFont();
	GetDlgItem(IDC_STATIC_RESULT)->SetFont(&m_Font);
	GetDlgItem(IDC_STATIC_SHIFTCASH)->SetFont(&m_Font);
}
コード例 #3
0
ファイル: BossPwdDlg.cpp プロジェクト: layerfsd/PersonalIBA
BOOL CDlgBossPwd::OnInitDialog()
{
	CIBADialog::OnInitDialog();

	SetEditFont();
	GetDlgItem(IDC_EDIT_PASSWORD)->SetFocus();

	return FALSE;  // return TRUE unless you set the focus to a control
	// 异常: OCX 属性页应返回 FALSE
}
コード例 #4
0
ファイル: BossPwdDlg.cpp プロジェクト: layerfsd/PersonalIBA
BOOL CDlgBossPwdEx::OnInitDialog()
{
	CIBADialog::OnInitDialog();

	if (!m_strRemark.IsEmpty())
	{
		GetDlgItem(IDC_STATIC_MODE)->SetWindowText(m_strRemark);
	}
	if (!m_strCaption.IsEmpty())
	{
		GetDlgItem(IDC_STATIC_CAPTION)->SetWindowText(m_strCaption);
	}

	SetEditFont();
	GetDlgItem(IDC_EDIT_PASSWORD)->SetFocus();

	return FALSE;  // return TRUE unless you set the focus to a control
	// 异常: OCX 属性页应返回 FALSE
}
コード例 #5
0
BOOL CNDCardCreditDlg::OnInitDialog()
{
	CNDDialog::OnInitDialog();

	//{ 2011/05/24-gxx: 自动查询
	if (m_bAutoQuery)
	{
		SetTimer(TimeIdOfAutoQuery, 100, NULL);//只查询一次
	}
	else
	{
		CWnd* pWnd = GetDlgItem(IDC_EDIT_IDCARDSNO);
		ASSERT(pWnd);
		if (pWnd)
		{
			pWnd->SetFocus();
		}
	}
	//}

	SetEditFont();
	GetDlgItem(IDC_EDIT_IDCARDSNO)->SetFont(&m_BigFont);
	GetDlgItem(IDC_EDIT_IDCARDSNO)->SetFocus();

	GetDlgItem(IDC_BUTTON_CREDIT)->EnableWindow(FALSE);
	GetDlgItem(IDC_BUTTON_READCARD)->EnableWindow(FALSE);

	m_cboCardType.SetFont(&m_Font);
	m_cboCardType.AddString(LOAD_STRING(IDS_VISUAL_CARD));  // 虚拟卡
	m_cboCardType.AddString(LOAD_STRING(IDS_REAL_CARD2));   // 真实卡
	m_cboCardType.SetCurSel(0);

	AddFocusEnter(IDC_EDIT_CREDIT, IDC_BUTTON_CREDIT);
	AddFocusEnter(IDC_EDIT_PASSWORD, IDC_BUTTON_CREDIT);
	AddFocusEnter(IDC_EDIT_ID, IDC_BUTTON_CREDIT);

	return FALSE;  // return TRUE unless you set the focus to a control
	// 异常: OCX 属性页应返回 FALSE
}
コード例 #6
0
ファイル: BlobMgmt.cpp プロジェクト: sylarhl/sqlgoy
wyBool
BlobMgmt::InitDlgVales()
{
	wyString codepage;

    //if find dialog is open, we need to close find dialog 
	if(pGlobals->m_pcmainwin->m_finddlg)
	{
		DestroyWindow(pGlobals->m_pcmainwin->m_finddlg);
		pGlobals->m_pcmainwin->m_finddlg = NULL;
	}

	VERIFY(m_hwndtab   = GetDlgItem(m_hwnddlg, IDC_MAINTAB));
	VERIFY(m_hwndedit  = GetDlgItem(m_hwnddlg, IDC_TEXT));
	VERIFY(m_hwndimage = GetDlgItem(m_hwnddlg, IDC_IMAGE));
	VERIFY(m_hwndnull  = GetDlgItem(m_hwnddlg, IDC_SETNULL));
	VERIFY(m_hwndcombo = GetDlgItem(m_hwnddlg, IDC_COMBO));
    
	InsertTab(m_hwndtab, 0, _(L"Text"));
    InsertTab(m_hwndtab, 1, _(L"Image"));
	
	// if its not word wrap then we need to destroy it.
	SetEditWordWrap(m_hwndedit, wyTrue, wyTrue);
    
	// just for the sake hide both of them
	VERIFY(ShowWindow(m_hwndimage, FALSE));
	VERIFY(ShowWindow(m_hwndedit, FALSE));

	if(m_piub && m_piub->m_isnull == wyTrue)
    {
		SendMessage(GetDlgItem(m_hwnddlg, IDC_SETNULL), BM_SETCHECK, BST_CHECKED, 0);
		DisableAll();
	}

	SetWindowLongPtr(m_hwndimage, GWLP_USERDATA,(LONG_PTR)this);
	SetWindowLongPtr(m_hwndedit, GWLP_USERDATA,(LONG_PTR)this);
	
	SendMessage(m_hwndedit, SCI_SETCODEPAGE, SC_CP_UTF8, 0);
	
	//To avoid printing of special characters in scintilla on ctrl+F and ctrl+H
	SendMessage (m_hwndedit, SCI_CLEARCMDKEY, (SCMOD_CTRL << 16)|'F', 0);
	SendMessage (m_hwndedit, SCI_CLEARCMDKEY, (SCMOD_CTRL << 16)|'H', 0);
	
    //Line added because to turn off the margin
    SendMessage(m_hwndedit, SCI_SETMARGINWIDTHN,1,0);
    
	//m_encodingtype.SetAs(codepage.GetString());
	
	//InitEncodingType();
	m_wporigtextproc =(WNDPROC)SetWindowLongPtr(m_hwndedit, GWLP_WNDPROC,(LONG_PTR)TextProc);
	m_wporigpaintproc =(WNDPROC)SetWindowLongPtr(m_hwndimage, GWLP_WNDPROC,(LONG_PTR)ImageProc);
	
	//initializing text in combobox
	InitComboText();
	ShowData();

    // set the font after reading it from ini file.
	SetEditFont(m_hwndedit);

	// if its not editable then we disable all except the ok button
	if(m_edit == wyFalse)
    {
		DisableAll();
		EnableWindow(GetDlgItem(m_hwnddlg, IDC_SETNULL), FALSE);
        EnableWindow(GetDlgItem(m_hwnddlg, IDC_TEXT), TRUE);
        SendMessage(GetDlgItem(m_hwnddlg, IDC_TEXT), EM_SETREADONLY, TRUE, TRUE);
        SetFocus(GetDlgItem(m_hwnddlg, IDC_TEXT));
	}

	m_checkboxstate = SendMessage(GetDlgItem(m_hwnddlg, IDC_SETNULL), BM_GETCHECK, 0, 0);
    SendMessage(m_hwndedit, SCI_EMPTYUNDOBUFFER, 0, 0);

	return wyTrue;
}