I am trying to index metadata for doc file for indexing purpose using IFilter implementation.
I have the OffFilter.dll which implements IFilter for office documents like .doc etc.
I am able to load the filter but the problem is it is only retrieving the contents of the file. I want other data like size of the file etc which it is not returning.
Below is the code snippet
//Initialize the COM LIB
if ( FAILED( ::CoInitialize( NULL ) ) )
IFilter * pFilter;
WCHAR * cPath = _T("D:\\Projects\\NBS\\Development items for Oasys post release 184.108.40.206 (RasterX issues).doc");
hr = ::LoadIFilter(cPath, NULL, (void**)&pFilter ); //LoadIFilter uses a means such as CoCreateInstance() to create the filter and then calls IPersistFile::Load with the name of the specified file.
if ( FAILED( hr ) )
CComQIPtr<ipersistfile> pPersistFile( pFilter );
SCODE ret = 0;
FULLPROPSPEC *fullPropSpec1, *fullPropSpec2;
fullPropSpec1 = new FULLPROPSPEC;
fullPropSpec2 = new FULLPROPSPEC;
Hello and good day. I have this one big dialog with different objects (buttons, listboxes, picturebox, static text, etc.) in it. All of these have a common process that should be called first when the user left clicks the mouse over the object. I have checked the OnLButtonDown method but it seems that it is not called when the user clicks over a component (for a button, it processes the OnClick
method and doesn't process the OnLButtonDown). Now, the reason I want to do this is because I don't want to add an OnClick for every component I have then place the same codes over again; but instead just check a coordinates table and see if the user clicked over an object. Is this possible with OnLButtonDown or would there be any other functions I can use to achieve what I am trying to do?
Actually you have only to call the same piece of code, in each event handler. I think it is not a big overhead. Why do you want to go against Windows event handling mechanism?
The problem is, there are tons of objects in there, and I think by adding one OnClick for each objects will cause the code to be longer than what it should be. Like adding OnClick for each textbox and there are 20 of them and all of those 20 contains just one call of a function.
I want check if a certain file is present at a certain location.
I am using the FileCreate function for this, but I have a problem in the creation of the filename parameter.
if I use the next line to create the filename everything works fine if the specified file is in the same directory as the source:
sprintf(FileName,"%s.txt",ProdBest[i]); //ProdBest is an array of strings containing the filename.
But I want a clear seperation between my Production files and the programm files, and store the Production files in a seperate directory (C:\ProdIn)
If I use the following line I always end up getting a INVALID_HANDLE_VALUE with GetLastError code = 2 (FILE_NOT_FOUND).
So clearly I am making a mistake, but I don't know where or what
If you are using MFC, take a look at this article[^].
BTW, searching before asking the qestion sometimes brings a lot of usefull results. There are plenty of nice articles on codeproject about a very broad range of subjects.