|
In general, you first create the MFC object via Resource Editor, add the C++ code to the project, and link the MFC object to the C++ class.
Kuphryn
|
|
|
|
|
I'm having a rather large issue with Developer Studio where if one types out a varible name such as a class or struct or any other data type, I'm not getting any information from it. That is, when you type pVar. or pVar-> I'm not getting a combobox of information, or if I do, the information is old and is not updating.
Should I reinstall Developer Studio or is this a fix that can be done quickly? One thing and I don't know if this makes a difference. I have VC.NET installed as well. Could they be conflicting with each other?
Thanks!
|
|
|
|
|
|
eventhough the cleanup of NCB will not help you..i strongly recoment you to use VISUAL ASSIST. COOOOOOOL software...thats really great...now i am using the demo version (for vS 6), that will expire soon...
I want to change Myself..Can u help me?
|
|
|
|
|
Try deleting the .ncb file in your project directory (may be corrupt), it will be regenerated by Visual C++. Also, you might want to search for IntelliSense in the MSDN and elsewhere.
INTP
|
|
|
|
|
Replacing the .ncb seemed to fix it. Thanks!
|
|
|
|
|
I had a similar issue before and fixed up the code per instructions given to me, however I still have an issue with it. The code is as follows
<code>
CString CXMLParser::CreateAttributeTag(bool End, CString TagName, COleVariant *Value, ...)
{
va_list argList;
int count = 0;
CString returnVal = _T("");
va_start(argList, Value);
for(;;)
{
CString AttributeName = va_arg(argList, LPCTSTR);
if(AttributeName.IsEmpty()) break;
CString AttributeValue = va_arg(argList, LPCTSTR);
returnVal += AttributeName +"=\'"+ AttributeValue +"\' ";
}
va_end(argList);
return FormatTag(End, TagName, Value, returnVal);
}
</code>
I want to provide a function that will take variable parameters so I can build an attribute list for an XML tag. This function is the function I call with the variable parameters. When var_arg is called I get corrupted data.
Another question I had was, I saw CString Format uses a LPCTSTR variable where each parameter could be a different type, that is one parameter could be an int, another a double and another a string. Since I want the same to work here, is it proper to employ the same tactic or should I use COleVariant?
Thanks!
|
|
|
|
|
You need to have a way to tell the function how many parameters are in the ... part, and their types. Since you want to have any number and differing types, you will need something rather complex - copying the format string method used by CString::Format() wouldn't be the worst way to do it.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
Laugh it up, fuzzball.
|
|
|
|
|
thanks for the info... quick question.. From where do I get the value of how long it is. Do I passs that myself or can that be determined programmically?
Thanks!
|
|
|
|
|
You can do it either way. CString::Format() infers the number of params from the number of %x inserts, but you can also pass the number as an explicit parameter.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
Kosh reminded me of some of the prima-donna programmers I've worked with. Knew everything but when you asked them a question; never gave you a straight answer.
-- Michael P. Butler in the Lounge
|
|
|
|
|
Hi,
I wrote a dll which contains classes using stl symbols (valarray).
First, this compiled well, but crashed at runtime. I then added to my code the following lines :
#ifdef EXP_STL
#define EXPIMP_TEMPLATE
#else
#define EXPIMP_TEMPLATE extern
#endif
EXPIMP_TEMPLATE template class EXP_STL std::valarray<double>;
Now, it doesn't compile, wiht error C2470 (sorry, but my error description is in French ...).
What happens ? What must I do to make it work ?
Thank you very very much.
|
|
|
|
|
Hi,
First of all, I'd try making sure that the executable and the DLL are built with exactly the same dynamic version of the run-time library. Hopefully this will solve your problem away. If it doesn't, please report back and we can think it over again.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Yes, the executable and the dll were built at the same time.
But after hours spent on the net, I found a solution to my problem, which seems (not fully tested yet) to work with <vector>.
But the problem persists with <valarray>. To be more precise, I have an unresolved external link error which concerns the <slice_array> class. And here, I have no idea why...
Thanks.
|
|
|
|
|
Sorry fo my first answer. Some words were missing because I had problems with the HTML formats...
Ok, let's write it again. I said :
Yes, the executable and the dll were built at the same time.
But after hours spent on the net, I found a solution to my problem, which seems (not fully tested yet) to work with the class VECTOR.
But the problem persists with VALARRAY. To be more precise, I have an unresolved external link error which concerns the class SLICE_ARRAY. And here, I have no idea why...
Thanks.
Could you help ?
|
|
|
|
|
Hi,
I am using a CView to display a GDI+ image. My problem is when I change the image displayed i want to erase the background first. Invalidate(true) appears to have no effect, does anyone know why this is the case? Any clues at all would be appreciated!
Cheers
Rich
|
|
|
|
|
Hi,
first of all, sorry for posting on the VC++ board, but there is no networking board here, and due to the fact that I am using VC++ ... here I go:
I got a question on SOCKETs.
I have a SOCKET listening on a specified port.
When a client connects, I call accept. Due to specific reasons I do not call recv after this directly. There are about 1-2 seconds after the accept call until I loop on recv. Now my question: what happens with the data sent from the client to my SOCKET in the meanwhile? Is it lost? Is is buffered and I receive it when I then call recv?
Thanks a lot!
Chris
|
|
|
|
|
If it's TCP, you needn't worry. It's buffered, and if the buffer space runs out the other side will know this.
If it's UDP -- it will get buffered on your side until the buffer runs out. Then new packets will get lost.
If it's another protocol -- well, that's up to your protocol stack.
-- Nitzan
|
|
|
|
|
Thanks Nitzan!
I am using TCP and this is also what I thought.
Chris
|
|
|
|
|
It's buffered... up to a point, say, several 10s of K
|
|
|
|
|
I am trying to write my very first C++ program. This is loosely a port from a running program in a Rabbit 2000 8-bit microprocessor (the original program is in Zworld Dynamic C).
My program needs the following:
1. To eventually run as a service in Win 2003 Server
2. Multithreaded to handle up to 16 concurrent identical threads
3. Access my realtime hardware attached to 1-4 COM ports each of which must be synchronized (presently using a Semaphore)
4. Read data from a table in Access2000 (.mdb file) that I have already programmed. Using ADO, DAO?
5. Write data to another table in the same .mdb file (logging information)
6. My 'real-time' requirement is VERY slow - response times of 1 second or more are entirely acceptable. (I bet that's really different from other applications!)
I really know what the program has to do, but am completely unfamiliar with C++ implementations. I have both Visual Studio 6.0 and Visual Studio .NET 2003 installed as development platforms. I can use either for my project.
What I need is access to an experienced programmer who can help me structure my program to run in C++. I am willing to pay a reasonable hourly rate for such help.
Any takers?
best to email me:
JohnAlderman@mindspring.com
John Alderman
|
|
|
|
|
seems that something like IVR, (using Dialogic cards.??)
anyway..
I AM READY TO HELP YOU.
|
|
|
|
|
Hi, I have a problem with Microsoft Developer Studio (I'm using version 4.0). My source file entry points (in the righthand pane) seem to have gotten out of sync with the class view index (in the lefthand pane). The upshot is that if I click on a given function in the class view, the scrolling in the lefthand pane does NOT give me the position of the entry point for that function definition - it is some way removed. I have tried erasing the .clw file and regenerating it, but that does not cure the sync problem - I guess that must be controlled by some other project file. Can someone tell what file that is, and how I regenerate it to give me the correct synchronisation. Thanks in advance !
Doug
|
|
|
|
|
OK - I found a clue in a few posts above this one - for reference, erasing the .ncb file (Developer Studio will regenerate it) will sync the ClassView functions with the source file. I'm fixed !!!
Doug
|
|
|
|
|
Suppose i'm having a SW that needs to be updated from the net (like ACDsee or acrobat reader)
how can i do that.
|
|
|
|
|
When I try to compile *.c files in Visual Studio, it lists me a lot of errors, like:
error LNK2019: unresolved external symbol __imp__send@16 referenced in function _main
and all this errors are referenced to identifires from library "winsock2.h"
Please tell me, what to do. Thanks.
|
|
|
|