|
Cedric Moonen wrote: Are you absolutely sure that the .cpp file is in your project ?
Yes pal, this is sure. I've double checked after you ask that pal.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Is it one single project or is it a solution containing several sub-projects ?
Is it a big project ? If no, would it be possible that you send everything to me by mail (only the source and header files and the solution and project files: sln and vcproj if you are using VC2005)? You can send it to cedric_moonen at hotmail dot com.
Put all those files (and only those) in a zip file. I can have a look and see if I can fix the problem.
|
|
|
|
|
Thanks pal, it is collection of sub-projects. Actually there is 7 sub-projects. I've done all the things learn until now in a same project to use as a single one. Now the size is over 30MB, even delete all debug folders. I'll try to remove all un-wanted projects and send it to you.
Also I used Visual Studio .Net 2003.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Eranga Thennakoon wrote: it is collection of sub-projects.
That is probably your problem. This class (the CMsgRecorder) is part of one of your project but you try to use it in another one. The compiler can find the header file of this file but once it needs to link to it, it fails because it is not part of the same project. Am I right or not ?
You cannot do that, you cannot use classes from other projects. It is not because it is in the same solution that you can use everything from everywhere. It is exactly the same as if the projects were not in the same solution. Putting them together is just a matter of convenience, nothing else.
|
|
|
|
|
Cedric Moonen wrote: That is probably your problem. This class (the CMsgRecorder) is part of one of your project but you try to use it in another one. The compiler can find the header file of this file but once it needs to link to it, it fails because it is not part of the same project. Am I right or not ?
Yes, I think so. Since I used large number of projects, it can be happened. Now first thing I'm going to do is, remove this project from the existing one and test. Let see what I can found.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Is there some limitation on the vector template that I should know about?
I have a vector of 45,000 string pointers. It's a dictionary file . Anyway, I need to iterate through these strings checking if more than one definition is present on the same line. Multiple definition are seperated with the '|' character, when I find one I create a new string and push it to the end of the vector. Simple enough you would think.
So, here is my code.
vector< LPENTRY >::iterator vIter = vEntries.begin();
while ( vIter != vEntries.end() )
{
LPSTR szEng = strchr( (*vIter)->English, '|' );
if ( szEng != NULL )
{
LPENTRY pEntry = new ENTRY;
*pEntry = *vIter;
strcpy_s( pEntry->English, MAX_LINE_LENGTH, &szEng[ 1 ] );
*szEng = 0x00;
vEntries.push_back( pEntry );
}
vIter++;
}
The problem is, when the vector grows to a size of 61447 and when pushing a new value to the end, it causes the iterator to become invalid ( pointing to 0xfeeefeee ). Hence when trying to increase it it triggers a breakpoint. Any ideas what is going wrong?
Waldermort
|
|
|
|
|
Firstly, see here[^] for the meaning of 0xfeeefeee .
See here[^] for a description of "iterator invalidation". Here's a quote:
[2] Memory will be reallocated automatically if more than
capacity() - size() elements are inserted into the vector. Reallocation does not change size(),
nor does it change the values of any elements of the vector. It does, however, increase capacity(),
and it invalidates [5] any iterators that point into the vector.
Steve
|
|
|
|
|
That value of 0xfeeefeee should have given it away. I worked around the issue by throwing out the iterator and used the indexing method instead. Though thanks for the reply
Waldermort
|
|
|
|
|
Hi...
CString str;
str = "www.google.com";
ShellExecute(NULL, "open" ,str, NULL, NULL, SW_SHOW);
this is my code....
but the error is
'ShellExecute': identifier not found.
what is the procedure for use shellexecute?
paulraj
|
|
|
|
|
|
already i included the header file...
paulraj
|
|
|
|
|
include
shellapi.h enclosed with <> (notice the '<>' instead of '""')
Come online at:-
jubinc@skype
|
|
|
|
|
i include like #include <shellapi.h>
now also same error
paulraj
|
|
|
|
|
Show us more code. Are you including the file in the correct place?
Steve
|
|
|
|
|
#include "stdafx.h"
#include "Pdf_Example.h"
#include "Pdf_ExampleDoc.h"
#include "Pdf_ExampleView.h"
#include <shellapi.h>
...
...
...
void CPdf_ExampleView::OnBnClickedButton1()
{
CString str;
str = "www.google.com";
ShellExecute(NULL, "open" ,str, NULL, NULL, SW_SHOW);
}
thats all....
if i click a button that should be open....
shall i put instead of str, D:\\Paul.pdf?
paulraj
|
|
|
|
|
Just for tracking the error. Please try like this and let me know the result...
#undef _INC_SHELLAPI<br />
#include <shellapi.h><br />
...<br />
...<br />
...<br />
void CPdf_ExampleView::OnBnClickedButton1()<br />
{<br />
CString str;<br />
str = "www.google.com";<br />
ShellExecute(NULL, "open" ,str, NULL, NULL, SW_SHOW);<br />
<br />
}
|
|
|
|
|
i got the output for MFC.
how to open in this for windows mobile6?
can help anybody?
paulraj
|
|
|
|
|
But what was the problem?
|
|
|
|
|
Probably the programmer?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Everything looks fine, except you should probably use SW_NORMAL , but this will not be the cause of your problems. What's happening? Are you still getting a compiler error?
Steve
|
|
|
|
|
I don't see anything wrong with your code. Is rebuilding the whole thing of any help?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
hi... i got it.......
thanks to all....
paulraj
|
|
|
|
|
You're welcome. Glad you got it done.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
What was the issue? I'm having the same and I can't resolve it
|
|
|
|
|
When I click them, they become visible again.
void CMyDlg::OnPaint()
{
...
Graphics g(GetSafeHwnd());
g.DrawImage(m_pMemBmp,0,0);
}
|
|
|
|