Click here to Skip to main content
15,901,284 members

Comments by WENzER (Top 6 by date)

WENzER 3-Feb-17 3:45am View    
What you did not understand?
WENzER 14-Jan-16 7:22am View    
I think the issue is with thicker border in Visual Studio 2013 which is clipping the controls. Any idea how to resolve this?
WENzER 14-Jan-16 6:46am View    
Ok,Its an legacy application and control code is written in an RC file *.dlg file code written something like :


INITAPP DIALOG 96, 98, 167, 67
STYLE WS_POPUP | WS_CAPTION
CAPTION "XYZ"
BEGIN
CONTROL "", INIT_FRAME, "static", SS_BLACKFRAME | WS_CHILD, 4, 4, 156, 56
CONTROL "", INIT_LINE1_STATIC, "static", SS_LEFT | WS_CHILD, 8, 14, 127, 8
CONTROL "", INIT_LINE2_STATIC, "static", SS_LEFT | WS_CHILD, 8, 38, 127, 8
CONTROL "", INIT_ICON, "STATIC", SS_ICON | WS_CHILD | WS_VISIBLE, 140, 8, 13, 13
END
WENzER 14-Jan-16 6:09am View    
The code is same nothing changed from VS2010 it is working fine with VS2010. But the same code when am building on VS2013 the WIN32 controls are getting clipped as shown in images. I thought it may be related to DPI settings so when I changed the DPI settings of my monitor to 125 it looked better but not as VS2010. Then I build the code by changing VS2013 Project Manifest Property to High DPI Aware. but that also did not work.
WENzER 31-Jul-14 0:58am View    
When am passing my vectors in the EvaluateLevel my code is crashing.

Here's my code:
int EvaluateLevel (int idx,
const vector<string>& names,
const vector<string>& managers,
vector<int>& levels)
{
if (managers[idx].empty())
{
levels[idx] = 0;
return 0;
}
if (levels[idx] != -1)
return levels[idx];

// find the index of the manager
string manager = managers[idx];
int managersIdx = -1;
for (int i = 0; i < names.size(); ++i)
if (names[i] == manager)
{
managersIdx = i;
break;
}
// or better use std::find instead of the above loop if you are familiar
// enough with STL

// assign the manager's level + 1
if (managersIdx = -1)
return -1; // not found; error in input data
int managersLevel = EvaluateLevel (managersIdx, names, managers, levels);
if (managersLevel < 0)
return -1; // recursive call returned an error
levels[idx] = managersLevel + 1;
return levels[idx];
}
int main()
{
const int size =2;
string text[size] ;
vector<std::string> EmpName;
vector<std::string> MgrName;
vector<int> level;
cout << "Enput the Strings" << endl;

for(int m =0 ;m<size;m++) {="" cin="">> text[m];
}

for(int n =0;n<size;n++) {="" std::vector<std::string=""> words;
std::string::size_type beg = 0, end;
do
{
end = text[n].find(',', beg);
if (end == std::string::npos)
{
end = text[n].size();
}
words.emplace_back(text[n].substr(beg, end - beg));
beg = end + 1;
} while (beg < text[n].size());



EmpName.push_back(words[0]);
MgrName.push_back(words[2]);


}



EvaluateLevel(size,EmpName,MgrName,level);

cin.get();

}