call webbrowser.Navigate within a thread via post message to UI thread
i wan to navigate to a website using my webbrowser2 activeX i made. but i need to run threads to execute a webbrowser.Navigate. because webbrowser.Navigate can only be called by the main user interface thread, inorder to use it from within a browser, i would be using the postmessage command to the main thread with a custom message
heres my custom message
here is the handler for WM_GOWEBSITE
// my custom messages
#define WM_GOWEBSITE (WM_APP + 1)
from within my thread, this is how i posted WM_GOWEBSITE
m_webbrowser.Navigate("yahoo.com", NULL, NULL, NULL, NULL);
after running debug , i am very sure the message got posted. But the problem now in the release version is that the page simply does not load.hovering my mouse over the activeX control i get the "half cursor,half hour glass" mouse cursor. the debug version is fine.
th_thread->PostMessage( WM_GOWEBSITE , 0,0);
does anyone know what is going on?
can anyone please help me? thanks in advance!