 |
|
 |
hi mOnO, I am writin some new program and I will use your code in my program
it is good code and I like it.
thanks mOnO.
|
|
|
|
 |
|
 |
rava xar bijoooooooooooooo! dzlivs ar gipve!
|
|
|
|
 |
|
|
 |
|
 |
I don't really understand the need for this class. It seems much better to me to just pass a string to a shell function, similar to this:
void CYourAppView::OnBrowser()
{
CString szUrl = "http://www.someurl.com";
int iRes = (int) ShellExecute(NULL, NULL, (LPCTSTR)szUrl, NULL, NULL, 0);
if (iRes <= 32)
else
}
This has the added advantage that you can not only link from buttons, but menu items, list items, or any object that can handle a mouse-click event.
If you want the blue text, etc, on your button, just subclass the button and then have your message handler pass the string var to the shell function.
In business, if two people always agree, one of them is unnecessary.
|
|
|
|
 |
|
|
 |
|
 |
Giorgi Moniava wrote:
Because you have completely not understood what is this class for.
Exactly.. I don't understand the point of the class.
Giorgi Moniava wrote:
CHButton objects are simple buttons , but with an interface of a Hyperlink control.
Okay... so where's the hyperlink "interface" .. I don't see it described in your article. Maybe you mean a hyperlink "appearance" .. but that is not an "interface."
Giorgi Moniava wrote:
If you had a better look at the article you would notice that this class does not even have a function similar to smth like SetURL(...).
Am I missing something? Sir, I've read your article through completely several times now.. The only functions described do cosmetic things like set a cursor, set underline, font color, etc... You are merely subclassing a button at this point -- however, it is still only a button (even if you make it look like hyperlink text). If that's all you are trying to achieve then your project is a "subclassed button" -- but there are hundreds of articles on subclassing buttons.
Understand, I'm not criticizing your project. If you were only trying to create a subclassed button with standard behaviors, but give it the appearance of "hyperlink" text, there is certainly nothing wrong with that -- but both your article and your comments made it sound that you were creating some new and unique way of "hyperlinking" -- and that apparently isn't the case.
So when John Doe downloads your code and includes in his project he just gets a button that looks like hyperlink text... but if he is actually wanting to hyperlink to something, the code is useless to him, unless he knows how to implement the shell functions.
So again... what's the point? ... I guess if you want to open a dialog from a control that looks like hyperlink, then this is the class for you.. Right?? Do I understand you now?
In business, if two people always agree, one of them is unnecessary.
|
|
|
|
 |
|
 |
Douglas R. Keesler wrote:
If you were only trying to create a subclassed button with standard behaviors, but give it the appearance of "hyperlink" text, there is certainly nothing wrong with that --
That is what i wanted
Douglas R. Keesler wrote:
but both your article and your comments made it sound that you were creating some new and unique way of "hyperlinking" -- and that apparently isn't the case.
I have not mentioned anywhere that i was creating a unique way of Hyperlinking , i said that i needed such buttons and could not find them on the net. And it is true, all articles here about Hypelinks ,are Hyperlink controls which are not buttons they are objects of CStatic derived classes who only take you to specified URL-s.
Douglas R. Keesler wrote:
So again... what's the point? ... I guess if you want to open a dialog from a control that looks like hyperlink, then this is the class for you.. Right?? Do I understand you now?
Yes you do
And it is very handy sometimes to use such Hyperlink buttons in your application . For example Visual Studio.Net uses such buttons , for example in the Wizard when creating a simple MFC or another application.
"Success is the ability of going from one failure to another with no loss of enthusiasm" - W.Churchill
|
|
|
|
 |
|
|
 |
|
 |
These are all simple CStatic derived Hyperlink controls who only take you to specified URL-s.
CHButton is a CButton derived class which is a simple button , but with interface of Hyperlink control.
"Success is the ability of going from one failure to another with no loss of enthusiasm" - W.Churchill
|
|
|
|
 |
|
 |
Giorgi Moniava wrote:
These are all simple CStatic derived Hyperlink controls who only take you to specified URL-s.
Which is by definition what a hyperlink is -- a control which takes you to a specified URL.
Giorgi Moniava wrote:
CHButton is a CButton derived class which is a simple button , but with interface of Hyperlink control.
No, there is no "hyperlink interface." It's just a button... that's it -- a subclassed button with blue underlined text.
I think the confusion here Giorgi, is that you keep referring to this hyperlink interface. You may be using the term in the context of a GUI (graphical user interface). If so, you should specify GUI, because we normally think of GUI in relation to an application not a single button, and so to say "interface of Hyperlink control", sounds like you are referring to a programmatical interface which will render hyperlink behavior.
I think that is the primary source of confusion here with readers. You might want to consider rewording your article and it's subtitle to clarify the issue a bit -- eg. 'Hyperlink Appearance with Standard CButton Behavior'
In business, if two people always agree, one of them is unnecessary.
|
|
|
|
 |
|
 |
I did not know that "interface of Hyperlink control", meant a programmatical interface which rendered the hyperlink behavior.
I wanted to say that it looked like a Hyperlink button and that's it.
Anyway thanks, for your remarks i'll have that in mind in future.
"Success is the ability of going from one failure to another with no loss of enthusiasm" - W.Churchill
|
|
|
|
 |
|
 |
Giorgi Moniava wrote:
These are all simple CStatic derived Hyperlink controls who only take you to specified URL-s.
Maybe you want to check those search results again; my particular implementation has been here for 2+ years!
http://www.codeproject.com/miscctrl/jrtslinkctrl.asp[^]
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
 |
|
 |
Hello,
I have two suggestion for you, hope you don't mind it,
#1. Set Option for changing background color of button/hyperlink, though i implement that for myself, but for other user it will be benificial.
#2. Please check source, You had supplied with Article, It contain some minor compiler errors.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
 |
|
|
 |
|
 |
I have used you code in my Current project! hope it work well for me .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
 |
|
 |
nice to hear that !!
|
|
|
|
 |