I am a Windows Programmer, am having peoblem retreving the URL from
the AddressBar of Netscape6

> I am using SendMessage to retrieve the URL from the address bar of the

> browser. The code i'm using for it is:
> ----------------------------------------------------------------------
> -----------------------------------------------------------------
>       TCHAR buf[256];
>       int ret = SendMessage(m_hEditBox,WM_GETTEXT,256,(LPARAM) buf);
>       if(ret)
>       {
>               // get the buf which has the URL from the address bar
>                  and process it here
>       }
>       m_hEditBox has the handle of the AddressBar edit box
> ----------------------------------------------------------------------
> ------------------------------------------------------------------
> 
> While testing on Windows NT(98,85) and Netscape6, the value i get in buf is 
> not always the current url which is present in the address bar  at the

> time i post SendMessage, some times i get the last url which was 
> visited instead of the current one. It is definete that when i post 
> SendMessage to get the URL in the address bar, the address bar 
> contains the URL i am interested in.
> 
> for eg when i move from yahoo to google, i post for SendMessage only 
> after the title bar changes which is when the page is getting loaded, 
> but  i still get yahoo in buf instead of google. This behavior is not 
> consistent.
> 
> Can anybody tell me why this is happening? This does not happen with any   
  other browser

> Thanks,
> Sugata
>

Reply via email to