• Welcome to Jose's Read Only Forum 2023.
 

MIDI WEB BROWSER Example

Started by Douglas Martin, March 14, 2016, 04:11:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Douglas Martin

I am trying to get the MIDI Web Browser example to run.(13 Web Development / MDI Web Browser)  The web page never renders.  I put some Trace diagnostics in the following code and determined that wszURL is empty.  If I put in a hardcoded URL it works fine.
Anyone have any ideas why this is not working?  Using PBWIN10 compiler on a 64-bit windows 8 machine?  I installed the latest WINAPIJRS 1.07.

            CASE %IDC_GOBTN
               IF HI(WORD, wParam) = %BN_CLICKED THEN
                  ' // Get the Url
                  hCtrl = GetDlgItem(GetDlgItem(hwnd, %IDC_REBAR), %IDC_EDITURL)
                  Call PTTrace("hCtrl="+Str$(hCtrl))
                  GetWindowText hCtrl, wszUrl, SIZEOF(wszUrl)
                  Call PTTrace("wszUrl="+wszUrl)
'                 IF wszUrl = "" THEN EXIT FUNCTION
                  wszUrl="www.cnet.com"
                  vUrl = wszUrl
Doug

José Roca

Any reason to change the original code, wszUrl = AfxGetWindowText(hCtrl), with GetWindowText hCtrl, wszUrl, SIZEOF(wszUrl) ?

Check the return value of GetWindowText.