zoukankan      html  css  js  c++  java
  • 文本--->多字节

    在 led屏幕的软件中的程序:

    CString strTextContent;
    m_RichEdit.GetWindowText(strTextContent);//获取文本内容
    DWORD dwNum = WideCharToMultiByte(CP_OEMCP,NULL,strTextContent,-1,NULL,NULL,0,NULL);//文本字符转成多字节,返 
    回字节数.
    char *TextContent = new char[dwNum];//创建文本内容 字符数组
    WideCharToMultiByte(CP_OEMCP,NULL,strTextContent,-1,TextContent,dwNum,0,NULL);//字符转字节: 将TextContent保 
    存到TextContent中.

    多字符  ---》多字节  数据的转换。    文本--->字节 

    发现自己的不足,善于利用找到的方法去扬长避短。行动起来。
  • 相关阅读:
    1
    vim配置
    pyspark
    添加底部小火箭+目录
    00
    博客园代码高亮设置
    01. 枚举类型
    01. 授权问题
    Android Studio打包签名全过程
    linux 阿里云源地址
  • 原文地址:https://www.cnblogs.com/rechen/p/5076191.html
Copyright © 2011-2022 走看看