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


C++ CString::C_String方法代码示例

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


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

示例1: DestroyWindow

bool
CMsWin32Editbox::EditboxCreate( CMsWin32Window& parent           ,
                                const CString& windowTitle       ,
                                const bool createAsMultilineEdit ,
                                const Int32 xPosition            ,
                                const Int32 yPosition            ,
                                const UInt32 width               ,
                                const UInt32 height              ,
                                const bool readOnly              )
{GUCEF_TRACE;

    if ( 0 != GetHwnd() )
    {
        DestroyWindow( GetHwnd() );
        SetHwnd( 0 );
    }

    DWORD dwStyle = 0;
    if ( readOnly )
    {
        dwStyle |= ES_READONLY;
    }
    
    if ( createAsMultilineEdit )
    {        
        dwStyle |= WS_VISIBLE|WS_CHILD|WS_BORDER|WS_VSCROLL|WS_HSCROLL|ES_MULTILINE|ES_WANTRETURN|ES_AUTOHSCROLL|ES_AUTOVSCROLL;
        
        SetHwnd( CreateWindow( "edit", 
                               windowTitle.C_String(),
                               dwStyle,
                               xPosition, yPosition, (int)width, (int)height, 
                               parent.GetHwnd(), (HMENU)this, GetCurrentModuleHandle(), (LPVOID)this ) );
    }
    else
    {        
        dwStyle |= WS_VISIBLE|WS_CHILD|WS_BORDER|ES_AUTOHSCROLL|ES_AUTOVSCROLL;
        
        SetHwnd( CreateWindow( "edit", 
                               windowTitle.C_String(),
                               dwStyle,
                               xPosition, yPosition, (int)width, (int)height, 
                               parent.GetHwnd(), (HMENU)this, GetCurrentModuleHandle(), (LPVOID)this ) );
    }

    if ( GetHwnd() != 0 )
    {
        HookWndProc();
        return true;
    }            
    return false;
}
开发者ID:LiberatorUSA,项目名称:GUCEF,代码行数:51,代码来源:gucefCORE_CMsWin32Editbox.cpp

示例2: SetName

void CBlipEntity::SetName(CString sName)
{
	if (!m_uiBlip)
		return;

	EFLC::CScript::ChangeBlipNameFromAscii(m_uiBlip, sName.C_String());
	m_sName = sName;
}
开发者ID:Disinterpreter,项目名称:IV-Network,代码行数:8,代码来源:CBlipEntity.cpp

示例3: stringBufferAccess

bool
CIniParser::LoadFrom( const CString& iniText )
{GUCEF_TRACE;

    CDynamicBuffer stringBuffer;
    stringBuffer.LinkTo( iniText.C_String(), iniText.Length() );
    CDynamicBufferAccess stringBufferAccess( &stringBuffer, false );
    return LoadFrom( stringBufferAccess );
}
开发者ID:LiberatorUSA,项目名称:GUCEF,代码行数:9,代码来源:gucefCORE_CIniParser.cpp

示例4:

bool
CButtonImp::SetButtonText( const CString& newText )
{GUCEF_TRACE;

    if ( NULL != m_button )
    {
        m_button->setCaption( newText.C_String() );
    }
    return true;
}
开发者ID:LiberatorUSA,项目名称:GUCEF,代码行数:10,代码来源:guceMyGUI_CButtonImp.cpp

示例5: LoadModuleDynamicly

void*
CSimplisticPluginLoadLogic::LoadPlugin( const CString& rootDir        ,
                                        const CString& moduleName     ,
                                        const CString& groupName      ,
                                        const TVersion* pluginVersion )
{GUCEF_TRACE;

    CString fullPluginPath = CombinePath( rootDir, moduleName );
    fullPluginPath = RelativePath( fullPluginPath );
    return LoadModuleDynamicly( fullPluginPath.C_String() );
}
开发者ID:LiberatorUSA,项目名称:GUCEF,代码行数:11,代码来源:gucefCORE_CSimplisticPluginLoadLogic.cpp

示例6:

bool
CComboboxImp::SetText( const CString& text )
{GUCE_TRACE;

    if ( NULL != m_combobox )
    {
        m_combobox->setText( text.C_String() );
        return true;
    }
    return false;
}
开发者ID:LiberatorUSA,项目名称:GUCE,代码行数:11,代码来源:guceCEGUIOgre_CComboboxImp.cpp

示例7: LogTypeAndLevelToAndroidPrio

void
CAndroidSystemLogger::LogWithoutFormatting( const TLogMsgType logMsgType ,
                                            const Int32 logLevel         ,
                                            const CString& logMessage    ,
                                            const UInt32 threadId        )
{GUCEF_TRACE;

    if ( NULL != m_logFunc )
    {
        android_LogPriority androidLogPrio = LogTypeAndLevelToAndroidPrio( logMsgType, logLevel );
        ( (TAndroidLogWriteFunc) m_logFunc )( androidLogPrio, m_tag.C_String(), logMessage.C_String() );
    }
}
开发者ID:LiberatorUSA,项目名称:GUCEF,代码行数:13,代码来源:gucefCORE_CAndroidSystemLogger.cpp

示例8: access

bool
CDStoreCodecPlugin::StoreDataTree( const CDataNode* tree   ,
                                   const CString& filename )
{GUCEF_TRACE;

    Create_Path_Directories( filename.C_String() );
    
    CFileAccess access( filename, "wb" );
    if ( access.IsValid() )
    {
        return StoreDataTree( tree     ,
                              &access  );
    }
    return false;
}
开发者ID:LiberatorUSA,项目名称:GUCEF,代码行数:15,代码来源:CDStoreCodecPlugin.cpp

示例9:

void
CX11Window::SetText( const CString& text )
{GUCEF_TRACE;

    if ( NULL != m_display && 0 != m_window )
    {
        // We use the XTextProperty structure to store the title.
        ::XTextProperty windowName;
        windowName.value    = (unsigned char*) text.C_String();
        windowName.encoding = XA_STRING;
        windowName.format   = 8;
        windowName.nitems   = text.Length();

        // Tell X to ask the window manager to set the window title.
        // X11 itself doesn't provide window title functionality.
        ::XSetWMName( m_display, m_window, &windowName );
    }
}
开发者ID:LiberatorUSA,项目名称:GUCEF,代码行数:18,代码来源:gucefCORE_CX11Window.cpp

示例10: FormatStdLogMessage

void
CAndroidSystemLogger::Log( const TLogMsgType logMsgType ,
                           const Int32 logLevel         ,
                           const CString& logMessage    ,
                           const UInt32 threadId        )
{GUCEF_TRACE;

    if ( NULL != m_logFunc )
    {
        // Just use standard GUCEF log formatting
        CString formattedLogMsg = FormatStdLogMessage( logMsgType ,
                                                       logLevel   ,
                                                       logMessage ,
                                                       threadId   );

        android_LogPriority androidLogPrio = LogTypeAndLevelToAndroidPrio( logMsgType, logLevel );
        ( (TAndroidLogWriteFunc) m_logFunc )( androidLogPrio, m_tag.C_String(), formattedLogMsg.C_String() );
    }
}
开发者ID:LiberatorUSA,项目名称:GUCEF,代码行数:19,代码来源:gucefCORE_CAndroidSystemLogger.cpp

示例11: SetWindowText

void
CMsWin32Editbox::SetText( const CString& text )
{
    SetWindowText( GetHwnd(), text.C_String() );
}
开发者ID:LiberatorUSA,项目名称:GUCEF,代码行数:5,代码来源:gucefCORE_CMsWin32Editbox.cpp


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