如何将textbox文本属性读入unsigned char数组 [英] How to read textbox text property into an unsigned char array

查看:113
本文介绍了如何将textbox文本属性读入unsigned char数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图弄清楚如何将文本框文本属性的内容放入unsigned char数组中。我一直在通过谷歌研究这个问题,但遗憾的是没有任何成功。


我终于成功地将unsigned char数组转换为可以写入标签文本属性的字符串但无法弄清楚如何反向。


我编写的成功代码将unsigned char数组写入标签控件文本属性是......

I am trying to figure out how to get the contents of a textbox text property into an unsigned char array. I have been researching this via google for a few days without any success unfortunately.

I was finally successful at converting an unsigned char array to a string that can be written to a label text property but cannot figure out how to do the reverse.

The successful code I wrote that writes the unsigned char array to a label control text property is...

展开 | 选择 | Wrap | 行号

推荐答案

您能否使用确切的错误?


此外,我看到了你用的是关键字const(这是好的),但是,请确保并仔细检查你不要谬误地使用它。
Can you give use the exact error?

Also, I see you use the keyword const (which is good), however, just be sure and double check you don''t use it fallaciously.


我没有使用reinterpret_cast的第一次尝试不起作用,几乎正如所料。我使用sprintf,就像我在某个地方发现的那样。我也尝试过其他一些方法。同样,我不知道如何使用reinterpret_cast来处理它。
My first attempt without using reinterpret_cast didn''t work, pretty much as expected. I used sprintf as I found in a thread somewhere. I have tried a few other approaches as well. Again, I''m not sure how to approach it with reinterpret_cast.
展开 | 选择 | Wrap | 行号


这可能听起来很邋,,但试试吧以下:

This may sound sleazy, but try the following:

展开 | 选择 | Wrap | 行号


这篇关于如何将textbox文本属性读入unsigned char数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