|
Hi
I just re-did my project moved things around got rid of some things i didn't
need everything works fine except for compiling my resource script
got rc2188
below is the output from the resource compiler
thanks in advance
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include/atlconv.h(22) : error RC2188: C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include/atlalloc.h(629) : error RC2188: C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include/atlstr.h(16) : error RC2188: C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include/atlbase.h(59) : error RC2188: C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include/afx.h(15) : error RC2188: C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include/afxver_.h(81) : error RC2188: C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include/afxver_.h(85) : error RC2188: C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include/afxv_w32.h(16) : error RC2188: C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include/afxver_.h(348) : warning RC4005: 'AFX_DATA' : redefinition
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include/afx.h(255) : warning RC4005: '_AFX_FUNCNAME' : redefinition
1>f:\HERC_CMD\Release\RCa05536(579) : fatal error RC1116: RC terminating after preprocessor errors
1>Build log was saved at "file://f:\HERC_CMD\Release\BuildLog.htm"
|
|
|
|
|
This usually means you have some unneeded #include statements in your source file, or some are out of order. Generally speaking you should not need to include everything within a resource file.
|
|
|
|
|
In other words look at the includes in resource file
thanks
|
|
|
|
|
Exactly what the compiler messages were telling you.
|
|
|
|
|
commneted out all the #includes
still getting the error
must be what I changed in the source don't know
|
|
|
|
|
the resource compiler reads uses resource.h had an errorous include
there thanks
|
|
|
|
|
Hi all,
Can anybody tell me how to sort a map based on the values.
e.g.
Map[key1] = box3;
Map[key2] = box1;
Map[key3] = box4;
Map[key4] = box2;
i want result like,
Map[key2] = box1;
Map[key4] = box2;
Map[key1] = box3;
Map[key3] = box4;
thanks in advance,
RKR
|
|
|
|
|
AFAIK, You can sort maps only by the Key element. I think that is the the point of having maps.
Your scenario might work out some way. but what if 2 different keys has the same values? how will you sort it?
Every new day is another chance to change your life.
|
|
|
|
|
NajaR12 wrote: Can anybody tell me how to sort a map based on the values.
Why do you want to do that?
Your desire suggests that you have misunderstood the purpose of a map.
The key is supposed to be unique and the value is identified by its corresponding key so you may write code such as in order to retrieve the "box" associated with the key :
Box& box = Map[key];
However, if your "boxes" are unique you may use them as keys, e.g.:
Map[box1] = key2;
Map[box2] = key4;
Map[box3] = key1;
Map[box4] = key3;
Consider using a std::list that is entry-sorted.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
a map isn't really the right container for this.
if you have pairs that need to be sorted, why not put them into a vector/list of std::pair<key,box> and sort that on box ?
|
|
|
|
|
hello guys... I have a listbox on my dialog. I am debugging my program and getting this error. Here is what I am trying
if(ListBox.GetCount() >= 1)
Now when I select ListCtrl.GetCount() and select Add Watch , it shows me the said error. Now although the problem is solved using following technique but what if I don't want to add unnecessary variables.
int count = ListBox.GetCount();
if(count >= 1)
This world is going to explode due to international politics, SOON.
|
|
|
|
|
Please set your complier optimization option to “Disabled” and try
|
|
|
|
|
See here[^]; if the code is inlined then no function exists in the compiled version.
|
|
|
|
|
That variable would get optimised out in a release build anyway so dont worry about it.
|
|
|
|
|
I am using named pipes to transfer data between a DOS "C" program and Window MFC
program
In this scenrio the DOS program acts as the server while the Windows program is the Client
The Windows program send a string to the DOS program and the DOS program responds sending across 150 - 300 bytes
Speed is of otmost importance as this a ongoing conversation
I have chosen to use Named pipes
since I am releative newbie
I am wondering what the fastest method of IPC would be
Thanks in advance
|
|
|
|
|
Probably the fastest would be a shared memory pool... but are you sure you need that speed? A lot of times, people think they need the best of something when they really only need something that is good enough.
For example, even though shared memory would probably be the fastest option, it would probably not be easy to implement across multiple systems, your server and client would always have to be on the same machine (and by default, same OS), whereas if you used something more versatile like sockets, you could have your system work across different machines (or in the same one, no difference), different operating systems, different states, and even different countries.
So, make sure that you really need all that speed. For example, a phone conversation can be transmitted over sockets with no issue, but digitized IF (if you know what that means) could only go up to certain rates efficiently over a network.
|
|
|
|
|
Hello...
Please ask some help to get the temperature of CPU....
If you have some class o sample..
Please help me.. Thanks a lots...
|
|
|
|
|
|
I keep seeing this "note" as I browse through the MSDN for Visual C++ 2012 (i.e. MFC classes, ATL, etc...)
What exactly does this imply for a Native Code programmer? (The more I read about the WinRT, the more confused I get)
Will a traditional MFC application just work in Windows 8?
modified 25-Jun-12 11:23am.
|
|
|
|
|
bob16972 wrote: What exactly does this imply for a Native Code programmer?
Nothing really... it's not like the WinAPI is going away.
bob16972 wrote: Will a traditional MFC application just work in Windows 8?
They should, accessing desktop applications is not going away. There was an article about this not too long ago stating the intent for Visual Studio to keep supporting desktop application development, which means it will keep getting supported in Windows.
|
|
|
|
|
Albert Holguin wrote: There was an article about this not too long ago stating the intent for Visual
Studio to keep supporting desktop application development, which means it will
keep getting supported in Windows
I had seen something about that but it almost sounded like it was discussing running it on and targeting some previous versions of Windows. That apparently confused me enough to cause some concern.
thanks for reponding.
|
|
|
|
|
Sure, no problem. I've kept an eye out for this as well since I work on desktop applications. I doubt they'll completely get rid of the traditional desktop support any time soon, if so, I'm sure Linux will have a ton of users flocking in their direction. The market for traditional desktop applications is still large for the engineering/scientific community.
|
|
|
|
|
hi,
i'm developing dialog based GUI code for my project using opencv with mfc. i'm getting following error for the MouseCallback function which i don't understand why
error C2660: 'SetDlgItemTextW' : function does not take 2 arguments
following is the code that causes this error
void leftclick( int event, int x, int y, int flags, void* param )
{
if( event == CV_EVENT_LBUTTONDBLCLK )
{
CvScalar s;
CString Blue, Green, Red;
zoomed = (IplImage*) param;
s=cvGet2D(zoomed,x,y);
Blue.Format(_T("%0.2f"), s.val[0]);
Green.Format(_T("%0.2f"), s.val[1]);
Red.Format(_T("%0.2f"), s.val[2]);
SetDlgItemText(IDC_Blue, Blue); /error C2660
SetDlgItemText(IDC_Green, Green); /error C2660
SetDlgItemText(IDC_Red, Red);
}
}
this mouse event is being called in a thread as
cvSetMouseCallback( "box.png", &leftclick, 0 );
any idea what i'm missing. do i have to define the mouse event in the dialog class??
Regards
Jawad
modified 25-Jun-12 6:42am.
|
|
|
|
|
|
Since you are calling this from a thread and not from inside the dialog class, you have to pass the hWnd of the dialog as the first parameter to SetDlgItemText()[^].
You should know that doing this from another thread is a risky way.
Soren Madsen
|
|
|
|