12345678910111213141516171819202122232425262728293031 |
- ////////////////////////////////////////////////////////////////
- // PixieLib(TM) Copyright 1997-2000 Paul DiLascia
- // If this code works, it was written by Paul DiLascia.
- // If not, I don't know who wrote it.
- //
- // CHyperlink implements a simple text hyperlink
- //
- #ifndef _HYPRILNK_H
- #define _HYPRILNK_H
- //////////////////
- // Simple text hyperlink derived from CString
- //
- class CHyperlink : public CString {
- public:
- CHyperlink(LPCTSTR lpLink = NULL) : CString(lpLink) { }
- ~CHyperlink() { }
- const CHyperlink& operator=(LPCTSTR lpsz) {
- CString::operator=(lpsz);
- return *this;
- }
- operator LPCTSTR() {
- return CString::operator LPCTSTR();
- }
- virtual HINSTANCE Navigate() {
- return IsEmpty() ? NULL :
- ShellExecute(0, _T("open"), *this, 0, 0, SW_SHOWNORMAL);
- }
- };
- #endif
|