 |
|
 |
On Windows XP and above you can use a SysLink Control instead.
|
|
|
|
 |
|
 |
i thank you for your codes, but i found a bug, so i correct it with my code
as below:
// Release the font that we are using for the URL
VOID CloseLink(VOID) {
if(g_hFontURL) DeleteObject(g_hFontURL);
if(g_hwndTT) DestroyWindow(g_hwndTT); // Add by cheungmine@gmail.com
}
|
|
|
|
 |
|
 |
I just tried to port the " Win32 C based approach of an essential Hyper Link Control for dialog box " onto the WInce ... it worked fine for me .. but i just cannot get the link to match the background ...
i mean to say
"SetBkMode(lpdis->hDC, TRANSPARENT);"
just dint work the way it did on Win32 platform..
what shud i do to get the buttons with the link match the background...
Thanks & Regards
|
|
|
|
 |
|
|
 |
|
 |
yeah thats right as far as all the documentation goes this feature should work fine in wince .. but its not working out for me ..
i dint get linking of the coredll part and also can u put some light on how exactly i can get the background colo r changed...
hope u really dont mind .... i am still very much an amateur and would appreciate any bit of help ..
thanks and Regards
|
|
|
|
 |
|
 |
hello there ..
i just checked on the linking of the coredll.lib part... the linking has been done just right ..
so please ignore my query about the coredll.lib... i guess there is something else thats going wrong...
waiting for some inputs ...
Thanks and Regards....
|
|
|
|
 |
|
 |
Try to replace that function to:
SetBkColor(lpdis->hDC, GetSysColor(COLOR_BTNFACE));
|
|
|
|
 |
|
 |
hello there ..
thanx a ton mate... i was just able to achieve the thing with the piece of tip u had given ..
i used
SetBkColor(lpdis->hDC, GetSysColor(COLOR_WINDOW));
instead of the
SetBkColor(lpdis->hDC, GetSysColor(COLOR_BTNFACE));
that u had suggested ...
it works just fine for me ..
i was actually working backwards on how the hyper link is implemented for a browser..
next i am on to the event capturing mechanism of the hyperlink and how it is inturn given to the network layer to fetch the page ..
If u have in inputs on the same i would appreciate that ..
i must say the code u had written for win32 was one of the easiest and best approach i had seen ..
thanx and please pass on ur valued inputs..
|
|
|
|
 |
|
 |
Thanks.
Let's see.
Good luck.
|
|
|
|
 |
|
 |
hello there...
was just trying to achieve the transparency with the createwindow function ... the setbk doesnt work the same way as it did when i used it in combination with ExtTextOut()...
any specific reason for the same .... how do i the transparency with createwindow()?
Thanks and Regards...
|
|
|
|
 |
|
 |
The SetBkColor works for the text output and so on.
For the window's background, you might need to redraw it by yourself.
I think capture WM_PAINT message and use FillRect to redraw the whole window area.
Good luck.
|
|
|
|
 |
|
 |
Hi ..
the createwindow thing is working fine too... i have just done up with the hyperlink thing...
thanx for ur valuable inputs...
I just wanted to ask whether u have any clue as to how do we render images that are found in a web page ..
I just wanted to know a brief idea about how exactly the image is downloaded and stored and finally rendered...
Any inputs ..please pass on..
Thanx and Regards....
|
|
|
|
 |
|
 |
That's great news.
Regarding to your question. I personally think it's a little bit confusing.
Usually, web image rendering is part of HTML page rendering and Web Browser will take care of it.
If you want to render the image by yourself, just store images to local temp directory and use image library (JPEG/BMP/PNG/GIF...) to decode to raw image buffer and then display it by using window's GDI function.
|
|
|
|
 |
|
 |
Oh... I am sorry if my question was bit confusing...
Actually I was looking into how exactly the <img> tag would be handled...
I am currently trying to implement how exactly the image would be downloaded on coming across an IMG tag in a HTML..
Basic idea was to gradually build a browser .. so i was catching up on features of browser like hyperlink,Image rendering....
I would like to know how the images are queued up for downloading ...
What are the series of events that occur when we come across the IMG tag in a HTML...
I guess if we go by the generic architecture we have something called the Download Manager...
Can u shed some light on the same....
Thanx and Regards.....
|
|
|
|
 |
|
 |
First of all. I'm not expert of HTML engine.
But my suggestions are:
1. There are a lot of OpenSource HMTL engine avaialble and you can refer to them for details.
2. Form my point of view, the straight forward implementation can be:
=> Get the URL file, parse it and according to the HTML gramma, draw Text & graphics on your display area.
=> Get all other files' URL (images...), Get all those files and draw them to the appropriate location of your display area.
=> You might need to use multi-thread to get couple images simotaniously.
But I believe a good browser is very compliate to implement. Good luck.
|
|
|
|
 |
|
 |
thanx a lot for those suggestions of urs..
i will try to work on those grounds ....
But my main aim right now is when i parse teh document i will come across some img tags... now how do i acquire these images...
Do i wonload them immediately on parsing and store them in a buffer so tat i can retrieve them later or when do i trigger a download for all the images that i come across in the HTML file...
|
|
|
|
 |
|
 |
I guess one approach can be: (Also the observation of current browser's behaviour)
1. After parsed HTML file, generate a list of image file, sort of FIFO queue.
2. Open around 5-10 concurrent threads to get the images by FIFO manner until the list has been cleared.
* In 2, you might want to set a timeout value.
|
|
|
|
 |
|
 |
hi there ..
i was just bale to parse the document and search for al the img tags and store them in a queue... these have been indexed so that later when the renderer actually wants the images i can download them.....
thanx again for ur inputs...
i was able to get the bmp image displayed ...
any inputs on how to render or actually decode the jpeg and gif...
thanx and regards....
|
|
|
|
 |
|
 |
JPEG: Windows can handle JPEG image directly, refer to MSDN.
Another way is by using jpeg6 lib which provide you decoding of JPEG.
GIF & other formats: You need corresponding decoding libraries.
Refer to this project:
http://www.codeproject.com/bitmap/cximage.asp[^]
|
|
|
|
 |
|
 |
hello...
I was looking for some help on how the event management is done in browser...events can be anything from keyboard to focus... to everything..
can i get any inputs ??????
|
|
|
|
 |
|
 |
I only can say what is in my mind. Maybe not correct.
I think you should handle all those Windows Messages and then make some
corresponding actions.
|
|
|
|
 |
|
 |
Hmm.. till no i must say all inputs from ur end have been fruitful to me .. so i was just hoping to get some lead from u on this..
may be some piece of code that u have come across which wud help me to build on the event management for browser...
thanx for ur inputs..
hoping to get some reply....
|
|
|
|
 |
|
 |
Basically, MSDN is the best to refer to.
Check Platform SDK in MSDN about windows message system.
You'll learn more.
|
|
|
|
 |
|
 |
You code also shows how lean Windows programming can be!
|
|
|
|
 |