|
Can't say why the first way is failing, but the second doesn't work because you're not providing a buffer for the control to store the text in. You need to set pszText and cchTextMax to the address and size of the buffer before calling GetItem().
--Mike--
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
let me try
Thanks Michael
|
|
|
|
|
If theres a problem with file strFile0 and an exception is thrown, I want the error message to have the name of the faulty file. This name is gotten in the try block. I dont think I can pass it in the catch argument:
catch(CFileException e, strFile0)
{
CString temp;
temp.Format("Error opening file : %d", e.m_cause);
AfxMessageBox(temp);
return -1;
}
}
So how do I communicate it to my messagebox in the catch block?
Appreciate your help,
ns
|
|
|
|
|
catch(CFileException e, strFile0)
{
CString temp;
temp.Format("Error opening file : %d ", e.m_cause);
AfxMessageBox(temp + e.m_strFileName);
return -1;
}
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Thats convenient! You did however mean to remove the strFile0 argument I was trying to pass in, right ? I am off to look up CFileException and see what all it exposes...
Many thanks,
Appreciate your help,
ns
|
|
|
|
|
Yeah that way, i mean if u correct ur own mistakes u wont ever make them again For ur own good (ok, i forgot )
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
CFileException has m_strFileName member which contains file name.
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
Is it possible to perform development in Visual Studio by having the libraries of a third-party component on a remote machine?
Any suggestions?!
|
|
|
|
|
Aehm, add the path to the library folder on the remote machine to your LIB path?
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
I have read data from a database into memory using a dinamic linked list in an SDI appication. Now I want to display the data, but I am having trouble doing so.
|
|
|
|
|
http://www.codeproject.com/library/gridprojects.asp
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hello,
If an ostream is open and a write operation completed, then a flush called, is the data 100% committed to disk or is there a delay?
Cheers,
Davy
Weblog, Ramblings and more...
www.latedecember.com
|
|
|
|
|
The data is 100% commited to disk.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
While stream flushes *its own* buffer, the OS can cache the data. Is there any requirement on standard file streams which makes them call API like ::FlushFileBuffers on close? I did quick grep and was unable to find fflush/_commit/FlushFileBuffer calls in C runtime sources for fstream.
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
flushing an iostream causes a call to sync for the managed streambuf object. Dinkumware's doc for basic_filebuf (here[^]) state that basic_filebuf::sync calls in turn to fflush . Of course, the ultimate test is to check it directly on the source code, but alas I don't have my Visual Studio handy right now.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
can anybody plz help me with locking the PC ...thru Bios or any other way so that nobody can access it...It should not detect any Hard Disk. (dont tell me bios password since it can be cracked with jumper settings). I need to lock a PC anyhow bcoz when i go away to home from my PC somebody else come and start working on that.
If I change Windows 2000 password then they will format the Hard Disk and start working again.
IF I keep a BIOS password then they can crack it by changing jumper settings.
what i need that computer should be hanged and nobody can easily guess that what might have happened to the computer...why it was not working?
|
|
|
|
|
Sounds fishy....
How exactly would you restore the computer so that 'you could start working again'?
|
|
|
|
|
If he puts a password they format??? what use then?? Dont they have other machines??
Fishy to me too!
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
there is NO solution if someone can open your PC case.
The best solution is bios password and padlock on the case.
|
|
|
|
|
Our Dell laptops (I have an Inspiron 8100) have hard-disk-based passwords.
If you don't know the password, the harddisk won't start to spin. This is not resettable by jumpers.
Of course they can always replace the hard disk.
Enjoy life, this is not a rehearsal !!!
|
|
|
|
|
Hi
I have to add some extra information to this files (it's going to be digital signature of the document), but I don't know how to start (I heard that this files are connected with OLE but I don't know anything about OLE). After adding the signature to the file of course I must be able to read only the document part of the file. I have also encountered another problem, Excel files is changing in one place after being opened (at the end of the file, in the record beginning with "Root Entry"). Is this will be ok to omit this few changing bytes in order to signature doc and verify the signature (I don't know what this few bytes stands for)? I don't expect to have one solution for Excel and Word (but it would be nice of course), but is there a chance that one solution(one code) will work in Office 97 and 2000 (it would be great)? Thanks in advance for any help.
greetings
Mariusz Popiolek
|
|
|
|
|
You're dreaming of an imaginary world where you can take whatever file format you want, and modify it on will. Let's get back to earth mate!
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
You exxagerate a bit. This is possible (I have seen application which is doing exactly what I want to do in MsOffice). Office docs are stored in a kind of a filesystem (this is connected somehow with OLE) and all I have to do is to read and write properly in this filesystem (probably using OLE in some way).
Greetings
Mariusz Popiolek
|
|
|
|
|
Again, if you add anything to the core file format, then it must mean something to the associated application : what do you think Excel will say if you add your binary stuff in it ? GPF!
Ok, just to give a hint : Office documents are compound documents (ole storage). They use IStorage/IStream. Because IStorage acts like a folder, and IStream like a file, you could add internal folders inside a given compound document (then use DocFile viewer, one of the tools of VisualC++6.0 to see them). That's the only common thing between all office file formats. And of course, don't even dare to open such a modified document in Office.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
That's what is on my mind! I just didn't know how to make it(I will try using IStorage/IStream). I don't think that any Office application will be confused when I add another folder to the file (for example Word should read it's own folder without looking for nothing else!), but this is only my presumption . DocFile viewer seems to be very useful at the moment, if you have any other hints (especially about using IStorage/IStream, but of course I should dig in MSDN for myself and I will do it surely)I would be very grateful. Thanks for help
Greeting
Mariusz Popiolek
|
|
|
|