Web page memory
-
hello, You know if it is posible to know where are stored in memory the pixels of a web page ? and if yes how ? thx in advance
-
I think you'll need to be a bit clerer on this question... jeremysay wrote: hello, You know if it is posible to know where are stored in memory the pixels of a web page ? and if yes how ? thx in advance Obseve everything, remember more...
tom76 wrote: I think you'll need to be a bit clerer on this question... yes sorry :( In fact i'm working with CHtmlView, and i want to know if it is possible to get all pixels state of web page from memory (RAM), i don't want to use GetPixel or.... I hope you understand PS : excuse for bad english :((
-
tom76 wrote: I think you'll need to be a bit clerer on this question... yes sorry :( In fact i'm working with CHtmlView, and i want to know if it is possible to get all pixels state of web page from memory (RAM), i don't want to use GetPixel or.... I hope you understand PS : excuse for bad english :((
I assume you are trying to dynamically change the HTMLView window (the Internet Explorer activeX object you drop onto a dialog in Visual Studio's editor), am I right? Look at how you set the pixels (width and height) and maybe attach a global variable to it, and getting the address of the variable and use it that way... I don't really know, usually I stick to variables and don't bother getting it from RAM in the way I think you want. Obseve everything, remember more...
-
hello, You know if it is posible to know where are stored in memory the pixels of a web page ? and if yes how ? thx in advance
You probably can't. I assume the HTML view simply stores the HTML data which it renders as it needs to. It wouldn't store the individual pixel states. If you want to get an "image" in a device context, you can try getting the HTML view to print itself. Send it a WM_PRINTCLIENT message with the wParam holding the handle of the device context to print into. Using MFC:
CWnd *pWndHTML; // A pointer to the HTML view window
CDC dc; // A device context to draw into
// Get the correct window handle and setup the device context here
pwndHTML->SendMessage(WM_PRINTCLIENT, (WPARAM)dc.GetSafeHdc(), PRF_ERASEBKGND | PRF_CLIENT);
// The device context should hold a copy of the contents of the viewKeep in mind that this will only get the visible part of the view, not the whole document (unless it fits completely in the window). Hope this helps, Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact" -
You probably can't. I assume the HTML view simply stores the HTML data which it renders as it needs to. It wouldn't store the individual pixel states. If you want to get an "image" in a device context, you can try getting the HTML view to print itself. Send it a WM_PRINTCLIENT message with the wParam holding the handle of the device context to print into. Using MFC:
CWnd *pWndHTML; // A pointer to the HTML view window
CDC dc; // A device context to draw into
// Get the correct window handle and setup the device context here
pwndHTML->SendMessage(WM_PRINTCLIENT, (WPARAM)dc.GetSafeHdc(), PRF_ERASEBKGND | PRF_CLIENT);
// The device context should hold a copy of the contents of the viewKeep in mind that this will only get the visible part of the view, not the whole document (unless it fits completely in the window). Hope this helps, Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact" -
Thx for you answer ! I thought to this solution but i can't get all pixel state od the page only those there are display. So for me it is a problem
What do you need to get the pixel state for? There may be another way to solve your problem (without getting the pixel state). Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"