|
Read the IHTMLDocument2::frames property to get a list of all frames under the top-level HTML document. You'll have to recurse through that collection since frames can have sub-frames.
For each frame object, QI it for IHTMLWindow2 and then read the document property. You can then use your existing code to read the contents of that document.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
Shots do not hurt other players... yet
|
|
|
|
|
my view base on CEditView, I want to hide a cursor. How to do that ?
|
|
|
|
|
ShowCursor(FALSE);
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Here is a vc 6.0 project, in which there is a link fatal error that cannot open file "..\bin\release\xxx.lib".
I set all the tabs in project->setting and open all files in notebook to find this string.
However, after doing these, the error appears after rebuild all.
Why?
Thanks!
|
|
|
|
|
It could be the order that the files are built. When you do a rebuild all the first thing that happens is that all the files are deleted, then they are rebuilt. If your main app (the one that needs xxx.lib) is built before xxx.lib it will not be able to find xxx.lib. Make your app dependant on xxx.lib so that xxx.lib gets built first. Use Project->Dependancies for this.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Hi,
I am having some problems with a project of mine (inherited actually). It was probably converted from the older VS.Net to VS.Net2003. I am having those corrupted metafile database link error. I was told that I should start from a clean VS.Net2003 project and import the old files back. The problem is that the files for Windows Forms look different in the solution explorer than before. In the old project, I can see the form icon next to the header file and a resource file show as a child under it. Now these related Windows Forms files seem to be unrelated in the Solution Explorer and I can no longer double-click on the header file to start the form designer. What is the correct way to rebuild a project from the source files? The only way that I can think of is to create a Windows Form application and then add the new forms that has the same names as the old ones. After that, I will simply overwritten the new files with the old ones. I figure that this must be a dumb way of doing it. Can you give me some idea how to do this in a smart and faster way?
Thanks very much.
Dennis
|
|
|
|
|
Hello everyone!
OK, I'm just trying to open a file with CreateFile() and ReadFile(), but ReadFile() only reads until line 65 of my file, and that line ends with some weird characters... This happened to me in C#, where I used the StreamReader.Flush() method, but how do I do it in C++? FlushFileBuffers() doesn't work... Thanks!
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
|
|
|
|
|
How big is the file (byte count)? How many bytes did you read? Could you show us some actual code?
--
The Blog: Bits and Pieces
|
|
|
|
|
Kixdemp wrote: ...ReadFile() only reads until line 65 of my file...
ReadFile() has no concept of a line. What exactly are you trying to do?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
How are you calling ReadFile? What are the values of the parameters you pass to ReadFile? What is the value returned in the fourth parameter (lpNumberOfBytesRead)? What is the return value from the call to ReadFile?
I am willing to bet that the buffer you are reading into (second parameter) is uninitialized, and the third parameter (nNumberOfBytesToRead) is smaller than the size of your file and/or not the same size as the buffer.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks all for your replies!
Bytes in file: 4,970
Code:
<br />
HANDLE bipFile = CreateFile(fileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, <br />
FILE_ATTRIBUTE_NORMAL, NULL);<br />
<br />
if (bipFile == NULL)<br />
{<br />
throw 1;<br />
}<br />
<br />
DWORD dwNumRead;<br />
<br />
char * dwBuffer = new char[1024^4];<br />
<br />
if (!ReadFile(bipFile, dwBuffer, 1024^4, &dwNumRead,NULL))<br />
throw 2;<br />
<br />
CloseHandle(bipFile);<br />
What's wrong with that? Thanks!
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
|
|
|
|
|
|
Three things:
CreateFile() returns INVALID_HANDLE_VALUE on error, not NULL .
1024^4 does not mean "1024 to the forth power."
Why are you trying to allocate that much memory in the first place? It will never succeed.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.
-- modified at 22:12 Sunday 27th November, 2005
|
|
|
|
|
Hello,
The problem is that your buffer is too small. Just as Micheal Dunn pointed out: 1024^4 doesn't do what you want. operator ^ is the XOR operator. The result is: 1028.
You should try the following:
char pcBuf[1024] = {0};
DWORD dwBytesRead = 0;
while( !ReadFile(bipFile, pcBuffer, 1024, &dwBytesRead, NULL )
{
if( dwBytesRead < 1024 )
break;
}
Hope this helps.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Just FYI, flushing is only meaningful when writing to a file. If you're just reading, there's nothing to flush.
Calling Flush() probably had some other side effect (resetting the file pointer or something) that made your code appear to work.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
"Just because the box has 2 gigabytes of memory doesn't mean you get to use it all!"
-- Rico Mariani, CLR perf guy
|
|
|
|
|
Thanks all! I'll take your advices!
But... I always thought ^ was exponent... And, is 102400 a lot? 102.4 KB... And I do it because one never knows how much bytes a file has... or is there a way to know?
Thanks!
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
|
|
|
|
|
^ is often used in a text environment (like message boards) to mean exponent, however in C it means bitwise XOR.
10244 = 1099511627776, or 1.1 trillion bytes.
You can call GetFileSize() to get the length.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
"Just because the box has 2 gigabytes of memory doesn't mean you get to use it all!"
-- Rico Mariani, CLR perf guy
|
|
|
|
|
|
|
|
the function
CWebBrowser2::Navigate(url)
displays an error message-box if url doesn't exist.
is there any idea to avoid (or do not display) the message-box?
includeh10
|
|
|
|
|
|
what is the use of the CImageIterator
|
|
|
|
|
Having absolutely no clue about what you're actually talking about, since you provide zero context to a complete non-question, I'd give this sound guess:
An abstrcation of iteration through the pixels of an image.
--
The Blog: Bits and Pieces
-- modified at 5:34 Sunday 27th November, 2005
|
|
|
|
|
I am sorry,I can't use English well.My mean is that there is a CImageIterator class in CxImage, and what's use of this class?
|
|
|
|