I have the problem with the wxHtmlWindow widget...
I posted this before in this thread:
http://forums.wxwidgets.org/viewtopic.p ... l+internet
but mc2r suggested me to create a new thread for this...
and I must say I'm very new to wxWidgets and this is my first attempt to use it...
the wxHtmlWindow widget doesn't connect to the internet, only to local files (sites)...
I always get an error mesage "Unable to open requested HTML documen: {url}" Shocked
and this site definately exist (you can try the URL)...
I have a firewall running and it should ask me if the app shall connect to the internet, but it doesn't !!! Shocked
means it doesn't even try to connect...
even if I disable the firewall completely it doesn't connect...
I'm using:
WinXP pro (sp2)
Code::Blocks (latest nightly) with MinGW/GCC 3.4.5
wxWidgets 2.8.7 (gcc build from wxPack)
I tried with unicode and non unicode DLL (static and monolite not installed)
I used the (in C::B) embeded editor wxSmith and it created this code (I'll post the whole code as far as there's not much in it):
Code: Select all
#include "testMain.h"
#include <wx/msgdlg.h>
//(*InternalHeaders(testFrame)
#include <wx/intl.h>
#include <wx/string.h>
//*)
//helper functions
enum wxbuildinfoformat {
short_f, long_f };
wxString wxbuildinfo(wxbuildinfoformat format)
{
wxString wxbuild(wxVERSION_STRING);
if (format == long_f )
{
#if defined(__WXMSW__)
wxbuild << _T("-Windows");
#elif defined(__UNIX__)
wxbuild << _T("-Linux");
#endif
#if wxUSE_UNICODE
wxbuild << _T("-Unicode build");
#else
wxbuild << _T("-ANSI build");
#endif // wxUSE_UNICODE
}
return wxbuild;
}
//(*IdInit(testFrame)
const long testFrame::ID_HTMLWINDOW1 = wxNewId();
const long testFrame::idMenuQuit = wxNewId();
const long testFrame::idMenuAbout = wxNewId();
const long testFrame::ID_STATUSBAR1 = wxNewId();
//*)
BEGIN_EVENT_TABLE(testFrame,wxFrame)
//(*EventTable(testFrame)
//*)
END_EVENT_TABLE()
testFrame::testFrame(wxWindow* parent,wxWindowID id)
{
//(*Initialize(testFrame)
wxMenuItem* MenuItem2;
wxMenuItem* MenuItem1;
wxMenu* Menu1;
wxMenuBar* MenuBar1;
wxMenu* Menu2;
Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id"));
SetClientSize(wxSize(400,311));
HtmlWindow1 = new wxHtmlWindow(this, ID_HTMLWINDOW1, wxPoint(208,176), wxDefaultSize, wxHW_SCROLLBAR_AUTO, _T("ID_HTMLWINDOW1"));
HtmlWindow1->LoadPage(_("http://abusoft.g0dsoft.com/indexold.html"));
MenuBar1 = new wxMenuBar();
Menu1 = new wxMenu();
MenuItem1 = new wxMenuItem(Menu1, idMenuQuit, _("Quit\tAlt-F4"), _("Quit the application"), wxITEM_NORMAL);
Menu1->Append(MenuItem1);
MenuBar1->Append(Menu1, _("&File"));
Menu2 = new wxMenu();
MenuItem2 = new wxMenuItem(Menu2, idMenuAbout, _("About\tF1"), _("Show info about this application"), wxITEM_NORMAL);
Menu2->Append(MenuItem2);
MenuBar1->Append(Menu2, _("Help"));
SetMenuBar(MenuBar1);
StatusBar1 = new wxStatusBar(this, ID_STATUSBAR1, 0, _T("ID_STATUSBAR1"));
int __wxStatusBarWidths_1[1] = { -1 };
int __wxStatusBarStyles_1[1] = { wxSB_NORMAL };
StatusBar1->SetFieldsCount(1,__wxStatusBarWidths_1);
StatusBar1->SetStatusStyles(1,__wxStatusBarStyles_1);
SetStatusBar(StatusBar1);
Connect(idMenuQuit,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&testFrame::OnQuit);
Connect(idMenuAbout,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&testFrame::OnAbout);
//*)
}
testFrame::~testFrame()
{
//(*Destroy(testFrame)
//*)
}
void testFrame::OnQuit(wxCommandEvent& event)
{
Close();
}
void testFrame::OnAbout(wxCommandEvent& event)
{
wxString msg = wxbuildinfo(long_f);
wxMessageBox(msg, _("Welcome to..."));
}