|
javad_2005 wrote: ...i dont find msword.h
If you have added Word to your application via its type library, you will see the .h and .cpp files as part of the project.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
tools/options/Project and Solution
VC++ Directories
[Include files]
[Library files]
Could somebody tell me where is the setting file?
|
|
|
|
|
in the solution (.sln) i believe.
i don't remember, but you can simply edit it, it's just XML inside.
if it's not there, maybe it's in the project files...
|
|
|
|
|
This info isn't attached to each solution since it's an app-wide setting.
Search for VCComponents.dat in your system application data folders
(for example, on my Vista machine, it's at C:\Users\Mark\AppData\Local\Microsoft\VisualStudio\9.0).
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
pAdCn is an object of CADOConnection.
CADOConnection::CADOConnection ()
{
m_Con.CreateInstance("ADODB.Connection");
m_cmmd.CreateInstance("ADODB.Command");
}
void CADOConnection::vdTest ()
{
m_cmmd->CommandText=_bstr_t(_T("BB"));
m_cmmd->Parameters->Refresh();
m_cmmd->Parameters->Item[_variant_t (_bstr_t ("aaa"))]->Value=_variant_t ("aaa");
m_cmmd->Execute (NULL, NULL, adCmdStoredProc);
}
void CADOConnection::vdTest ()
{
m_cmmd->CommandText=_bstr_t(_T("BB"));
m_cmmd->Parameters->Refresh();
m_cmmd->Parameters->Item[_variant_t (_bstr_t ("aaa"))]->Value=_variant_t ("aaa");
m_cmmd->Execute (NULL, NULL, adCmdStoredProc);
}
i create a thread:
UINT pRunThread (void * p)
{
if (pAdCn->Open ("xxxxx")) //has connected!!
while (1)
{
pAdCn->test (); // why the memory is rising unstop. about 4k every 2 or 3 minutes. i am very hurry. thanks
Sleep (5000);
}
return 0;
}
godsun
|
|
|
|
|
I have class called 'CWizardSheet'
I want to access it's members in class say 'CWizardPreview'
So I included the file as "WizardSheet.h" in file 'WizardPreview.h'
and I am creating member variable as pointer as
CWizardSheet *ptrWizard;
So it gives error as
error C2143: syntax error : missing ';' before '*'
error C2501: 'CWizardSheet' : missing storage-class or type specifiers
error C2501: 'pWizardSheet' : missing storage-class or type specifiers
i have checked semicolan also
please help me to solve this error...
|
|
|
|
|
Chetan wrote: So I included the file as "WizardSheet.h" in file 'WizardPreview.h'
usually you need to include the header only in the requiring source file (i.e. WizardPreview.cpp ).
Chetan wrote: So it gives error as
error C2143: syntax error : missing ';' before '*'
error C2501: 'CWizardSheet' : missing storage-class or type specifiers
error C2501: 'pWizardSheet' : missing storage-class or type specifiers
Is this error related to WizardPreview.cpp compilation (check well in the compiler output window)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
hi ,
i am trying to enumarate windows in my app. i want to display the status of window( responding or not ) as in task manager. how i can determine wheter a window is responding or not.
Thanks & Regards
|
|
|
|
|
nitin3 wrote: how i can determine wheter a window is responding or not.
Send it a WM_NULL message via SendMessageTimeout() .
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I convert an application code to dll file.
I use functions from other dlls.
In my application code, I have include a header files for the dlls and it works. In the dll file, I included the same header files, but the dll can not be loaded successfully, with a link error LNK2001.
how can i set the path for the dll?
thx.
Lei
|
|
|
|
|
It seems your dll needs to a lib file.
|
|
|
|
|
Yes. You need to link your Dll project with the .lib files from the Dlls your project calls into. If you don't have .lib files for the dlls you need to use then you'll have to load them at runtime using the LoadLibrary API function and use GetProcAddress to get function pointers to the entry points for the functions you want to call. If all this seesm a bit arcane then at least you now know why COM got invented.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
If you do not want to use "loadlibrary" see other reply)
1) You cannot set a path for a DLL, you must either have your new DLL in the same directory as the DLL you are calling, or put it in the windows/system32 directory.
2) You need to link the lib file. Either add the lib file using project properties or add following to your source file
#pragma comment(lib,"DllName.lib")
3) Add the header file for the DLL to your source file.
|
|
|
|
|
I am by no means an experienced c++ programmer, but am trying to store multiple occurances of 3 strings in a vector of vectors and need to reference the stored values from a nested for loop. I can't seem to stumble or fumble onto the correct syntax. Below is a short example that I am using as a test case.
<br />
#include <iostream><br />
#include <string><br />
#include <vector><br />
<br />
using namespace std;<br />
<br />
struct s {<br />
string strA;<br />
string strB;<br />
string strC;<br />
};<br />
<br />
void main (int argc, char *argv[]) {<br />
<br />
typedef vector <s> vstype;<br />
vstype v;<br />
<br />
s bugs;<br />
bugs.strA="bees";<br />
bugs.strB="beetles";<br />
bugs.strC="flys";<br />
<br />
v.push_back(bugs);<br />
<br />
s bugs2;<br />
bugs2.strA="chiggers";<br />
bugs2.strB="moths";<br />
bugs2.strC="praying mantii";<br />
<br />
v.push_back(bugs2);<br />
<br />
bugs.strA="mosquitos";<br />
bugs.strB="ants";<br />
bugs.strC="ticks";<br />
<br />
v.push_back(bugs);<br />
<br />
cout << bugs.strA << endl << endl;<br />
<br />
string dummy = bugs.strA;<br />
<br />
<br />
for( vstype::const_iterator p=v.begin(); p!=v.end(); ++p) {<br />
cout << "3 BUGS" << endl << (*p).strA << endl << (*p).strB << endl << (*p).strC << endl << endl;<br />
}<br />
<br />
v.clear();<br />
<br />
for( p=v.begin(); p!=v.end(); ++p) {<br />
cout << "3 BUGS" << endl << (*p).strA << endl << (*p).strB << endl << (*p).strC << endl << endl;<br />
}<br />
<br />
cout << "===============" << endl << endl;<br />
<br />
vector <vstype> vx;<br />
<br />
vx.push_back(v);<br />
<br />
v[0].strA="aphids";<br />
v[0].strB="stink bugs";<br />
v[0].strC="dragonflys";<br />
<br />
vx.push_back(v);<br />
<br />
for (vector<vstype>::const_iterator s=vx.begin(); s!=vx.end(); s++) {<br />
for (p=(*s).begin(); p!=(*s).end(); p++) {<br />
cout << (*s)[0] << endl;<br />
}<br />
cout << endl;<br />
}<br />
<br />
}<br />
I realize that I might be able to dereference with some sort of vs[x][y] notation, but was trying to get it to work this way just for grins.
Any suggestions would be greatly appreciated. Thanks.
|
|
|
|
|
for instance:
for (vector <vstype>::const_iterator s=vx.begin(); s!=vx.end(); s++)
{
for (p=s->begin(); p !=s->end(); p++)
{
cout << p->strA << endl << p->strB << endl<< p->strC << endl;
}
cout << endl;
}
Please remove the v.clear(); statement in your code (unless you like the debugger complaining...).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hi Experts,
I want to change the content of a file.I am using the WriteFile() function to overwrite the file, but this is very slow.So please, could you tell me another alternate ?
Thanks in advance.
|
|
|
|
|
how do you mesure this ?
how are you sure it is the WriteFile() that is slow ?
modified on Tuesday, December 04, 2007 7:19:03 AM
|
|
|
|
|
It will most probably be the way of usement he makes.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
How big are the files you want to write?
Can you post a piece of your code?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
The instruction at "0x73dd11c7" referenced memory at "0x00000004". The memory could not be "read". Click OK to terminate the program
This is the error i am getting in the RELEASE VERSION alone. In Debug version the application is running fine.
Can you suggest any measures to avoid this??
Thankyou.
Priya Sundar
|
|
|
|
|
This is memory related problem.There might be some memory leakage.Analyse the code again.
|
|
|
|
|
Did you use of pointers on your program?
|
|
|
|
|
I can give you two hints.
1) Debug in Release version itself. For that do the following project settings.
In C/C++ tab,
- Optimizations : Disable Debug.
- Debug Info : Program Database
In Link tab,
- enable "Generate Debug Info."
2) For tracking the memory leaks, the following link will help you.
http://msdn2.microsoft.com/en-us/library/e5ewb1h3(VS.80).aspx[^]
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
Priya_Sundar wrote: In Debug version the application is running fine.
I suspect not. While errors may move around in memory, they seldom, if ever, go away on their own. The Debug version is likely just masking the problem, thus making it appear to work.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi friends
In a my program a scroll window is provided. Drawing a line while moving cursor in scroll window. After scrolling it doesn't show correct position.
thanks in advance
-RisKhan-
|
|
|
|