0

While the error is identical to what others have experienced, my surroundings are completely different. I actually do try to declare a constant:

const long CS_DROPSHADOW = 0x20000;
const long WS_EX_LAYERED = 0x80000;

The error is reported for the two constant names.

The constants declaration is located in a Header file, outside any class declaration.

Here is how the H file looks like:

#ifndef _ASD_SMARTWINDOW_MAIN_H_TAGXXXMAIH_
#define _ASD_SMARTWINDOW_MAIN_H_TAGXXXMAIH_

#include "ASDTail.h" //Queue support.

namespace ASDSmartWindowMaster
{
...
};

class ASDSmartWindowListener
{
};

const long CS_DROPSHADOW = 0x20000;
const long WS_EX_LAYERED = 0x80000;

//Now comes a bunch of enums...
enum KLayeredWindowType
{ ... };


class ASDSmartWindow
{
};

#endif
Community
  • 1
  • 1
Axonn
  • 10,076
  • 6
  • 31
  • 43
  • You shouldn't use [reserved names](http://stackoverflow.com/questions/228783) for your include guards. – Mike Seymour Feb 22 '12 at 12:39
  • 1
    Meaning that I started the ifndef with _? Sorry, this is a 6 year old project I'm trying to resurrect, a lot of scary stuff in it ::- D. – Axonn Feb 22 '12 at 13:25

1 Answers1

2

CS_DROPSHADOW and WS_EX_LAYERED are declared in WinUser.h. Verify that you didn't include it before your declarations.

Igor Chornous
  • 1,068
  • 1
  • 6
  • 10