Thread: Funky Error

  1. #1
    Registered User
    Join Date
    Aug 2001

    Funky Error

    warning C4003: not enough actual parameters for macro 'CreateWindowA'
    error C2059: syntax error : 'constant'

    I have a header file

    #include <windows.h>
    class cWindowManager {
    	bool CreateWindow(int width, int height, int bits);
    	bool DestroyWin();
    	HDC			hdc;	//Device Context
    	HGLRC		hrc;	//Render Context
    	HWND		hwn;	//Window Handle
    	HINSTANCE	hin;	//Instance
    	RECT		rect;	//Screen Rectangle
    	WNDCLASS	wc;		//Window Class
    	DEVMODE		ss;		//Screen Settings
    	DWORD		s;		//Style
    	DWORD		xs;		//Extended Style
    	short		depth;	//Depthbuffer Specification
    	unsigned int pf;	//Pixel Format
    and a source file that defines the function CreateWindow

    #include "WindowManager.h"
    bool cWindowManager::CreateWindow(int width, int height, int bits) {
    The error is flagged in both places where the function is named. This is not an error I have seen before, so I dont know what the deal is.

    MSVC Help says this, but im not getting anywhere.
    Compiler Warning (level 1) C4003
    not enough actual parameters for macro 'identifier'

    The number of actual parameters specified with the given identifier was less than the number of formal parameters given in the macro definition of the identifier.

    When a formal parameter is referenced in the definition and the corresponding actual parameter has not been provided, empty text is substituted in the macro expansion.
    Any ideas? Im using MSVC 6.0 Pro on Windows XP if it matters. It was building fine, then it started giving this error...
    Last edited by Eber Kain; 05-31-2004 at 12:11 PM.

  2. #2
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Seattle, WA
    I think CreateWindow is already defined in windows.h, so you might try either renaming that function or putting it inside a namespace.
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."

  3. #3
    Registered User
    Join Date
    Aug 2001
    doh, I think your right.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 09:15 PM
  2. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 04:09 AM
  3. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 01:10 AM