Excel Automation Headaches
1, using vs2019 1. have ms office pro plus 2019 have googled many excel automation articles but they all fail by either: 1. not compiling 2. compiling but not working 3. not allowing one to get to...
View ArticleIdentifier is undefined - why?
Using CppCLR_Winforms App (extension by Kaiser ) on Win10 { // `Trying this code in the frmMain btnAddAccount_Click event: // I have in this project a frmAddAccount.h file // And have modified it in...
View ArticleProblem with function rename()
Hello to all. I'm new in this forum. I'm writing a simple function (using MFC) that open a folder, write in a file .txt and rename the folder. This is the code snippet: Code: CString s, s1, s2;...
View ArticleRemoving the duplicates in the multiset (bit urgent)
Hello, I have the following map. I changed the set to multiset, as I need to store, the cell, even if the distance is the same. Code: struct TACNeighbourData { int m_CellKey; double...
View Articlestl find_if iterator type
Hello, It is strage that that find_if for the vector returns normal iterator, but when i replace it with the set , it return const iterator. Basically, i wanted to change the content of the iterator...
View ArticleMFC CListCtrl change checkbox color
Hi dear guru!!! I need your help!!! I'm trying to find a way to change background color of checkbox inside CListCtrl, please help me to find a working solution. Maye there is some way to work with...
View ArticleHow to generate a condition (true or false) based on possibilities?
Hello! 10 years into programming and I never ever had to use possibilities in conditional statements. Right now, I'm making a video game and I want my enemy to choose how to roam in the map based on...
View ArticleReopen the Dialog.
Hi, As per discussion one month back, I tried to create the MFC dialog from the existing one. But now when trying to test various scenarios, i am facing the issue. Actually, the dialog is created and...
View ArticleCan't change CTreeCtrl item image
Hi to everyone!!! Help me to change CTreeCtrl image on the fly. I add the image to the imagelist like this: Code: HICON hChecked, hUnChecked; // Set up the image list....
View Articlefind if any duplicates within the struct in a vector
Hello, I have a vector of structs (or classes): std::vector<ConfigData>& vecConfigData; Code: class ConfigData { public: protected: CString m_strRegionName; int...
View ArticleConfused about /bigobj
I'm updating a program which previously got compiled with VC2005 (I'm compiling it now with VC2019). One of the source modules was fine with VS2005 but it gives me this compiler error with VS2019:-...
View ArticlePointer to a template function ?
Is it possible to create a pointer to a template function - e.g. if I had a std::list of ints and I wanted a pointer to its "unique" member :- Code: void (*pfn)(void) =...
View ArticleCompiler error 3848
I'm updating some code that previously built okay with VS2005:- Code: struct id_compare { bool operator()(const boost::shared_ptr<Playlist>& p1, const...
View ArticleHi i need to find a solution for this question
In the following questions, the set of input data is based on 1171234 The set of numbers you will extract is as follows: N1 = 1st digit; N2 up to N7 = the set of pairs in the number above; N8 = the...
View ArticleNot sure what the best way to handle this task is.
I have a problem I am attempting to handle. What I have is a 6 Boolean's and I need to check the state of each of those against their current value in another method, and if any of them are different...
View ArticleConvert Object Properties to Array
Code: public class myObj { public string ob1 { get; set; } public string ob2 { get; set; } } List<myObj> objlist = new List<myObj>(); objlist.Add(new myObj { ob1 =...
View ArticleCopy textbox data to a string
// I have a textBox and would like to copy its contents // into a string called myColor string myColor= "BLUE"; // OK works as expected textBoxColor->Text = "BLUE"; // OK The textbox accepts a...
View Articlecompile error
Hello, With the following code: Code: auto it = std::find_if(rLTENodes.begin(), rLTENodes.end(), [&cm=strCentralSite](const const MultiTechNode * m)->bool {return cm == m->GetID();});...
View Articlehelp with the following code
Hello, Code: std::map<int, std::multiset<TACNeighbourData> >::iterator found = m_SiteKeyToNeighbourKeys.find(nTopParentKey);...
View Article:: operator new()
I just came across this code in a template class:- Code: pointer allocate (size_type n, void* hint = 0) { if ((pointer)&_buf + stack_capacity >= _ptr + n) {...
View Article