Code::Blocks Forums

User forums => Help => Topic started by: Pecan on January 24, 2007, 05:18:58 pm

Title: Where are MSwindows hdrs comming from?
Post by: Pecan on January 24, 2007, 05:18:58 pm
When I make a new project and use windows variables, where are they comming from.

For example, I make a stub pluging from the wizard and included the following lines:

Code
void stub::OnAttach()
{
// do whatever initialization you need for your plugin
// NOTE: after this function, the inherited member variable
// m_IsAttached will be TRUE...
// You should check for it in other functions, because if it
// is FALSE, it means that the application did *not* "load"
// (see: does not need) this plugin...

    int testing = VK_SHIFT;

}


It compiles fine. But how? VK_SHIFT is defined in winuser.h in the mingw includes. But I never used a #include for it.

How does this work?
Title: Re: Where are MSwindows hdrs comming from?
Post by: thomas on January 25, 2007, 09:57:51 am
wxWidgets includes windows.h?
Title: Re: Where are MSwindows hdrs comming from?
Post by: stahta01 on January 25, 2007, 12:18:40 pm
wxWidgets includes windows.h?

Yes, wxWidgets include windows.h; wxWidgets includes msw/wrapwin.h which includes <windows.h>

Tim S
Title: Re: Where are MSwindows hdrs comming from?
Post by: Pecan on January 25, 2007, 03:37:29 pm
Thanks, then they came in from the precompiled headers for wx263.

arst was using 2.8.0 with my 2.6.3 project .cbp. Does this mean that it was *not* using 2.8.0 precompiled headers, or does something else need to be done for 2.8.0.

Inserting "#include <windows.h>" solved the problem. But I don't understand why it was necessary. Any clues?

Hello,

I've been downloading the KeyMacs 0.3.5 plugin. I've been lacking
macro support in CB. But... when compiling in CB (3521), I receive
a bunch of preprocessor errors, see below.

They all relate to Windows preprocessor symbols, so they are
nowhere defined, neither in CB source folder nor in wxWidgets one.

How should this be compiled?

Thanks,
Arst


:: === KeyMacs-MSW-plugin, default ===
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:35: error: `VK_SHIFT' was not declared in this scope
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:35: error: `MapVirtualKey' was not declared in this scope
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:36: error: `VK_CONTROL' was not declared in this scope
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:37: error: `VK_MENU' was not declared in this scope
....
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:298: error: `byte' was not declared in this scope
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:298: error: expected `)' before "scCode"
:: More errors follow but not being shown.
:: Edit the max errors limit in compiler options...
:: === Build finished: 50 errors, 0 warnings ===