码迷,mamicode.com
首页 >  
搜索关键字:tchar    ( 2435个结果
hello-win程序入门win32基本窗口框架全解析
在VC++6.0环境中创建win32程序 选择第三个这时可以运行看到hello world了。 程序解析: #define MAX_LOADSTRING 100  \\定义最大字长 HINSTANCE hInst; \\当前进程资源的句柄 TCHAR szTitle[MAX_LOADSTRING];   \\窗口上方显示的标题 TCHAR szWind...
分类:Windows程序   时间:2015-07-24 12:52:27    阅读次数:189
[C++] zlatlcv: ATL字符串转换辅助库。能很方便的将UTF-8字符串转为TCHAR等字符串
作者:zyl910如今,UTF-8字符串的使用频率越来越多了。但是在VC中,不能直接处理UTF-8字符串,得专门去写UTF-8与窄字符串、宽字符串、TCHAR字符串相互转换的代码。不仅费时费力,而且稍不留心就容易造成内存泄露问题。于是我便想专门编写个库来解决UTF-8字符串编码问题。特性——支持 T...
分类:编程语言   时间:2015-07-23 23:24:12    阅读次数:197
HELLOWIN程式---HELLOWIN.C
#include LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { static TCHAR szAppName[] = TEXT("Hel...
分类:Windows程序   时间:2015-07-23 22:02:24    阅读次数:179
windows c++ 流读取文件长度 ios::in ios::binary
问题描述: 当用ios::in模式打开文件时,使用seekg和tellg读取文件的长度,将读取文件内容输出到控制台,发现乱码。 1 int _tmain(int argc, _TCHAR* argv[]) 2 { 3 using namespace std; 4 ifstream ...
分类:移动开发   时间:2015-07-23 15:23:09    阅读次数:219
OpenCV imread读取图片,imshow展示图片,出现cv:Exception at memory location异常
问题如上。环境:VS2013。代码如下:#include "stdafx.h"#include "opencv2\opencv.hpp"using namespace cv;int _tmain(int argc,_TCHAR* argv[]){ Mat image=imread("read1...
分类:其他好文   时间:2015-07-18 09:35:25    阅读次数:398
同时读入几幅图像
int _tmain(int argc, _TCHAR* argv[]){/************************************** ******用文件名打开********************************************/FILE *fp= 0; str...
分类:其他好文   时间:2015-07-15 22:36:28    阅读次数:228
字符串操作
字符串反转 #include "stdafx.h" #include using namespace std; char*reverse_str(char*str); int _tmain(int argc, _TCHAR* argv[]) { char*str = "abcdefgh"; char*dst = reverse_str(str); cout << dst << ...
分类:其他好文   时间:2015-07-12 12:45:18    阅读次数:124
Windows API 弹出文本框输入的内容
1 /*程序功能:点击button按钮弹出输入框的文本*/ 2 #include 3 4 struct 5 { 6 int iStyle; 7 TCHAR * szText; 8 } 9 button[]= 10 { 11 BS_PUSHBUTTON,...
分类:Windows程序   时间:2015-07-03 00:06:33    阅读次数:935
探究VC下的_T(""),发现:双字节字符/多字节字符是以小端存储的(至少是在VC2013环境下)
从VC6.0过渡到VS2013的程序员应该都会对字符的表现形式感到困惑,每每都要使用_T(""),才能如愿地显示字符。 其实_T("")是一个宏,起一个兼容的作用,使编译器采用默认的字符集形式(Ansi或Unicode)编译字符串。 在VC2013的 tchar.h 文件中,我提取出了部分代码,如下: {CSDN:CODE:717236} 这部分代码非常直观,当采用Unicod...
分类:其他好文   时间:2015-06-26 09:19:34    阅读次数:157
luabind 导出string问题
luabind导出字符串 不能导出char* 会有问题 应该是字符串连接的时候出错了 static _TCHAR* pRetChar = new _TCHAR[10]; memcpy(pRetChar,szName,10); return NetE::wtoutf8(pRetChar); //WC....
分类:其他好文   时间:2015-06-24 18:25:28    阅读次数:110
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!