|
Hello Sreedevi,
The same problem happened to me. Hopefully you have found the solution
by now as it is August, but in case you have not, be sure that your post build activities
(moving a file from the target path to the /lib path) do not have any spaces in the
path.
|
|
|
|
|
Hi,
I have created one dialog in my MFC application.I have added vertical scroll bar to my dialog.I am displaying Images on dialog.Client area of dialog should scroll when I scroll Scroll bar.I am using Visual Studio 2005.
I have added following line to OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) function.
ScrollWindow(0,-CurPos,CRect(0,0,1100,1100));
I am displaying 8 small Images as two rows on my dialog.After one scroll
Window is moving but window is showing some unwanted lines(Actually I am not printing any Images after 8 Images) .Can anyone help me.
|
|
|
|
|
|
Hello All,
I am want to convert the length of a string to a Hexa-Decimal number as a 16 Bits. So Using the _itoa(cLengthOfString,strlen(strSource),16)
where cLengthOfString is char [5] and strSource is a char *
but when i observe the destination string is having length represented in 8-bits character, I want it in 16 bits character, for e.g., xFFFF should utilize only 2 bytes, instead of 4 bytes.
Thanks,
Neelesh K J Jain.
|
|
|
|
|
To represent a integer in the range {0,65535} as hexadecimal (ANSI ) string you need 4 characters.
The binary encoding of such a number is (of course) 16 bits (i.e. 2 bytes) wide.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Neelesh K J Jain wrote: for e.g., xFFFF should utilize only 2 bytes, instead of 4 bytes.
What? How the hell is that going to happen?
Run the following code and see if you get a clue.
char buf[5];
itoa( 0xf, buf, 16);
cout << buf << endl;
itoa( 0xff, buf, 16);
cout << buf << endl;
itoa( 0xfff, buf, 16);
cout << buf << endl;
itoa( 0xffff, buf, 16);
cout << buf << endl;
|
|
|
|
|
Hi all
A quick question,
I have built an MFC application and embedded a web browser control. How do I know the type of the webpage accessed, whether animated or html based?
Thanks
llp00na
|
|
|
|
|
llp00na wrote: I have built
"have" as in past tense?
llp00na wrote: How do I know the type of the webpage
Don't you think that might have been something to study before developing the application?
You could parse the HTML to find any information you require. Also there are HTTP headers that might contain information you require. If either of those are something you don't understand then you should consider starting to read (about them) and leave off the internet forums for a while. Both subjects are well documented and the documentation is freely available on the internet.
|
|
|
|
|
Let me try again
I know what HTML and HTTP headers are.
I am trying to detect this automatically. Let's say the user types in the URL of a website, I want the application to report back to him:
The website you entered is "Fully nnimated"
Or
The website you entered is "HTML-Based"
You got my question now???
llp00na
|
|
|
|
|
llp00na wrote: You got my question now???
Maybe. And maybe I don't care a bit about.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
What do you mean by 'animated'?
Also, pretty much all web-pages have at least an outer layer of HTML, no matter what their content.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I meant, flash-based. I.e. they heavily use flash animation for interactivity.
llp00na
|
|
|
|
|
Right - in that case, you probably want to parse the HTTP response (which is overwhelmingly likely to be HTML) and see if it has an instance of the Flash player object embedded in it.
How do you identify the Flash object? I'd suggest looking at the HTML for pages that use Flash (load them in your browser and view the page source - the Flash object instance should be reasonably easily detectable).
How do you differentiate between pages that use Flash for the majority of their content and pages that just have Flash adverts? Good question - I don't know.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
My main concern really is to detect the pages that use Flash for the majority of their content.
Thanks for the try though
llp00na
|
|
|
|
|
llp00na wrote: Thanks for the try though
Thanks for the try? Really? That is the answer to your question, period. Not surprisingly it's the same one I gave you. You seem to want us to believe that you have a clue about what you are doing. The problem is that your post don't indicate that in any way.
|
|
|
|
|
What is an animated web site ? a fully flash (or silverlight) site ? or something else ?
This signature was proudly tested on animals.
|
|
|
|
|
An animated website is a flash-based website. All/ Major content is flash.
llp00na
|
|
|
|
|
After parsing the html source, how can you decide that the major content of a page is in flash or not ?
This signature was proudly tested on animals.
|
|
|
|
|
How can you do that?
llp00na
|
|
|
|
|
Website is a display. While some people unfortunately use diagonals to measure displays, I prefer width and height attributes. Fortunately, so do <object>s in webpages, usually.
All that's left to do is pick a "total area" number, & compare.
|
|
|
|
|
Thats good idea which I started to implement now
Thanks
llp00na
|
|
|
|
|
llp00na wrote: Thats good idea
Really, it's a good idea now, it just wasn't a good idea the first two times people gave it to you? What a frakin monkey.
|
|
|
|
|
Given this...
class CTopDlg : public CDialog {
...
then this works...
HBRUSH CTopDlg::OnCtlColor(CDC*,CWnd*,UINT){
HBRUSH ret = CDialog::OnCtlColor(...)
...
return ret
}
but if I try this...
class CDerivedDlg : public CTopDlg {
...
then this does _not_ work...
HBRUSH CDerivedDlg::OnCtlColor(CDC*,CWnd*,UINT) {
HBRUSH ret = CTopDlg::OnCtlColor(...)
...
return ret
}
OnCtlColor is declared virtual in my CTopDlg class, and is also in a protected: section. It is _not_ virtual and _is_ protected in CDialog. The error is based on the rules of C++, but how did CTopDlg compile?
|
|
|
|
|
brain fart.. here's why in case you wasted your time with my first post, or you looked this up:
make OnCtlColor not virtual in CTopDlg. Then it isn't overwritten by CDerivedDlg::OnCtlColor, and CTopDlg::OnCtlColor(...) is a valid reference inside the CDerivedDlg version.
|
|
|
|
|
CTopDlg::OnCtlColor should be a valid reference within CDerivedDlg even if it is declared virtual. It tells the compiler explicitly to call OnCtlColor as if this had type CTopDlg.
It certainly works in VS2008 and g++4.0.1
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|