kk3z
23-06-2004, 11:24
voglio inserire un hyperlink in una dialog box in un programma windows, con annesso colore blu, sottolineato, e la manina quando ci vai sopra :) 
ok a dirlo è semplice, ho trovato questo (http://www.codeguru.com/Cpp/controls/controls/hyperlinkcontrols/article.php/c2185/), è abbastanza chiaro, tranne quando, sotto using the control, scrive "Then, attach it to a member variable of type CHyperLink (ClassWizard makes this very simple). " eh?! Io ho l'id (nel file .rc è impostato come LTEXT "http://xmax.altervista.org",IDC_HYPERLINK1,46,32,116,8, NOT WS_GROUP | WS_TABSTOP) ma non so assolutamente cosa significhi quello che ha detto nè come si fa :eek:
quando provo anche a compilare, mi dà errore nel file hyperlink.h che inizia con
typedef struct tagHYPERLINKCOLORS {
COLORREF crLink;
COLORREF crActive;
COLORREF crVisited;
COLORREF crHover;
} HYPERLINKCOLORS;
class CHyperLink : public CStatic
{
DECLARE_DYNAMIC(CHyperLink)
public:
// Link styles
static const DWORD StyleUnderline;
static const DWORD StyleUseHover;
static const DWORD StyleAutoSize;
static const DWORD StyleDownClick;
static const DWORD StyleGetFocusOnClick;
static const DWORD StyleNoHandCursor;
static const DWORD StyleNoActiveColor;
ecc
e mi dà una caterva di errori a partire da " parse error before `{' token" che si riferisce alla linea "class CHyperLink : public CStatic"
magari è semplicemente il fatto che tutto ciò è per mfc
il bello è che non so neanche se sto usando mfc (che oltretutto nn so cos'è) o le api win32 (ma probabilmente quest'ultime) :rolleyes:
se nn sapete come risolvere il mio problema, se qualcuno è così gentile da almeno spiegarmi cosa è mfc e che differenza c'è con le api win32...
grazie :)
ok a dirlo è semplice, ho trovato questo (http://www.codeguru.com/Cpp/controls/controls/hyperlinkcontrols/article.php/c2185/), è abbastanza chiaro, tranne quando, sotto using the control, scrive "Then, attach it to a member variable of type CHyperLink (ClassWizard makes this very simple). " eh?! Io ho l'id (nel file .rc è impostato come LTEXT "http://xmax.altervista.org",IDC_HYPERLINK1,46,32,116,8, NOT WS_GROUP | WS_TABSTOP) ma non so assolutamente cosa significhi quello che ha detto nè come si fa :eek:
quando provo anche a compilare, mi dà errore nel file hyperlink.h che inizia con
typedef struct tagHYPERLINKCOLORS {
COLORREF crLink;
COLORREF crActive;
COLORREF crVisited;
COLORREF crHover;
} HYPERLINKCOLORS;
class CHyperLink : public CStatic
{
DECLARE_DYNAMIC(CHyperLink)
public:
// Link styles
static const DWORD StyleUnderline;
static const DWORD StyleUseHover;
static const DWORD StyleAutoSize;
static const DWORD StyleDownClick;
static const DWORD StyleGetFocusOnClick;
static const DWORD StyleNoHandCursor;
static const DWORD StyleNoActiveColor;
ecc
e mi dà una caterva di errori a partire da " parse error before `{' token" che si riferisce alla linea "class CHyperLink : public CStatic"
magari è semplicemente il fatto che tutto ciò è per mfc
il bello è che non so neanche se sto usando mfc (che oltretutto nn so cos'è) o le api win32 (ma probabilmente quest'ultime) :rolleyes:
se nn sapete come risolvere il mio problema, se qualcuno è così gentile da almeno spiegarmi cosa è mfc e che differenza c'è con le api win32...
grazie :)