From: carlos g. <car...@gm...> - 2010-04-05 18:08:22
|
Interesting, but I don't know how to fix. Maybe you can use the wxHtmlWindow of WxCore, it is an html engine too. You can see http://hsbrowser.wordpress.com/2010/04/05/using-wxhtmlwindow-with-wxhaskell/ I hope this help. -- carlos On 5 April 2010 10:17, Konstantin Chugalinskiy <kch...@gm...>wrote: > Hello, wxHaskell community! > > I need to embed web control into my application under Windows 7. I am > trying to use wxWebconnect ( > http://www.kirix.com/labs/wxwebconnect/documentation/getting-started.html ) > library with Gecko engine for this. > Haskell code: > foreign import stdcall unsafe "_browserFrame" > c_browserFrame :: Ptr a -> IO(Ptr ()) > > main :: IO () > main > = start gui > > gui :: IO () > gui = do > f <- frame [text := "Hello world!", size := (sz 600 600) ] > withObjectPtr f c_browserFrame > return () > > where browser frame looks like > C++ code: > void* __stdcall browserFrame (wxFrame* ptrWxWindow) > { > wxString xulrunner_path = FindXulRunner(wxT("xr")); > wxString dir(wxT("\\plugins")); > wxWebControl::InitEngine(xulrunner_path); > wxWebControl::AddPluginPath(dir); > wxWebControl* ptrBrowser = new wxWebControl(ptrWxWindow, wxID_WEB, > wxPoint(0,0), wxSize(600,600)); //Here error comes from > return ptrWxWindow; > } > it is compiled as dll by MS Visual 2008 and linked to Haskell program. > > Also it looks like CreateControl execution fails. > It should be mentioned that ptrWxWindow can be operated with no errors (I > mean hiding, resizing etc) and no any other kind of control can be created > (wxButton, wxLabel). > If first parameter to c_browserFrame (parent window) is objectNull then > everything is ok with no changes to gui. I can't understand what is wrong > with ptrWxWindow param when passed from Haskell. > typeid(ptrWxWindow).name() shows expected type of ptrWxWindow - wxFrame. > > What am I doing wrong? Please help me. Or maybe can you help me using your > wxdirect subsystem to add this control to wxHaskell? > > with best regards, > Chugalinskiy Konstantin > kch...@gm... > Jabber: kos...@ja... > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > wxhaskell-users mailing list > wxh...@li... > https://lists.sourceforge.net/lists/listinfo/wxhaskell-users > > |