Im learning to write my own controls and when i use CreateWindowEx on my control everything works, but when i put my control on a dialog it doesnt. Heres the problem...

Im making a url control. In CreateWindowEx, for the window title, it needs a string like this "Mail Me\0mailto:me@you.com\0". The first part is what will be displayed and the second part is the url. Then on WM_SETTEXT, i have this...



invoke lstrcpy, offset szText, lParam
invoke lstrlen, lParam
inc eax
invoke lstrcpy, offset szUrl, lParam+eax


That copies the two strings to two areas of memory. Now when i use createwindowex, the two strings get copied correctly. But when i use it in an rc file, the first string gets copied but the second doesnt.

Is an rc control created diferently than with CreateWindowEx? This is my rc file entry...
CONTROL		"Email Me\0mailto:me@you.com\0", IDC_DIALOG_JEBURL_EMAILJAKE, "JEBURL",

WS_BORDER | WS_CHILD | WS_VISIBLE, 10, 10, 50, 12

Does an rc file only use up to the first \0 or something?
Posted on 2002-03-16 18:37:08 by ChimpFace9000
Hi ChimpFace9000

Try:
CONTROL "Email Me\\0mailto:me@you.com\\0", IDC_DIALOG_JEBURL_EMAILJAKE, "JEBURL",WS_BORDER | WS_CHILD | WS_VISIBLE, 10, 10, 50, 12


KetilO
Posted on 2002-03-16 19:54:56 by KetilO
KetilO: That enters the actual text "\0" into the string, im trying to enter the number 0 so that i can treat it as 2 different strings.
Posted on 2002-03-16 20:13:30 by ChimpFace9000