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,反之亦然?