Menu

Flash swf in dialog

2005-05-10
2012-09-26
  • Nobody/Anonymous

    Hi, I have completely racked my brain over this and cannot find a "Working" answer. I would like to display a flash movie (.swf) in a dialog in a win32 program I have made. I have found out that I need to host a web brower control. and I have searched for tutorials and/or code to learn how to do this. And I have come up with only huge examples meant for visual C which I do not work with Dev and I have know idea how to convert because the tutorials are for VC.

    So if anyone could pls show an example or a "dev" tutorial on this matter, I would be extremely humble! Thanks!

     
    • Liviu Nicolescu

      Liviu Nicolescu - 2005-05-10

      You might want to try this

      http://nocturnalnetwork.com/ie.htm

      Liviu

       
    • Liviu Nicolescu

      Liviu Nicolescu - 2005-05-12

      You should add "-lole32 -luuid" to your linker options.

      -"l" means -"small L"

      libole32.a is the library where the linker will find OleInitialize, etc and libuui.a contains the IID_IOleObject, etc.

      Liviu

       
    • Nobody/Anonymous

      that is one of about 100 places I have looked at with code that refuses to compile in Dev C. If you can get it to compile, pls share how. Thanks for the help!

       
    • Nobody/Anonymous

      What's your compile log look like after trying to compile the above code?

       
    • Nobody/Anonymous

      Ok here I have compiled the code and fixed the obvious void main() problem to: int main(). This gave me even more errors. Before fix only 12 after 25. Here is the full compile log:

      Compiler: Default compiler
      Building Makefile: "C:\Victors_Stuff\Programming\Class_Magic\Internet Test\Makefile.win"
      Finding dependencies for file: C:\Victors_Stuff\Programming\Class_Magic\Internet Test\IExplore.cpp
      Executing make...
      C:\Dev-Cpp\bin\make.exe -f "C:\Victors_Stuff\Programming\Class_Magic\Internet Test\Makefile.win" all
      C:\Dev-Cpp\bin\g++.exe -c IExplore.cpp -o IExplore.o -I"include/c++/3.3.1/mingw32" -I"include/c++/3.3.1" -I"lib/gcc/mingw32/3.4.2/include" -I"include/c++/3.4.2/backward" -I"include/c++/3.4.2/mingw32" -I"include/c++/3.4.2" -I"include" -I"C:/Victors_Stuff/Programs/Dev_C++/Dev-Cpp/include"

      IExplore.cpp: In function LRESULT WndProc(HWND__*, UINT, WPARAM, LPARAM)': IExplore.cpp:302: warning: converting to non-pointer typeLRESULT' from NULL
      IExplore.cpp: In function int main()': IExplore.cpp:311: warning: converting to non-pointer typeint' from NULL

      IExplore.cpp:313: warning: converting to non-pointer type int' from NULL IExplore.cpp:322: warning: converting to non-pointer typeUINT' from NULL
      IExplore.cpp:328: warning: passing NULL used for non-pointer converting 3 of BOOL GetMessageA(tagMSG*, HWND__*, UINT, UINT)' IExplore.cpp:328: warning: passing NULL used for non-pointer converting 4 ofBOOL GetMessageA(tagMSG, HWND__, UINT, UINT)'

      C:\Dev-Cpp\bin\g++.exe IExplore.o -o "Internet Test.exe" -L"lib" -mwindows

      IExplore.o(.text+0xa9):IExplore.cpp: undefined reference to OleInitialize@4' IExplore.o(.text+0x2a3):IExplore.cpp: undefined reference toIID_IUnknown'
      IExplore.o(.text+0x2ba):IExplore.cpp: undefined reference to CLSID_WebBrowser' IExplore.o(.text+0x2c6):IExplore.cpp: undefined reference toCoCreateInstance@20'
      IExplore.o(.text+0x30d):IExplore.cpp: undefined reference to IID_IOleObject' IExplore.o(.text+0x3f5):IExplore.cpp: undefined reference toIID_IOleInPlaceObject'
      IExplore.o(.text+0x54d):IExplore.cpp: undefined reference to IID_IConnectionPointContainer' IExplore.o(.text+0x5a1):IExplore.cpp: undefined reference toDIID_DWebBrowserEvents2'
      IExplore.o(.text+0x687):IExplore.cpp: undefined reference to IID_IWebBrowser2' IExplore.o(.text+0x7ef):IExplore.cpp: undefined reference toOleInitialize@4'
      IExplore.o(.text+0x9e9):IExplore.cpp: undefined reference to `IID_IUnknown'

      IExplore.o(.text+0xa00):IExplore.cpp: undefined reference to CLSID_WebBrowser' IExplore.o(.text+0xa0c):IExplore.cpp: undefined reference toCoCreateInstance@20'
      IExplore.o(.text+0xa53):IExplore.cpp: undefined reference to IID_IOleObject' IExplore.o(.text+0xb3b):IExplore.cpp: undefined reference toIID_IOleInPlaceObject'
      IExplore.o(.text+0xc93):IExplore.cpp: undefined reference to IID_IConnectionPointContainer' IExplore.o(.text+0xce7):IExplore.cpp: undefined reference toDIID_DWebBrowserEvents2'

      IExplore.o(.text+0xdcd):IExplore.cpp: undefined reference to IID_IWebBrowser2' IExplore.o(.text+0xf74):IExplore.cpp: undefined reference toOleUninitialize@0'
      IExplore.o(.text+0x1014):IExplore.cpp: undefined reference to OleUninitialize@0' IExplore.o(.text+0x1087):IExplore.cpp: undefined reference toIID_IUnknown'
      IExplore.o(.text+0x10a8):IExplore.cpp: undefined reference to IID_IOleClientSite' IExplore.o(.text+0x10cc):IExplore.cpp: undefined reference toIID_IOleInPlaceSite'
      IExplore.o(.text+0x10f0):IExplore.cpp: undefined reference to `DIID_DWebBrowserEvents2'
      collect2: ld returned 1 exit status

      C:\Dev-Cpp\bin\make.exe: *** ["Internet] Error 1

      Execution terminated

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.