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


C++ CStr::Chr方法代码示例

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


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

示例1: RegisterUserInfos

// -----------------------------------------------------------------------
// Register user infos in main ini file
void RegisterUserInfos(void)
{
    IniWriteKey("UserInfos", "CompanyName", StringReplace(TmpPrj_CompanyName, TmpPrj_CompanyName.Chr(13) + TmpPrj_CompanyName.Chr(10), TmpPrj_CompanyName.Chr(2), 1, -1, Binary_Compare), MainIniFile);
    IniWriteKey("UserInfos", "LegalCopyRight", StringReplace(TmpPrj_LegalCopyRight, TmpPrj_LegalCopyRight.Chr(13) + TmpPrj_LegalCopyRight.Chr(10), TmpPrj_LegalCopyRight.Chr(2), 1, -1, Binary_Compare), MainIniFile);
    IniWriteKey("UserInfos", "LegalTrademarks", StringReplace(TmpPrj_LegalTrademarks, TmpPrj_LegalTrademarks.Chr(13) + TmpPrj_LegalTrademarks.Chr(10), TmpPrj_LegalTrademarks.Chr(2), 1, -1, Binary_Compare), MainIniFile);
    MiscMsgBox(hMDIform.hWnd, "User infos registered.", MB_INFORMATION, Requesters);
}
开发者ID:GaoHongchen,项目名称:chromatic,代码行数:9,代码来源:Dlg_PrjProps.cpp

示例2: DisplayDefForm

// -----------------------------------------------------------------------
// Display the form
void DisplayDefForm(CStr DefFile)
{
    DllDefFile = DefFile;
    RealProcList = GetModulesProc();
    DllDefArray = StringSplit(RealProcList, RealProcList.Chr(2));
    CreateModalDialog(-1, -1, 342, 295, hMDIform.hWnd, &FRMDllDef, WS_BORDER | WS_CAPTION | WS_SYSMENU, 1);
}
开发者ID:GaoHongchen,项目名称:chromatic,代码行数:9,代码来源:Dlg_DllDef.cpp

示例3: PropSelectFont

// -----------------------------------------------------------------------
// Select a font
void PropSelectFont(void)
{
    CStr FName;
    CStr BufString;
    long FSize = 0;
    HDC NextDC = 0;
    int i = 0;

    // Note: Font name must always be followed by font size
    if(strlen((char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex + 1, PROPERTY_STORAGE)) != 0)
    {
        FSize = atol((char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex + 1, PROPERTY_STORAGE));
    }
    ControlEnable(FRMDiagToolhwnd, 0);
    ControlEnable(FRMDiagTBhwnd, 0);
    ControlEnable(FRMDiagPropshwnd, 0);
    if(ComDlgChooseFont(FRMDiaghwnd, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE), FSize, 0) != 0)
    {
        for(i = 0; i <= LF_FACESIZE - 1; i++)
        {
            if(MyLogFont.lfFaceName[i] == 0) break;
            FName = FName + FName.Chr(MyLogFont.lfFaceName[i]);
        }
        if(FName.Len() != 0)
        {
            BufString = MyFont.iPointSize / 10;
            SetPropertyDatas(hCurrentObject, CurrentEditControlIndex + 1, PROPERTY_STORAGE, (long) BufString.Get_String());
            SetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE, (long) FName.Get_String());
            ControlSetText(CurrentEditControlSubEdit, FName);
            // Set size
            NextDC = GetDC(hPropListbox);
            GDIWriteClippedText(NextDC, PropCurrentLeft + 1, PropCurrentTop + 1, PropCurrentWidth - 1, PropCurrentHeight, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex + 1, PROPERTY_STORAGE), GetSysColor(COLOR_WINDOWTEXT), WASerifFont, 0, GetSysColor(COLOR_WINDOW));
            ReleaseDC(hPropListbox, NextDC);
            if(GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_ROUTINE) != 0) JumpToAddr((FARPROC) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_ROUTINE));
        }
    }
    ControlEnable(FRMDiagToolhwnd, 1);
    ControlEnable(FRMDiagTBhwnd, 1);
    ControlEnable(FRMDiagPropshwnd, 1);
}
开发者ID:GaoHongchen,项目名称:chromatic,代码行数:42,代码来源:Dlg_UserDialogsProps.cpp

示例4: LoadUserInfos

// -----------------------------------------------------------------------
// Load user infos from main ini file
void LoadUserInfos(void)
{
    TmpPrj_CompanyName = StringReplace(IniReadKey("UserInfos", "CompanyName", MainIniFile), TmpPrj_CompanyName.Chr(2), TmpPrj_CompanyName.Chr(13) + TmpPrj_CompanyName.Chr(10), 1, -1, Binary_Compare);
    TmpPrj_LegalCopyRight = StringReplace(IniReadKey("UserInfos", "LegalCopyRight", MainIniFile), TmpPrj_LegalCopyRight.Chr(2), TmpPrj_LegalCopyRight.Chr(13) + TmpPrj_LegalCopyRight.Chr(10), 1, -1, Binary_Compare);
    TmpPrj_LegalTrademarks = StringReplace(IniReadKey("UserInfos", "LegalTrademarks", MainIniFile), TmpPrj_LegalTrademarks.Chr(2), TmpPrj_LegalTrademarks.Chr(13) + TmpPrj_LegalTrademarks.Chr(10), 1, -1, Binary_Compare);
}
开发者ID:GaoHongchen,项目名称:chromatic,代码行数:8,代码来源:Dlg_PrjProps.cpp


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