Closed ghost closed 10 years ago
I do not know CodeBlocks. But it seems there is something missing in system SDK header files.
Windows header winuser.h
should define structure DLGTEMPLATE
and there are also usually some typedefs like these:
typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEW;
typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEA;
If the header does not provide just the typedefs, you can workaround by replacing LPCDLGTEMPLATE[W|A]
with const DLGTEMPLATE*
in mCtrl headers and example code.
If definition of the structure DLGTEMPLATE
is not present at all, then the SDK headers distributed with the CodeBlocks are fundamentally incomplete.
I found DLGTEMPLATE but no typedefs so I will try to replace them like you said.
When i change it it still displays same errors in same lines even if LPCDLGTEMPLATE[W|A] is not written anywere
Ok I found some winuser,h that works but now there is another problem. I compile and run my example and I only get press any key to continue in cmd window.
Saying "it does not work" does not help much. Please start by writing proper bug report. There is no oracle here.
What mCtrl version do you use? Or is it something built from git repo? What Windows version do you have? Are you able to build some hello world Windows (not console) program in CodeBlocks or its setup may be completely broken? Do the other mCtrl examples work or everything is broken? Do you build 32bit or 64bit ex_button.exe? How do you build the example? With some Makefile from mCtrl or have you created some "project" for it? What compiler CodeBlocks uses? What compiler/linker options are used when it is built?
I use mCtrl 0.9.6 prebuilt binary package (32bit files) and examples from same version source. Windows 7 Professional SP1 64bit. CodeBlocks for itself works ok. Every example compiles ok and then console window opens and there is press any key bla bla... I try to build 32bit. I made CodeBlocks project and in build options i linked it to libmCtrl.a everything else is on default... GNU GCC.
So it seems you build them as a console application. gcc needs to get option -mwindows
to create GUI applicaition. I have no idea how to do this in CodeBlocks.
Do you know some easier and faster solution to make program that will show just one custom webpage ?
Yes, with other technologiues (MFC, .NET, whatever). However this is complete off topic here.
Closing the "bug" as it seems more about issues with CodeBlocks then mCtrl.
I get these two errors when trying to compile ex_button.c example in CodeBlocks ...\mCtrl\dialog.h|149|error: unknown type name 'LPCDLGTEMPLATEW'| ...\mCtrl\dialog.h|163|error: unknown type name 'LPCDLGTEMPLATEA'| and then both of them again at line 271 and 286 in dialog.h file What to do?