Change your CreateWindowEx to :
SetDlgItemText() wants a handle to the parent window and an ID of the child window. You can either use the handle to your edit window -
html = CreateWindowEx( WS_EX_STATICEDGE | WS_EX_CLIENTEDGE ,
"edit", "", WS_CHILD|WS_VISIBLE|ES_MULTILINE|WS_VSCROLL|WS_HSCROLL|ES_LEFT|ES_AUTOHSCROLL| ES_AUTOVSCROLL,
0, 0, 540, 330 , hWnd, (HMENU) 1, hInst, NULL );
or use your parent handle -
SetWindowText(html,"<a href=""> </a>");
You've defined IDC_NSRT as 1001 but given your edit child window an ID of 1 in your CreateWindowEx() call, so if you want to use IDC_NSRT you'll have to change one of the values.
SetDlgItemText(hWnd, 1,"<a href=""> </a>" );
Nevermind..I got it!
that last reply did it! Thank you for helping me!
I am assuming this is in a callback function. You may need to set the HWND to a static. Many messages pass thru the callback and it will have lost the value before the next msg is processed.
Try GetActiveWindow() as this will return the HWND of the dlg with the focus.
Test that the Edit has been created ie html!=NULL or can see it on screen. Use GetLastError() if not.
Ensure you are setting the ID (IDC_NSRT) as the HMENU param in the CreateWindowEx, ie
Read the help for this.
Next time look at the second page!!