Regarding CHyperLink example
-
Hello all, I have taken static text which work as hyperlink. It is working properly but I want to destroy dialog box on which i have put this static text. I am setting URL at run time when user click on it. so just I want to download specific file from URL and at the same time to unload dialog box. How couls i do this? Any help is greatly appreciated. Regards, Hemang
-
Hello all, I have taken static text which work as hyperlink. It is working properly but I want to destroy dialog box on which i have put this static text. I am setting URL at run time when user click on it. so just I want to download specific file from URL and at the same time to unload dialog box. How couls i do this? Any help is greatly appreciated. Regards, Hemang
You've got a bunch of ways to do this. Have a look at InternetOpenUrl, InternetReadFile, etc for getting the actual file. There are almost certainly articles in the internet section here on codeproject that do a better job too. How you implement it is up to you, but getting files over an unreliable connection is always hard. What if the user gave you a bad URL? Malformed? If you don't need immediate feedback, you could put the reading code into a thread, so you don't make the user wait a random time, and so on. Lots of different things for you to think about, and no trivial solutions, as the answers will depend heavily on the details of your application. Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
-
You've got a bunch of ways to do this. Have a look at InternetOpenUrl, InternetReadFile, etc for getting the actual file. There are almost certainly articles in the internet section here on codeproject that do a better job too. How you implement it is up to you, but getting files over an unreliable connection is always hard. What if the user gave you a bad URL? Malformed? If you don't need immediate feedback, you could put the reading code into a thread, so you don't make the user wait a random time, and so on. Lots of different things for you to think about, and no trivial solutions, as the answers will depend heavily on the details of your application. Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
-
I think I hadnt explained my problem exactly. I got Internet stuff almost done. Actually i want to unload particular dialog box when user click on Link text as I normally do with OK button. so how could i do this? Thanks, Hemang
You'll need the SS_NOTIFY style on the static control to know when the use clicks on it. Then, in a handler for that click message, you can call
EndDialog (SOMECODENUMBER);
to finish the dialog. The DoModal () function will return the SOMECODENUMBER to any variable paying attention. In Win32, it's the same, excepy enddialog wants a window handle. Iain.Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
-
Hello all, I have taken static text which work as hyperlink. It is working properly but I want to destroy dialog box on which i have put this static text. I am setting URL at run time when user click on it. so just I want to download specific file from URL and at the same time to unload dialog box. How couls i do this? Any help is greatly appreciated. Regards, Hemang
Since the dialog class is likely derived from
CDialog
, why not just callEndDialog()
like what happens when OK and Cancel are clicked?"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Since the dialog class is likely derived from
CDialog
, why not just callEndDialog()
like what happens when OK and Cancel are clicked?"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
I have referred to following article for my purpose. http://www.codeproject.com/KB/miscctrl/hyperlink.aspx[^] If you will have look at it then you can easily understand my problem. In this example there is one dialog named "HyperLink Sample". On this dialog there is static text named "mail me" and Ok button is there. This static text is associated with CHyperLink class. I want same functionality but just want to destroy "HyperLink Sample" dialog when someone clicks on it as well as it should work as HyperLink.