|
Does anyone now about MFC/Win32 API to get and set the File Properties in the summary tab like, Subject, Title, Category etc.
The closest I was able to get was DSOFile library(dll) provided by Microsoft but I don't want to use a third part library (which I will have to ship along with my binaries).
Any API valid for Windows NT/2000 to get File->Proprties-.Summary will be highly beneficial.
Thanks and Regards,
Amol
Amol
|
|
|
|
|
|
Thanks a lot Mike for the help.
I was successfully able to get summary and custom information out of this.
But I have one problem with this regards. The file (format) whose File->Properties I want to extract has something called "Configurations" in addition to "General", "Summary", and "Custom" tabs in it's File properties.
This TAB is exactly the same as "Custom" tab in File->Properties. The help documentation of my file-format mentions that these properties are written to the file in an 'OLE Property' way. But the source code you provided doesnot mentions any way to get the "user-defined" tab information.
Can you please help me out in extracting such information of a file.
Best wishes and Regards,
Amol
|
|
|
|
|
i have C library which i need to invoke from c++ class
but when i tried to invoke the functions of the c library i am getting linker error of particlar function
Can anybody help
thanx
|
|
|
|
|
When you declare the function, wrap it in an extern "C":
<br />
extern "C" {<br />
extern void the_c_function() ; <br />
}<br />
Lets be honest, isn't it amazing how many truly stupid people you meet during the course of the day. Carry around a pad and pencil, you'll have twenty or thirty names by the end of the day - George Carlin
Awasu 1.1.5 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Thanx for reply
This should be in library or in my class if so i don't have c library source code
then how can modify it
thax..
|
|
|
|
|
Wrap the header file:
<br />
extern "C" {<br />
#include "api.h"<br />
}<br />
Or just duplicate the declarations you want.
If you're writing a C library, it's good form to put the extern "C" *inside* the header file but not every one does it.
Lets be honest, isn't it amazing how many truly stupid people you meet during the course of the day. Carry around a pad and pencil, you'll have twenty or thirty names by the end of the day - George Carlin
Awasu 1.1.5 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Hi there,
I have a problem with the MS Access ODBC driver.
My code looks something like this
First, i open the database using the Acces driver
CDatabase database;
CString SqlString;
CString sDriver = "MICROSOFT ACCESS DRIVER (*.mdb)";
CString sDsn;
CString sFile = "d:\\MyDB\\MyDB.mdb";
sDsn.Format("ODBC;DRIVER={%s};DSN='';DBQ=%s",sDriver,sFile);
database.Open(NULL,false,false,sDsn);
Then I create the recordset (the class MyRS is derived from CRecordset)
MyRS rs (&database);
SqlString = "SELECT * From Table1";
What works:
rs.Open(CRecordset::forwardOnly, SqlString);
THis however does not allow using MoveFirst, MoveNext and so on nor to edit and updata records.
These two do not work. I get told that the driver does not support dynamic or dynaset pointers.
rs.Open( CRecordset::dynaset, SqlString, CRecordset::none );
rs.Open( CRecordset::dynamic, SqlString, CRecordset::none );
This works, and I can edit and move back and forward in the recordset, but i cannot filter the recordset with an Sql statement:
rs.Open( CRecordset::snapshot);
does not work : rs.Open( CRecordset::snapshot, SqlStatement);
I did not find in the MSDN that the driver i use does not support dynasets.
Thanks a lot
ch
rs.Open( CRecordset::dynamic, SqlString, CRecordset::none );
|
|
|
|
|
i am student. i have a need of fortran programing language. my aim is made syntex analyser of the language as an assignment if i got it i simply implement using c++ routines.
|
|
|
|
|
hello,
please give some sites.. which gives tips,code,example etc... to build the install shield for my software project ...which is developed in VC++,VB on windows platform....
actually i have zero knowledge of Install Shield use..
so want help...on line...
waiting for early reply.
thanking u.
skpanda
|
|
|
|
|
Article on CodeProject
Click ME[^]
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
|
http://installshield.com/
This has a very good knowledge base and will answer every question of yours.
East
|
|
|
|
|
Hi,I am a programme-loving.But at recently programme development ,I have meet a headache problem,I search all
the MSDN and use google to search all for nothing.
Who can you help me how to enumerate Windows CE process
Thank !
|
|
|
|
|
is there any way to determine a window has standard scrollbar or scrollbar control? in other word, how to scroll a window that does not belong to my app?
|
|
|
|
|
Try sending WM_HSCROLL and WM_VSCROLL Messages to that Window
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
sure, you are right
but i want to get some information about the scrollbar(range,pos etc.)
Do you know how can i do it???
thanks
|
|
|
|
|
Why don't you use GetScrollRange with the HWND of scroll bar
MSDN says
If the specified window does not have standard scroll bars or is not a scroll bar control, the GetScrollRange function copies zero to the lpMinPos and lpMaxPos parameters.
this might help
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
MailMonty,
thanks for your reply,
I have tried to use GetScrollRange but nothing happened,
the min&max of the range are both zero
but i want to get the range and scroll it exactly
have you any good idea?
|
|
|
|
|
I am in the process of reorganizing my code and came across and I came across a problem, as described in the subject line of this posting.
I have many classes that have instances of other classes as member variables. So including a forward declaration doesnt help, does it? Faced with these, I had the following options:
-Include the appropriate header in the header file that contains the class definition that has a member variable that is a class instance as opposed to a pointer to the class
-Change the member variable from being a class instance to a class pointer.
I have the following questions:
1) Which approach is *better* and why?
2) If you need to include the header and the forward declaration of the class doesnt help(which is reasonable) what do you do?
For now, Im using this
#ifndef __FILE_H<br />
#include "File.h"<br />
#endif
Thanks in advance.
|
|
|
|
|
The best approach depends upon your program. Its generally easier to have the class instance rather than a pointer, as you dont then need to manage allocation/deallocation. Plus it will be a little faster as the variable will be allocated automatically with the class, as opposed to having to use the heap. I would only use a pointer if its being passed into the class (for example, a pointer to the parent)
|
|
|
|
|
Hi:
How to get the text of the button on the ctoolbarctrl?I try:CToolBarCtrl::GetButtonInfo(),but the text it returns is always empty.
TBBUTTONINFO tbinfo;
char szBuf[100];
tbinfo.cbSize = sizeof (TBBUTTONINFO);
tbinfo.dwMask =TBIF_IMAGE|TBIF_STYLE|TBIF_TEXT;
tbinfo.pszText = szBuf;
tbinfo.cchText = 100;
cTbCtrl->GetButtonInfo(pInfo->dwItemSpec,&tbinfo);//(CToolBarCtrl * cTbCtrl)
but the szBuf is always empty.How should I do?
Thanks
Benben
|
|
|
|
|
My goal is detecting USB Web-Came connection in my PC for correct video capture.
I use DirectShow for my work. I did enumerating videocapture devices and always getting identical result - Web Came is in system. Independing WebCame is plug in or plug out.
How can I do it yet?
Tav
|
|
|
|
|
I Use this Code works all the while
what problem are you having ?
IEnumMoniker *pEm;
hr = pCreateDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory,&pEm, 0);
pCreateDevEnum->Release();
if (hr != NOERROR)
{
MessageBox("Sorry, you have no video capture hardware");
return FALSE;
}
pEm->Reset();
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Dear All,
I am developing an application for Windows 2000 in MFC VC++ Version 6.0. I need to set attributes (read only, hide, etc...) on a given file/folderd.Is there any Win32 API provided ?
Thanks a lot and Happy Christmas!!
Rohit
|
|
|
|