Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Opening Documents (webpages and PDFs) in a Dialog Browser
#1
Hi Gintaras,

I have a dialog with a webbrowser control in it. It has worked fine for bringing up webpages with the following code:

Function dlg_MultiJournalTabbedBrowserDialog
Code:
Copy      Help
web  SampleUrlString 0x0 hDlg

It also works when the SampleUrlString is a filepathname to a document such as a Word.doc or PDf (.pdf).

The only problem is that when I try to open another file into that same dialog control after opening anything other than a web page (i.e. after I open a pdf into it), it no longer recognizes that there is a web browser available i.e. (named after the hDlg). I don't know how to specify that it is ok to still open in that dialog control. I have tried changing hDlg into child window name but it doesn't work...

I hope I explained this ok.

I am choosing the file to load from a listbox dialog also in the same dialog as below..

Macro Macro9
Code:
Copy      Help
case LBN_SELCHANGE<<16|14
,int SearchListIndex = LB_SelectedItem(id(14 hDlg))
,web SearchListArray[SearchListIndex 1] 0x0 hDlg


SearchListArray[SearchListIndex 1] contains the full file path so I don't have to list that in the listbox

Thanks for any advice !!!!
Stuart
#2
setwintext seems to work....!!!!
saw this in comments section in Dialog_with_web_browser from the Resources page.

Thanks!!!!
Stuart


Forum Jump:


Users browsing this thread: 1 Guest(s)