lpcwstr

    0热度

    2回答

    的参数不兼容 问题是&cursorTile.Attributes. 我越来越被(argument of type "WORD*" is incompatible with parameter of type "LPCWSTR") 我试图找到一些解决办法,我用的多字节字符集的错误。 void CMap::Draw(){ SMALL_RECT drawRect = { 0, 0, MAP_WIDTH

    -3热度

    1回答

    的参数不符我得到这个错误: argument of type "char *" is incompatible with parameter of type "LPCWSTR" 这里是我的代码 void score(void) { char s[128]; sprintf_s(s, "Thread War! Hits:%d Misses:%d", hit, miss);

    1热度

    1回答

    我只是试图根据一个字符串来获取模块信息,这个字符串可以很像“somefile.exe”。 MODULEINFO GetModuleInfo(char *szModule) { MODULEINFO modinfo = {0}; HMODULE hModule = GetModuleHandle(szModule); if(hModule == 0) re

    3热度

    1回答

    我在WINAPI一个初学者,我想转换wstringstream到LPCWSTR这样的(内部WM_PAINT): wstringstream ws; ws << "my text" << endl; LPCWSTR myWindowOutput = ws.str().c_str(); hdc = BeginPaint(hWnd, &ps); TextOut(hdc, 150, 305, my

    0热度

    1回答

    我试着在case语句中定义一个wstring。并且试图从case语句中访问该变量将返回超出范围。 所以我现在试图在switch()之外声明一个wstring并在switch()中定义它。 但我不知道如何区分这些事件。 wstring w1; switch (suit) { case 0: std::w1(stringOne); bre

    1热度

    5回答

    的错误,我在Visual Studio 2015年创建了一个基本的Windows C++应用程序,我有几个误区: #include <windows.h> #include <stdlib.h> #include <string.h> #include <tchar.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevIns

    0热度

    1回答

    我试图建立一个程序,它可以创建一个新的目录每次被用来填充数据的时间。我希望文件夹的名称是它创建时的时间戳。我已经写了一个函数来创建时间戳并将其作为字符串返回。 string timestamp() { //create a timecode specific folder // current date/time based on current system time_t now = t

    0热度

    1回答

    SetTextColor(hdc, RGB(0, 0, 0)); char str[20]=""; sprintf(str, "sorce: %d", sorce); TextOut(hdc, 930, 810, str,strlen(str)); 它显示了char *不能转换为LPCWSTR的错误。我该如何解决它?

    2热度

    3回答

    我正在创建一个LPCWSTR的动态数组,并且希望在运行时分配值。 我有以下代码: cin>>count LPCWSTR * lpwcstrArray = new LPCWSTR[count](); for (int i = 0; i < count; i++) { // some logic to create different wstring on each iteratio

    1热度

    1回答

    我正在为所有字符串类型使用LPCWSTR的库编写CGO绑定。我如何从C.LPCWSTR转换为string,反之亦然?