Guidance Forums / wxWidgets (wxWindows) in C++ / toplevel.h

Search 搜索
Home Home

Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. toplevel.h
Posted by: 2004-02-16 14:53:03
I am very new to use this tool.  My programs run well under wxWindows,
when they  run in this environment, they can't work.   I don't know what happen. I found someone providing a  solution by including wx/msw/winundef.h in the file.  but I don't know which file I need to add?

the compile results as follows:

In file included from D:/Dev-Cpp/include/wx/toplevel.h:159,
                 from D:/Dev-Cpp/include/wx/frame.h:23,
                 from D:/Dev-Cpp/include/wx/wx.h:33,
                 from ../wxcogito/AppModule.h:26,
                 from ../wxcogito/Core.h:19,
                 from ../wxcogito/Core.c++:15:
D:/Dev-Cpp/include/wx/msw/toplevel.h:96: type specifier omitted for parameter

D:/Dev-Cpp/include/wx/msw/toplevel.h:96: parse error before numeric constant

make.exe: *** [../wxcogito/Core.o] Error 1

Execution terminated
Message2. Re: toplevel.h
Posted by: 2004-02-19 13:59:31
i have the same problem, can't find help on it either

Message3. Re: toplevel.h
Posted by: 2004-02-28 17:44:14

i had also an compiler error in toplevel.

It had to to with the createdialog.
(It is a windows macro, which calls createdialoga or createdialogw (unicode)

At the top of the file, I putted #undef createdialog, and then it worked.

Message4. Re: toplevel.h
Posted by: 2004-03-04 05:57:35
I had the same problem using the wxWindows-2.4.2 release with the toplevel.h header file.

If you are using the Visual C++ Compiler, it may be easier to simply edit out the createDialog method with /* */.  A check on the bug list is also in order.
Message5. Re: toplevel.h
Posted by: 2004-07-04 04:03:43
I am also having this problem. I checked the problem on the wxWindows site the solution given is:

wxWindows always includes wx/msw/winundef.h if it has to
include <windows.h> and you should do the same -- because
if you this problem, it means that you include <windows.h>
somewhere yourself.

I added the include directive, however it made no difference as i still get the same error. Someone else suggests adding the following code:

#ifdef CreateDialog
#undef CreateDIalog

But that doesn't work either. Does anyone have a solution to this problem?
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
© Thu 2024-6-20  Guidance Laboratory Inc. Hits:0