Sample Client, TCP-Socket
Hi,I have to implement a client in an existing C++/MFC application and send XML telegrams. Do you have a sample code. If no response is received within 2 seconds, error message.<ROOT>...
View ArticleCreateFileMapping; possible memory leak?
My program uses CreateFileMapping so multiple processes can access a common data base. The program runs fine and produces the correct answers. But when all is finished, sometimes the Windows OS has...
View Articlestat() fails if path has a trailing backslash
Hi!I have a directory "C:\stageroot".If I pass filename to stat() as follows, stat() returns non-zero exit code.filename = "C:\\stageroot" stat(filename, &sb); However if filename has a trailing...
View ArticleGetClassName buffer length
How can I find out length of string of WindowClassName ? I need it because I want to use GetClassName function and it need buffer with specified length.
View ArticleHow to handle the situation where shared data (shared memory) using raw...
Hello All,Could someone please help me, how to handle the situation where the same shared data (shared memory) using raw pointers being used in two separate threads?Below is the code snippet and the...
View ArticleVisual Studio MFC dialog application , Press ESC to exit app
I created a dialog application in Visual Studio MFC.I run the exe file and press "ESC" , the app will be closed.Any way to don't close app when user press "ESC"?
View ArticleSimple (I hope) c++ question - cout an object of a user defined class
I am not sure if this is the right forum for this question but it is the nearest that I have been able to find.This code was adapted from code supplied in the book c++ for dummies. I would like to be...
View ArticleVisual Studio MFC dialog application , Press button to clicked
I created a dialog application in Visual Studio MFC. I create BN_CLICKED function to enable IDC_CHECK1. Icreate DOUBLECLICKED function to other functoin.When i call DOUBLECLICKED function will call...
View ArticleC++20 chrono is_clock addition missing
I recently discovered the existence of is_clock in the chrono library, and according to cppreference it's a C++20 feature. Unfortunately I can't link it at the moment since my account is not verified...
View ArticleVisual Studio MFC dialog application. There are duplicate IDs in resource.h
I created a dialog application in Visual Studio MFC. I copy some button and edittext from A.rc to B.rc in resource view. B.rc -> There are duplicate IDs in resource.h Any good way to sort out IDs...
View ArticleGetting weird WLAN_AVAILABLE_NETWORK_FLAGS value from...
I am working on software that is supposed to check a wireless network connection to a DSLR camera. When I call WlanGetAvailableNetworkList(), the entry for my local wifi network looks fine. (dwFlags =...
View ArticleVisual Studio MFC dialog application. CListCtrl function
I created a dialog application in Visual Studio MFC.I use CListCtrl to list some date. (Item and Content)I don't change any code in CListCtrl's cpp and h files but CListCtrl color was from gray to...
View ArticleHow to get Unicode output from cl.exe?
Hello,I have a code that runs "cl.exe" by CreateProcess. Then I parse the output from "cl.exe". All works fine with English characters. But if output contains non-English characters, I get "???????"...
View ArticleMIssing C/C++ option under property pages - configuration properties
Visual Studio PRO 2005I can not find the C/C++ option in the Property Pages window under Configuration Properties.My list goes General, Debugging, Linker, Manifest Tool, etc...I am trying to set up...
View ArticleVisual Studio MFC dialog application. CListCtrl sort function
I created a dialog application in Visual Studio MFC. I use CListCtrl to list some data. Any way to sort List1 or List2 when i press List1 or List2? For example: List1(Name) List2(Birthday) Bill...
View ArticleException for Custom Memset function with Large array to set value.
I have written a custom Memset function instead of using the one provided by compiler itself. I'm don't see any issue when initializing an array with smaller length but while initializing for larger...
View Article.lib is not a valid Win32 application - Visual Studio 2017
My program is not running due to this error which pops up. I tried building and cleaning my solution but it still does work. I am working in visual studio c++ and have created a static link library...
View Articlemultiple keyboard events on single key
Running the code below and pressing a key once results in two separate keyboard events with the output being1 1Kindly advise Thank You Cheerios#include <iostream> #include <cassert>...
View ArticleSendMessage for keystroke is not working
Hi all could you please tell me why this code does not work? It should simulate the pression of TAB and then arrow DOWN, but nothing happens. I´m sure I have the right handle to the window, because I...
View ArticleIn a DLL why should a wstring pointer not work?
Hello,MyFunc() does not build and MyFunc1() builds and works. I get the following error for MyFunc(): error LNK2019: unresolved external symbol _invalid_parameter referenced in function "void * __cdecl...
View Article