|
|
Desmo16 wrote: Does anybody know which one is it ?
They hide that information in the documentation[^]
There is no need to start another thread when you already have one on this subject.
led mike
|
|
|
|
|
led mike wrote: They hide that information
If they didn't HIDE it , it would be so much easier to find!
Mark
|
|
|
|
|
Yeah, I still can't believe how many people that develop production software can't even use API documentation. Can you imagine how bad the resulting products must be? Scary eh?
led mike
|
|
|
|
|
led mike wrote: Yeah, I still can't believe how many people that develop production software can't even use API documentation.
Sad, but true.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
Purpose: Search through a single column in a single worksheet to find duplicate cell items.
Description: I can use 'Find' without any problems for the inital search however when I try to use it again I get an COleException with either no error description or 'type mismatch' if I pass in an 'After' cell address. When I use the 'FindNext' method I get the error "FindNext method of Range class failed". I need help!
I'm using Office 2003, VC++ 2003, Automation import via VS.
CODE for 'FindNext':
FindNext( CString afterAddress, CRange *pFoundRange )
{
bool result = false;
CWorksheets excelWorksheets( m_CurrentWorkbook.get_Worksheets() );
CWorksheet Worksheet( excelWorksheets.get_Item( COleVariant( (short)m_CurrentWorksheetIndex ) ) );
Worksheet.Activate();
CRange excelRange( Worksheet.get_UsedRange() );
VARIANT afterCellAddress;
VariantInit( &afterCellAddress );
afterCellAddress.vt = VT_BSTR;
afterCellAddress.bstrVal = afterAddress.AllocSysString();
excelRange.Activate();
pFoundRange->AttachDispatch ( excelRange.FindNext( afterCellAddress ) );//'FindNext method of Range class failed' here
VariantClear( &afterCellAddress );
result = true;
return result;
}
CODE for 'Find' being used twice:
Find( CString dataToFind, CRange *pFoundRange, CString AfterAddress ){
CWorksheets excelWorksheets( m_CurrentWorkbook.get_Worksheets() );
CWorksheet Worksheet( excelWorksheets.get_Item( COleVariant( ( short )m_CurrentWorksheetIndex ) ) );
Worksheet.Activate();
CRange excelRange( Worksheet.get_UsedRange() );
VARIANT valueToFind;
VARIANT afterCellAddress;
VariantInit( &afterCellAddress );
VariantInit( &valueToFind );
afterCellAddress.vt = VT_BSTR;
valueToFind.vt = VT_BSTR;
afterCellAddress.bstrVal = AfterAddress.AllocSysString();
valueToFind.bstrVal = dataToFind.AllocSysString();
LPDISPATCH foundRange = NULL;
TRY{
if( AfterAddress.GetLength() > 0 ){
foundRange = excelRange.Find( valueToFind ,
afterCellAddress,
xlValues,
xlWhole,
vOptional,
xlNext,
vTrue,
vOptional,
vOptional );
}
else {
foundRange = excelRange.Find( valueToFind ,
vOptional,
xlValues,
xlWhole,
vOptional,
xlNext,
vTrue,
vOptional,
vOptional );
}
if( foundRange != NULL ){
pFoundRange->AttachDispatch ( foundRange );
}
VariantClear( &afterCellAddress );
VariantClear( &valueToFind );
result = true;
}
CATCH( CException, E ){
result = false;
}END_CATCH
}
-- modified at 10:53 Tuesday 24th October, 2006
|
|
|
|
|
Facing the same problem,
any help ??
|
|
|
|
|
Hi,
I'm using msvc6 and this code compiles:
class SomeClass
{
public:
class NestedClass
{
};
SomeClass (const NestedClass & n);
};
while this one doesn't:
class SomeClass
{
public:
class NestedClass
{
};
SomeClass (const SomeClass::NestedClass & n);
};
it gets this two errors:
D:\projects\stuff\stuff.h(31) : error C2629: unexpected 'class SomeClass ('
D:\projects\stuff\stuff.h(31) : error C2238: unexpected token(s) preceding ';'
is it a compiler bug, or set by the standard?
thanks,
yaniv
|
|
|
|
|
Hi all,
I've got the path to a file returned by a CFileDialog.
(Let's call it "path")
Now i wanna open another file in the same directory.
I know the name of the file, of course.
I tried with:
file.open(path+"\..\newfile.txt",std::ios::in);
but it tells me "not enough memory" at runtime.
How can i do that ?
Thanx in advance,
Desmo16.
|
|
|
|
|
How about...
PathRemoveFileSpec(path);
_tcscat(path, _T("\\newfile.txt"));
file.open(path,std::ios::in);
Mark
|
|
|
|
|
The compiler tells me
PathRemoveFileSpec(path);
identifier not found even with a research independent from the object
is there anything i should include ?
Thanx in advance,
Desmo16.
|
|
|
|
|
#include <shlwapi.h>
Removes the file name and backslash from the end of a pathname string.
Mark
|
|
|
|
|
|
Sorry damn little angle brackets in html
#include <shlwapi.h>
|
|
|
|
|
In additional you can use of CFile instead file.open
|
|
|
|
|
hai friends,
iam new to this site...iam working for KPIT cummins ,pune(india).
i am facing one problem in my project in Visual Studio 6.0...
Front End: VB6.0
Back End: VC++6.0
Middle interface is Excel we are using..
Now problem is .. how can i debug both the VB6.0 and Vc++6.0 at a time by running my project...
please help me this very importent for me...
thanks & Regards
Sivaprasad
india
sivaprasad
|
|
|
|
|
|
What do you need?Can you be more specific
|
|
|
|
|
Does anyone have or know where i can find source code for a very simple program that just produces a preview from a webcam (no capturing required) using DirectShow and VS2005?
Or can any one explain how i would do it myself?
|
|
|
|
|
The AmCap sample app in the DirectShow SDK (now in the Platform SDK) is fairly simple.
Mark
|
|
|
|
|
But there is no documentation to explain what all the classes do. I'm new to C++ and DirectShow and so i need a dummys guide to webcam previewing.
-- modified at 10:48 Tuesday 24th October, 2006
|
|
|
|
|
ceejeeb wrote: But there is no documentation to explain what all the classes do.
The DirectShow SDK IS the documentation. It's well documented actually.
For a beginner it's not real easy. You need to know C/C++, Windows API, enough COM to at least
handle creation/releasing of objects, and DirectShow classes.
A simpler alternative is Video for Windows[^].
Mark
|
|
|
|
|
Hi
i have one issue regarding EventLogType of event viewer.
I have written code for reading all events from event viewer. for getting event log type name like application, system and security, I refer registry path (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog). Form this path, I come to know how many event log type are and using the keyname, I read the event logs information.
My problem is that One machine (windows 2000 server) the eventlog names are differ from registry with eventviewer.
Ex.
In registry Application
In EventViewer . Application Logs
So I could not get the log information from event log viewer
I am using OpenEventLog() API
Thanks
By .
Shadrach
|
|
|
|
|
I saw an example on codeproject about event viewer did you see it?
|
|
|
|
|
Hi !
I'm looking for a free C++ code profiler.
I've often heared about Valgrind, but it seems it only work on Linux.
Any suggestions ?
Thanks !
Jerome
|
|
|
|