Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 995385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:42:51+00:00 2026-05-16T06:42:51+00:00

I am facing a weird problem. I have got a file called in which

  • 0

I am facing a weird problem. I have got a file called in which I am using a macro called “WM_USER”, the macro is defined in another header file called . Now the problem is that when I am using the macro in the compiler doesn’t recognize it. Its not the case that I haven’t included , because earlier I wasn’t having any problems it came out of no where. Following is the error that is shown on the compiler:

d:\project\project original\mirec2pc v1.0\gui\constants.h(26) : error C2065: 'WM_USER' : undeclared identifier
d:\project\project original\mirec2pc v1.0\gui\constants.h(26) : error C2057: expected constant expression
d:\project\project original\mirec2pc v1.0\gui\constants.h(27) : error C2057: expected constant expression
d:\project\project original\mirec2pc v1.0\gui\constants.h(28) : error C2057: expected constant expression
d:\project\project original\mirec2pc v1.0\gui\constants.h(29) : error C2057: expected constant expression
d:\project\project original\mirec2pc v1.0\gui\constants.h(30) : error C2057: expected constant expression
d:\project\project original\mirec2pc v1.0\gui\constants.h(31) : error C2057: expected constant expression
d:\project\project original\mirec2pc v1.0\gui\constants.h(32) : error C2057: expected constant expression
d:\project\project original\mirec2pc v1.0\gui\constants.h(33) : error C2057: expected constant expression
d:\project\project original\mirec2pc v1.0\gui\constants.h(34) : error C2057: expected constant expression
d:\project\project original\mirec2pc v1.0\gui\constants.h(35) : error C2057: expected constant expression
d:\project\project original\mirec2pc v1.0\gui\constants.h(36) : error C2057: expected constant expression
d:\project\project original\mirec2pc v1.0\gui\constants.h(37) : error C2057: expected constant expression
d:\project\project original\mirec2pc v1.0\gui\constants.h(38) : error C2057: expected constant expression
d:\project\project original\mirec2pc v1.0\gui\constants.h(39) : error C2057: expected constant expression
d:\project\project original\mirec2pc v1.0\gui\constants.h(40) : error C2057: expected constant expression

and here is my piece of code :

#ifndef CONSTANTS_H
#define CONSTANTS_H

#ifdef __cplusplus
extern "C"
{
#endif

#define SRCNAME_COL         0
#define REC_STATUS_COL      1
#define REC_TYPE_COL        2
#define REC_FILE_NAME_COL   3
#define REC_TIMER_COL       4


#define DLG_BK_COLOR RGB(220,228,236)
#define STATIC_BOX_BORDER_COLOR RGB(128,160,192)
#define STATIC_BOX_BORDER_DARK_COLOR RGB(83,126,200)
#define STATIC_BOX_BORDER_LIGHT_COLOR RGB(241,245,254)

#define MY_COMPUTER "My Computer"
#define FILE_NAME "\\transconf.txt"

enum
{
    WM_START_REC                = WM_USER + 100,
    WM_STOP_REC                 = WM_USER + 101,
    WM_RELOAD_SCHD              = WM_USER + 102,
    WM_CONFIG_RELOAD            = WM_USER + 103,
    WM_PROG_BAR_UPDATE          = WM_USER + 104,    //  MESSAGE TO UPDATE     THE PROGRESS BAR [10/3/2007 smkniazi]
    WM_GET_NEW_MP3_FILE         = WM_USER + 105,    //  MESSAGE TO GET NEW FILE NAME IN CASE OF FILE SPLITTING IN MP3 RECORDING
    WM_FILE_OPEN_FAILED         = WM_USER + 106,        //  MESSAGE TO MAIN GUI THAT FILE OPEN HAS FAILED IN THE MP4/MP4 FILE OPEN FUNCTION
    WM_GET_NEW_AAC_FILE         = WM_USER + 107,
    WM_GET_NEW_WAV_FILE         = WM_USER + 108,
    WM_FILENAME_CHANGED         = WM_USER + 109,
    WM_UPDATE_FILE_PATH         = WM_USER + 110,
    WM_START_STREAM             = WM_USER + 111,
    WM_UPDATE_IRECORD_LIST      = WM_USER + 150,
    WM_UPDATE_IREC_STATUS_COL   = WM_USER + 151,
    WM_CLOSE_QT_WINDOW          = WM_USER + 152,
};    


#define COMBO_COMPARISON_CHAR               '-'
#define H264_GENERIC_MP4_HEADING            "--MP4 Generic--"
#define H264_DEVICE_SPFIC_HEADING           "--Device Specific--"
#define AUDIO_ONLY_HEADING                  "--Audio Only Recording--"
#define TS_MUX_HEADING                      "--Transport     Stream--"
#define H264_QVGA_MP_AT_420Kbps_STR         "    QVGA MP@420Kbps"
#define H264_QVGA_STR                       "    QVGA (320*240)"
#define H264_VGA_STR                        "    VGA (640*480)"
#define H264_D1_STR                         "    Full D1 (720*480/576)"
#define H264_PSP_Native_STR                 "    PSP Native"
#define H264_iPhone_IPODTOUCH_Native_STR    "    iPhone/iPod Touch Native"
#define H264_PSP_QVGA_STR                   "    PSP QVGA"
#define H264_IPOD_QVGA                      "    iPod QVGA"
#define H264_IPOD_VGA                       "    iPod VGA"
#define H264_PS3_STR                        "    Apple TV/PS3"
#define H264_XBOX_360_STR                   "    XBOX 360"
#define MP3_REC_STR                         "    MP3 Audio"
#define AAC_REC_STR                         "    AAC Audio"
#define WAV_REC_STR                         "    WAV Audio"
#define FLAC_REC_STR                        "    FLAC Audio"
#define TS_MUX_QVGA_STR                     "    TSMux QVGA (320*240)"
#define TS_MUX_VGA_STR                      "    TSMux VGA  (640*480)"
#define TS_MUX_FULLD1_STR                   "    TSMux FULL D1 (720*480/576)"


#define WM_UPDATE_FILE_PROG_BAR     WM_USER+200
#define WM_EDIT_COL_UPDATED         WM_USER+201
#define WM_UPDATE_REMOVABLE_DRIVES  WM_USER+202

#ifdef __cplusplus
}
#endif

#endif
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T06:42:52+00:00Added an answer on May 16, 2026 at 6:42 am

    You have no #include in your header so this is expectable. In case your constants.h is included in a file that includes a header with WM_USER definition, your code can compile. But IMO it is always better to do explicit inclusions.

    Anyway, just #include <winuser.h> or since WM_USER is a constant, add this to the top of your header

    #ifndef WM_USER
    #define WM_USER                         0x0400
    #endif
    

    Cheers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.