visual-c++

C++ check if unicode character is full width

喜你入骨 提交于 2021-01-27 03:53:26
问题 How to check if a unicode character is full width? I use Win32 / MFC For example, 中 is full width, A is not full width, F is full width, F is not full width. 回答1: What you need is to retrieve the East Asian Width of the character. You can do it by parsing the EastAsianWidth.txt file from the Unicode Character Database. I could not find a Win32 API that returns this info, but in Python, for example, you can use unicodedata.east_asian_width(unichr). See the Annex #11 for the background of the

Where do I input DLL dependencies in Visual Studio C++ project?

可紊 提交于 2021-01-27 03:51:04
问题 I am converting some Qt project files (.pro) that run on Linux and Mac into Visual Studio project files (.vcproj) The Qt Visual Studio add-in converted everything fine except the DLL dependencies. Where do I put these in Visual Studio 2008? If I put the DLLs in Configuration Properties > Linker > Input > Additional Dependencies, I get: fatal error LNK1107: invalid or corrupt file: cannot read at 0xABC Where do dynamically-linked dependencies go? 回答1: You might want to check what’s the

C++ check if unicode character is full width

爷,独闯天下 提交于 2021-01-27 03:50:38
问题 How to check if a unicode character is full width? I use Win32 / MFC For example, 中 is full width, A is not full width, F is full width, F is not full width. 回答1: What you need is to retrieve the East Asian Width of the character. You can do it by parsing the EastAsianWidth.txt file from the Unicode Character Database. I could not find a Win32 API that returns this info, but in Python, for example, you can use unicodedata.east_asian_width(unichr). See the Annex #11 for the background of the

embed window(glfwCreateWindow) as child to C++ MFC parent form

六眼飞鱼酱① 提交于 2021-01-24 12:24:37
问题 Please refer this link Embedding a GLFW window inside windows forms How can the same achieved by using VC++ to embed glfw window to Parent form? 回答1: Try this: Call glfwWindowHint() to set GLFW_DECORATED and GLFW_VISIBLE to false . Call glfwCreateWindow() . Call glfwGetWin32Window() to get the native handle of the OpenGL window. Call SetParent() to set your form as the new parent of the OpenGL window. Call GetWindowLong() / SetWindowLong() to remove the WS_POPUP and add the WS_CHILDWINDOW

Postgresql connectors using VC++

☆樱花仙子☆ 提交于 2021-01-24 11:19:54
问题 How to add Libpqxx library in visual c++ .I googled it from past 2 days not able to get solution for the same I have downloaded and added libpqxx-4.0 but not able to add in visual studio can any give proper solution for this. Thanks in advance 回答1: As it’s my first contribution I will take the time to answer this regardless of the limited information provided by Raveendra konda. Maybe it will be of assistance to someone new to libpqxx. At the time of writing we are on libpqxx 7.0.7. I will

Force to use integrated (Intel) graphic card on Microsoft Hybrid system

廉价感情. 提交于 2021-01-21 10:50:13
问题 I use Microsoft Desktop Duplication API and if my code runs on the Integrated (Intel) graphic card then everything works fine. But if I run on the dedicated card, I get an error. I found that Microsoft does not support this usage on a dedicated card on Microsoft Hybrid system DXGI_ERROR_UNSUPPORTED Similar questions without solution for my needs: DirectX11 Desktop duplication not working with NVIDIA Desktop Duplication API & switchable graphics The workaround is to launch the program on the

Force to use integrated (Intel) graphic card on Microsoft Hybrid system

本秂侑毒 提交于 2021-01-21 10:49:26
问题 I use Microsoft Desktop Duplication API and if my code runs on the Integrated (Intel) graphic card then everything works fine. But if I run on the dedicated card, I get an error. I found that Microsoft does not support this usage on a dedicated card on Microsoft Hybrid system DXGI_ERROR_UNSUPPORTED Similar questions without solution for my needs: DirectX11 Desktop duplication not working with NVIDIA Desktop Duplication API & switchable graphics The workaround is to launch the program on the

Force to use integrated (Intel) graphic card on Microsoft Hybrid system

不问归期 提交于 2021-01-21 10:48:08
问题 I use Microsoft Desktop Duplication API and if my code runs on the Integrated (Intel) graphic card then everything works fine. But if I run on the dedicated card, I get an error. I found that Microsoft does not support this usage on a dedicated card on Microsoft Hybrid system DXGI_ERROR_UNSUPPORTED Similar questions without solution for my needs: DirectX11 Desktop duplication not working with NVIDIA Desktop Duplication API & switchable graphics The workaround is to launch the program on the

Visual C++ Expression must have a constant value

戏子无情 提交于 2021-01-20 06:56:41
问题 Does anyone know why Visual Studio is the only compiler to giving me this error - Expression must have a constant value (referring to size). #include <iostream> #include <cstring> using std::cout; using std::endl; int main() { const char Ca3[] = { "Hello" }; const char Ca4[] = { "World" }; const size_t size = strlen(Ca3) + strlen(Ca4) + 2; char bigString[size]; strcpy(bigString, Ca3); strcat(bigString, " "); strcat(bigString, Ca4); cout << bigString << endl; system("PAUSE"); return 0; } 回答1:

funny looking comments - c++

此生再无相见时 提交于 2021-01-19 22:41:50
问题 when i read through source files of opensource projects i often come across some weird phrases in the comments /* @brief ...... @usage..... @remarks.... @par.... */ questions 1.What are they?(were not mentioned when i was learning c++) 2.Do they have any documentation(where) 回答1: They are just comments and as such have no special meaning in C++. They are probably to allow a documentation generator (For example Doxygen) to extract the data from the comments. 回答2: Those are for some flavour of