当前位置: 首页>>代码示例>>C++>>正文


C++ CEdit::FmtLines方法代码示例

本文整理汇总了C++中CEdit::FmtLines方法的典型用法代码示例。如果您正苦于以下问题:C++ CEdit::FmtLines方法的具体用法?C++ CEdit::FmtLines怎么用?C++ CEdit::FmtLines使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CEdit的用法示例。


在下文中一共展示了CEdit::FmtLines方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Py_BuildValue

/////////////////////////////////////////////////////////////////////
//
// Edit Control object
//
//////////////////////////////////////////////////////////////////////
// @pymethod int|PyCEdit|FmtLines|Sets the formatting options for the control.
static PyObject *PyCEdit_fmt_lines(PyObject *self, PyObject *args)
{
	// @ comm Sets the inclusion of soft line-break characters on or off within a multiple-line edit control.
	// A soft line break consists of two carriage returns and a linefeed inserted at the end of a line that is 
	// broken because of word wrapping.
	// A hard line break consists of one carriage return and a linefeed. 
	// Lines that end with a hard line break are not affected by FmtLines. ~
	// This function is inly effective on multi-line edit controls.
	CEdit *pEdit = GetEditCtrl(self);
	BOOL format; // @pyparm int|bAddEOL||Specifies whether soft line-break characters are to be inserted.
	             // A value of TRUE inserts the characters; a value of FALSE removes them.
	if (!pEdit || !PyArg_ParseTuple(args, "i:FmtLines", &format))
		return NULL;
	GUI_BGN_SAVE;
	BOOL rc = pEdit->FmtLines( format ); // @pyseemfc CEdit|FmtLines
	GUI_END_SAVE;
	return Py_BuildValue("i", rc );
	// @rdesc Nonzero if any formatting occurs; otherwise 0.
}
开发者ID:DavidGuben,项目名称:rcbplayspokemon,代码行数:25,代码来源:win32ctledit.cpp

示例2: OnInitDialog

