|
Mr followait,
you've been on this forum long enough to know the posting rules here.
1) when you post a code sample, you must use <pre></pre> tags rather than <code></code> .
2) you must post a relevant piece of code, NOT a whole huge file.
3) you're aware already of the Edit link at the bottom of your messages. instead of reposting a new message, edit the first ones.
4) don't just ask people "what's wrong". it's YOUR code, so YOU have to search what's wrong. at least, you have to prove that you tried it, by providing your debugging steps and the results, problems you encountered then.
|
|
|
|
|
1) ok
2) In fact, I had thought before post the piece of code, the context is needed, and it is only the framework, it is easy to read
3) ok, I just don't want people who had read the long message to search again for what I edited. next time, I'll be care
4) I've tried. I will add a line "with a CView, it works".
|
|
|
|
|
2) He didn't say it was difficult. He said it as a lot. You can try to find out which lines are giving the problem and comment a bit what is done before them, put the relevant code and put a comment with what you are trying to make.
3) When you edit a message it comes an auto "modified on .... at .... am/pm" so if u are adding you can put it below that line, if not you can always say "EDIT: I have changed...."
About your question of the Resource ID it has nothing to do. I have a programm with 1 main view (scroll view) and up to 63 secondary views derived from 5 different CFormViews (so the repettion index is 24x, 12x, 12x, 12x, 2x, 1x) and I dont change the resource name of the CFormView at all.
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
|
|
|
|
|
Hi,
I need to develop an editor, which need to support auto completion(like intellisense). Can any of you, suggest me which one is better to take up for implementation of intellisense in VC++,C#.
Any suggestions will be appreciated.
sree
|
|
|
|
|
I'm certain there is at least one article on CP about that.
and I'm also certain someone else suggested having a look at Scintilla[^].
|
|
|
|
|
How to copy a file from pocket PC to destktop PC.I want to get the best method.Please help me.Thank you!The follow is my code,but I need the better measure.Which fuction can do it?
CString strFileNamePC=_T("d:\\nini.txt");
CString strFileNamePPC=_T("\\nini.txt");
CFile oldFile;
oldFile.Open(strFileNamePC, CFile::modeWrite|CFile::modeCreate|CFile::typeBinary);
BSTR bstr = strFileNamePPC.AllocSysString();
SysFreeString(bstr);
CeRapiInit();
HANDLE h;
h = CeCreateFile(bstr, GENERIC_READ, 0/*cannot be shared*/, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
char cTemp[BUFFER_SIZE];
DWORD nbytes;
CString s;
int iTotBytes = 0;
DWORD n=CeGetFileSize(h,NULL);
if(h!=INVALID_HANDLE_VALUE)
{
AfxMessageBox("??");
while(CeReadFile(h, cTemp, (DWORD)n, &nbytes, NULL)&&nbytes>=1)
{
//if(nbytes>=1)
oldFile.Write(cTemp,n);
}
}
CeCloseHandle(h);
oldFile.Close();
CeRapiUninit();
Yunasheng Ni
|
|
|
|
|
I Want to work with word 2003,2007 in my mfc app .what file do i need?
i need to include msword.h but mfc i dont find msword.h
|
|
|
|
|
have you installed the Office SDK ?
|
|
|
|
|
|
|
But there isn't any Office word or something like that...
The Only thing is Word 2003 XML sdk
|
|
|
|
|
|
Can you send sdk link download for me?
thank you...
|
|
|
|
|
can you send office sdk download link ?
|
|
|
|
|
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.
|
|
|
|