C++, MFC Version 6, ComboBox - Font
Hello! I need to modify an old application. The ComboBox should get the Courier font. How can I achieve this? The developer at the time used it at runtime to create the combobox. Can anyone give me some tips? Is not easy, I know. I have googled without…
When this call AddPackageByUriAsync could fail?
Hi, I am trying to create an application in the mode of 'package with external location'. Now if we go via this mode, we need to fetch the package identity during runtime, right? So, the API that has been provided is AddPackageByUriAsync . I am…
InternetSetOption not work on windows 10 2004
static BOOL SetSystemProxyPacUrl( wchar_t* proxy_full_addr) { INTERNET_PER_CONN_OPTION_LISTW list; BOOL bReturn; DWORD dwBufSize = sizeof(list); // Fill out list struct. list.dwSize = sizeof(list); // Set three options. …
Runtime Dynamic linking a Dll for a class defined in dll
Hi, I am trying to export a class defined in dll. After following msdn example for exporting a "function" in dll, i compiled and used that code but so far i am clueless about how to export a class defined in dll. Kindly tell me how we can…
Need help with writing progress bar dialog, with smooth marquee, on one thread
Hi - my Win32, MFC, Visual C++ application frequently has to perform operations which can take a long time. I want the user to be able to see a progress dialog with a marquee and a Cancel button while these are happening. I would like the marquee to…
Would calling RIOReceive() on a closed socket potentially cause a crash?
Hello, I would like to inquire about a crash that occurred when calling the RIOReceive() function. Please understand that the sentences may be strange because I used a translator. What happens is that thread A performs closesocket(sock) on the previously…
Porting DirectX 9 to latest version
Iam porting an existing project with DirectX 9, Is DirectX 11 or 12 should be considered for this subject Kindly advice.
Return/Enter
I have made a small windows program that saves names to a text file. Everything works with a button, but how can the names be registered if you just want to press Return/Enter after writing the names? The code is: #include <windows.h> #include…
"Unresolved external "int __cdecl invoke_main(void)" after VS2017 15.6.1 update" -- Part 2
I am porting a number of mature Win32 apps developed using VS 2015 under Windows 7 Professional to be built using VS 2019 under Windows 10 . Some edits to the original source and heading files are necessary to accommodate VS 2019 idiosyncrasies. I have…
Select MSVC build tools version with Visual Studio's CMake / CMakeSettings.json
Hi, I'm using Visual Studio's C++ CMake functionality, i.e. "File -> Open -> CMakeLists.txt". I'm on the latest VS 2022 17.9.5. I'd like to specify an exact MSVC build tools version to use, for example MSVC 14.29, 14.30 or 14.39…
Why does Microsoft's code examples have errors, and how do I fix these?
The code examples on this page all seem to have errors, some of which I don't have a clue how to fix. How do I fix the following: code: hResult = StringCchLength(pmyitem->psz, STRSAFE_MAX_CCH, pcch); error: argument of type "LPSTR"is…
C++ RealTimeStylus is dead and doesn't handle any touch messages
After some testing, I found that the RTS touch library on win7sp1 systems has a probability of triggering an error: RealTimeStylus does not trigger, i.e. it does not trigger the touch callback class even if there is a touch point that has been pressed on…
Why PackageManager.FindPackagesForUser method not fetching all the store app details
I'm attempting to retrieve details of installed Store apps on the machine using the PackageManager class in C++/WinRT. However, I'm encountering an issue where I only receive a partial result. For example, if there are 20 Store apps installed, only 10…
How to cancel the "print preview" option in the printer preferences by coding?
I want to cancel the "print preview" option in the printer preferences by coding, maybe can use c++ windows api or C#. Then how to do it ? Thank you !
C++/CLI dll could not be loaded in WinUI3 app
When I called (i.e. instanciated) my class object (e.g. MyTest) which is declared as a managed class in my C++/CLI dll, I saw the following error: System.IO.FileNotFoundException: 'Could not load file or assembly <MyTest>' I am sure that the…
Accessing Resources in the project as a file or binary object
I am writing a C++ application that has a few binary files that it uses as resources. I have added those files to my Project's Resource Files. I need now to be able to open the file as a binary stream and read it. (it's a lbm image file) When I…
Disable windows shortcuts for high contrast and mouse keys
I need to block keyboard shortcuts "alt + shift + prtscr" and "alt + shift + numlk". How to do it with LL Keyboard hook? Help much appreciated !
cant run a different main function in c++
Hello, i have a project with 2 cpp files, the c++.cpp file and the ciclos.cpp file, c++.cpp file has a main function and ciclos.cpp file has another main function named main_2, im trying to run main_2 function in the ciclos.cpp file but visual studio…
How to add function in C++, Visual Studio Community 2022
How to add function in C++, Visual Studio Community 2022. System: Windows 11 Home
Visual C++ 2012 is out of support, but is required for Exchange 2016 - how can we remove it and still run exchange?
Visual C++ 2012 is out of support, but is required for Exchange 2016 - how can we remove it and still run exchange? We are required to uninstall any software that is no longer in support but still need to use Exchange 2016 which requires C++ 2012 - now…