Problems just adding a message to WndProc in a Win 32 API code.

Hi to all,

I have add the WM_XBUTTONDOWN message in my WndProc() in this way:

switch (message)
{

case:WM_XBUTTONDOWN:

WPARAM wParam;
LPARAM lParam;

break;
...
}

but it gives this error:

'WM_XBUTTONDOWN' : undeclared identifier.

I have added "Windows.h" and the folder where it is.

Whats the problem


Answer this question

Problems just adding a message to WndProc in a Win 32 API code.

  • Earl Hood

    What does your definitions look like Give the following a try:

    #define _WIN32_WINNT 0x501
    #include <windows.h>



  • mariek

    Alex Farber wrote:
    In your case, you need to add required _WIN32_WINNT and _WIN32_WINDOWS definiton before including windows.h.


    I have added them but i get the same error.


  • SQLDataMonkey

    nobody knows anything

  • Matthijs Koopman

    WM_XBUTTONDOWN

    Minimum operating systems Millennium, Windows 2000

    For every function or definition which has OS restrictions, refer to the following page:
    http://windowssdk.msdn.microsoft.com/en-us/library/ms736959(VS.80).aspx

    In your case, you need to add required _WIN32_WINNT and _WIN32_WINDOWS definiton before including windows.h.


  • bryanedds

    A better place for such issues is the win32 dev newsgroups at http://msdn.microsoft.com/newsgroups

    OTP

    Thanks,
    Ayman Shoukry
    VC++ Team


  • dtorg1955

    Ayman Shoukry wrote:
    A better place for such issues is the win32 dev newsgroups at http://msdn.microsoft.com/newsgroups


    I have clicked that link but i cant find any win32 discussion group...

  • Problems just adding a message to WndProc in a Win 32 API code.