Author Topic: wxWidgets XP look  (Read 2372 times)

Offline Nonenix

  • Multiple posting newcomer
  • *
  • Posts: 11
wxWidgets XP look
« on: June 10, 2007, 04:38:40 pm »
Hi i wanted to aks why the apps made with Codeblocks and wxwidgets have xp look ?

i wanted to get into makefiles and stuff to code for linuy and windows i also dowloaded the wx-config command port for windows to make project files for both systems (see )

but by startig to learn how to compile manually with g++ with a batch script my app looked different that the same compiled with same compiler with CB

here the example batch for my project with tinyxml (sorry its rather hacked ;)
Code: [Select]
#g++ -c -Wall -Wno-format WebCheckerApp.h -o a.o -mthreads -DHAVE_W32API_H -D__WXMSW__ -D_UNICODE -IC:\wxWidgets-2.8.3\lib\gcc_lib\mswu -IC:\wxWidgets-2.8.3\include -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -mthreads -LC:\wxWidgets-2.8.3\lib\gcc_lib -lwxmsw28u_xrc -lwxmsw28u_html -lwxmsw28u_adv -lwxmsw28u_core -lwxbase28u_xml -lwxbase28u_net -lwxbase28u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
#g++ -c -Wall -Wno-format WebCheckerMain.h -o b.o -mthreads -DHAVE_W32API_H -D__WXMSW__ -D_UNICODE -IC:\wxWidgets-2.8.3\lib\gcc_lib\mswu -IC:\wxWidgets-2.8.3\include -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -mthreads -LC:\wxWidgets-2.8.3\lib\gcc_lib -lwxmsw28u_xrc -lwxmsw28u_html -lwxmsw28u_adv -lwxmsw28u_core -lwxbase28u_xml -lwxbase28u_net -lwxbase28u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
g++ -c -Wall -Wno-format WebCheckerApp.cpp -o c.o -mthreads -DHAVE_W32API_H -D__WXMSW__ -D_UNICODE -IC:\wxWidgets-2.8.3\lib\gcc_lib\mswu -IC:\wxWidgets-2.8.3\include -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -mthreads -LC:\wxWidgets-2.8.3\lib\gcc_lib -lwxmsw28u_xrc -lwxmsw28u_html -lwxmsw28u_adv -lwxmsw28u_core -lwxbase28u_xml -lwxbase28u_net -lwxbase28u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
g++ -c -Wall -Wno-format WebCheckerMain.cpp -o d.o -mthreads -DHAVE_W32API_H -D__WXMSW__ -D_UNICODE -IC:\wxWidgets-2.8.3\lib\gcc_lib\mswu -IC:\wxWidgets-2.8.3\include -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -mthreads -LC:\wxWidgets-2.8.3\lib\gcc_lib -lwxmsw28u_xrc -lwxmsw28u_html -lwxmsw28u_adv -lwxmsw28u_core -lwxbase28u_xml -lwxbase28u_net -lwxbase28u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
#g++ -c -Wall -Wno-format GUIDialog.h -o e.o -mthreads -DHAVE_W32API_H -D__WXMSW__ -D_UNICODE -IC:\wxWidgets-2.8.3\lib\gcc_lib\mswu -IC:\wxWidgets-2.8.3\include -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -mthreads -LC:\wxWidgets-2.8.3\lib\gcc_lib -lwxmsw28u_xrc -lwxmsw28u_html -lwxmsw28u_adv -lwxmsw28u_core -lwxbase28u_xml -lwxbase28u_net -lwxbase28u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
g++ -c -Wall -Wno-format GUIDialog.cpp -o f.o -mthreads -DHAVE_W32API_H -D__WXMSW__ -D_UNICODE -IC:\wxWidgets-2.8.3\lib\gcc_lib\mswu -IC:\wxWidgets-2.8.3\include -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -mthreads -LC:\wxWidgets-2.8.3\lib\gcc_lib -lwxmsw28u_xrc -lwxmsw28u_html -lwxmsw28u_adv -lwxmsw28u_core -lwxbase28u_xml -lwxbase28u_net -lwxbase28u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
g++ -c -Wall -Wno-format   tinyxml.cpp -o tinyxml.o
g++ -c -Wall -Wno-format   tinyxmlparser.cpp -o tinyxmlparser.o
g++ -c -Wall -Wno-format   tinyxmlerror.cpp -o tinyxmlerror.o
g++ -c -Wall -Wno-format   tinystr.cpp -o tinystr.o
g++ -o test2.exe tinyxml.o tinyxmlparser.o tinyxmlerror.o tinystr.o d.o c.o f.o  -mthreads -DHAVE_W32API_H -D__WXMSW__ -D_UNICODE -IC:\wxWidgets-2.8.3\lib\gcc_lib\mswu -IC:\wxWidgets-2.8.3\include -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -mthreads -LC:\wxWidgets-2.8.3\lib\gcc_lib -lwxmsw28u_xrc -lwxmsw28u_html -lwxmsw28u_adv -lwxmsw28u_core -lwxbase28u_xml -lwxbase28u_net -lwxbase28u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32

i looked for all defeines and stuff in  the codeblocks project file included all linker defines like:
Code: [Select]
#define __WXMSW__
#define __GNUWIN32__

but still no xp look without an app.exe.manifest file with i couldn't find in the CB project folder so how is the trick done o.O

PS: ah yeah i forgot i also have commandpromt opened when i start the app i self compiled how is the trick done to let this vanish ;) ?

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: wxWidgets XP look
« Reply #1 on: June 10, 2007, 05:07:59 pm »
You need to compile a resource file (see windres for mingw) containing
Code: [Select]
#include "wx/msw/wx.rc" or your own manifest data.
So manifest data is included in the resource section of the executable.


Offline Nonenix

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: wxWidgets XP look
« Reply #2 on: June 10, 2007, 05:44:45 pm »
ahh guess resource.rc was the last file i didn't handle ;) just thoudgt i dont need the icon so i cut it ..

but still i coulnt handle the rc file looked an windres but all i acived was to mess up my exe or to let g++ print out errors the simple include didn't work that made the bigges lsit of misstakes ;) and i couln't find a good tut for windress just the parameters and i don't know where to put the output (google couln't help me too)

but thx for the hint