BOOL CViewCodeDlg::OnInitDialog()
{
    CEdit* pEdit = (CEdit*)GetDlgItem(IDC_VIEWCODEEDITBOX);

    pEdit->FmtLines(TRUE);
    pEdit->SetWindowText( _T("howdy\015\012doody") );

    TCHAR* strTemplate = _T("   pd3dDevice->SetTextureStageState( %d, D3DTSS_%s%s );\015\012" );

    TCHAR buffer[2048];
    TCHAR strOutText[2048] = _T("");

    strcat( strOutText, _T("HRESULT SetShader( LPDIRECT3DDEVICE9 pd3dDevice )\015\012") );
    strcat( strOutText, _T("{\015\012") );

    sprintf( buffer, strTemplate, 0, _T("COLOROP,   D3DTOP_"), TranslateTextureOp( g_wT0COp ) );
    strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 0, _T("COLORARG1, "), TranslateTextureArg( g_wT0CArg1 ) );
    if( g_wT0COp != D3DTOP_DISABLE && g_wT0COp != D3DTOP_SELECTARG2 )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 0, _T("COLORARG2, "), TranslateTextureArg( g_wT0CArg2 ) );
    if( g_wT0COp != D3DTOP_DISABLE && g_wT0COp != D3DTOP_SELECTARG1 )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 0, _T("COLORARG0, "), TranslateTextureArg( g_wT0CArg0 ) );
    if( g_wT0COp == D3DTOP_MULTIPLYADD || g_wT0COp == D3DTOP_LERP )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 0, _T("ALPHAOP,   D3DTOP_"), TranslateTextureOp( g_wT0AOp ) );
    strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 0, _T("ALPHAARG1, "), TranslateTextureArg( g_wT0AArg1 ) );
    if( g_wT0AOp != D3DTOP_DISABLE && g_wT0AOp != D3DTOP_SELECTARG2 )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 0, _T("ALPHAARG2, "), TranslateTextureArg( g_wT0AArg2 ) );
    if( g_wT0AOp != D3DTOP_DISABLE && g_wT0AOp != D3DTOP_SELECTARG1 )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 0, _T("ALPHAARG0, "), TranslateTextureArg( g_wT0AArg0 ) );
    if( g_wT0AOp == D3DTOP_MULTIPLYADD || g_wT0AOp == D3DTOP_LERP )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 0, _T("RESULTARG, "), TranslateTextureArg( g_wT0RArg ) );
    if( g_wT0RArg == D3DTA_TEMP )
        strcat( strOutText, buffer );
    strcat( strOutText, _T("\015\012") );

    sprintf( buffer, strTemplate, 1, _T("COLOROP,   D3DTOP_"), TranslateTextureOp( g_wT1COp ) );
    strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 1, _T("COLORARG1, "), TranslateTextureArg( g_wT1CArg1 ) );
    if( g_wT1COp != D3DTOP_DISABLE && g_wT1COp != D3DTOP_SELECTARG2 )
        strcat( strOutText, buffer );   
    sprintf( buffer, strTemplate, 1, _T("COLORARG2, "), TranslateTextureArg( g_wT1CArg2 ) );
    if( g_wT1COp != D3DTOP_DISABLE && g_wT1COp != D3DTOP_SELECTARG1 )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 1, _T("COLORARG0, "), TranslateTextureArg( g_wT1CArg0 ) );
    if( g_wT1COp == D3DTOP_MULTIPLYADD || g_wT1COp == D3DTOP_LERP )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 1, _T("ALPHAOP,   D3DTOP_"), TranslateTextureOp( g_wT1AOp ) );
    strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 1, _T("ALPHAARG1, "), TranslateTextureArg( g_wT1AArg1 ) );
    if( g_wT1AOp != D3DTOP_DISABLE && g_wT1AOp != D3DTOP_SELECTARG2 )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 1, _T("ALPHAARG2, "), TranslateTextureArg( g_wT1AArg2 ) );
    if( g_wT1AOp != D3DTOP_DISABLE && g_wT1AOp != D3DTOP_SELECTARG1 )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 1, _T("ALPHAARG0, "), TranslateTextureArg( g_wT1AArg0 ) );
    if( g_wT1AOp == D3DTOP_MULTIPLYADD || g_wT1AOp == D3DTOP_LERP )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 1, _T("RESULTARG, "), TranslateTextureArg( g_wT1RArg ) );
    if( g_wT1RArg == D3DTA_TEMP )
        strcat( strOutText, buffer );
    strcat( strOutText, _T("\015\012") );

    sprintf( buffer, strTemplate, 2, _T("COLOROP,   D3DTOP_"), TranslateTextureOp( g_wT2COp ) );
    strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 2, _T("COLORARG1, "), TranslateTextureArg( g_wT2CArg1 ) );
    if( g_wT2COp != D3DTOP_DISABLE && g_wT2COp != D3DTOP_SELECTARG2 )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 2, _T("COLORARG2, "), TranslateTextureArg( g_wT2CArg2 ) );
    if( g_wT2COp != D3DTOP_DISABLE && g_wT2COp != D3DTOP_SELECTARG1 )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 2, _T("COLORARG0, "), TranslateTextureArg( g_wT2CArg0 ) );
    if( g_wT2COp == D3DTOP_MULTIPLYADD || g_wT2COp == D3DTOP_LERP )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 2, _T("ALPHAOP,   D3DTOP_"), TranslateTextureOp( g_wT2AOp ) );
    strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 2, _T("ALPHAARG1, "), TranslateTextureArg( g_wT2AArg1 ) );
    if( g_wT2AOp != D3DTOP_DISABLE && g_wT2AOp != D3DTOP_SELECTARG2 )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 2, _T("ALPHAARG2, "), TranslateTextureArg( g_wT2AArg2 ) );
    if( g_wT2AOp != D3DTOP_DISABLE && g_wT2AOp != D3DTOP_SELECTARG1 )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 2, _T("ALPHAARG0, "), TranslateTextureArg( g_wT2AArg0 ) );
    if( g_wT2AOp == D3DTOP_MULTIPLYADD || g_wT2AOp == D3DTOP_LERP )
        strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 2, _T("RESULTARG, "), TranslateTextureArg( g_wT2RArg ) );
    if( g_wT2RArg == D3DTA_TEMP )
        strcat( strOutText, buffer );
    strcat( strOutText, _T("\015\012") );

	sprintf( buffer, strTemplate, 3, _T("COLOROP,   D3DTOP_"), TranslateTextureOp( g_wT3COp ) );
    strcat( strOutText, buffer );
    sprintf( buffer, strTemplate, 3, _T("COLORARG1, "), TranslateTextureArg( g_wT3CArg1 ) );
    if( g_wT3COp != D3DTOP_DISABLE && g_wT3COp != D3DTOP_SELECTARG2 )
//.........这里部分代码省略.........
开发者ID:jjuiddong,项目名称:Dx3D-Study,代码行数:101,代码来源:mfcform.cpp


注:本文中的CEdit::FmtLines方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。