EN_LINk problem
-
moin, ich habe ne subclasse, von richedit :
LRESULT CALLBACK ChatControl (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { static HMENU hMenu; // PopUp menu POINT point; // Position int select; switch(msg) { /*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/ case WM_CONTEXTMENU: hMenu = CreatePopupMenu (); InsertMenu (hMenu, 0, MF_BYPOSITION, 0, "Kopieren"); POINTSTOPOINT (point, lParam); if ((point.x == -1) && (point.y == -1)) { point.x = point.y = GetSystemMetrics (SM_CXEDGE); ClientToScreen (hwnd, &point); // Die Koordinaten auf unser Fenster legen } select = (int) TrackPopupMenu (hMenu, TPM_CENTERALIGN|TPM_LEFTBUTTON|TPM_RETURNCMD, point.x, point.y, 0, hwnd, 0); if (select == 0) { // Copy to clipboard } break; /*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/ case WM_NOTIFY: if (wParam == EN_LINK) { MessageBox(NULL, "dfsdf", "dfsdf", MB_OK); ShellExecute(hChat, "open", "http://www.Meine-Hompage.de/cpp", NULL,NULL,SW_SHOWDEFAULT); } break; /*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/ case WM_DESTROY: DestroyMenu (hMenu); PostQuitMessage (0); /* send a WM_QUIT to the message queue */ break; } return CallWindowProc ((WNDPROC) PrevhChat, hwnd, msg, wParam, lParam); }so, jetzt wird in richedit ein link eingefügt, und ich clickt mit der maus drauf aber es passeir nichts
wieso passiert ncihts?pS: mit EM_AUTOURLDETECT werden die links gesucht und auch gefunden ^^
-
MSDN Library schrieb:
To receive EN_LINK notifications, specify the ENM_LINK flag in the mask sent with the EM_SETEVENTMASK message.
Hast du das gemacht?
-
jo, habe das in der Haupt callback:
SendMessage(hChat, EM_SETEVENTMASK, 0, ENM_LINK);