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

  • SEARCH
  • Home
  • 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 8620263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:32:23+00:00 2026-06-12T06:32:23+00:00

I have a resource file where needed create string define with concatenation macros and

  • 0

I have a resource file where needed create string define with concatenation macros and string, something like this

#define _STRINGIZE(n) #n
#define STRINGIZE(n) _STRINGIZE(n)
#define Word_ Word
100 DIALOGEX 0, 0, 172, 118
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Hello"STRINGIZE(Word_)=>"Hello"Word" 

but needed simple “HelloWord” without average quotes.

  • 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-06-12T06:32:24+00:00Added an answer on June 12, 2026 at 6:32 am

    For anyone who cares: a .rc file is a resource file from an MFC project that defines UI elements, such as dialog layouts. It uses the same preprocessor as C++, but it does not share C++’s syntax — and in a window CAPTION field, two string literals won’t concatenate by just juxtaposing them. Within a string literal, two double quotes is actually an escape sequence that generates one double quote character. So the literal:

    "Hello""World"
    

    ends up looking like

    Hello"World
    

    In your dialog Window’s caption.

    The problem with the example given:

    CAPTION "Hello"STRINGIZE(Word_)
    

    Is that the double-quote at the end of “Hello” must be removed, but the preprocessor cannot do this.
    However, if “Hello” is allowed to be included in a macro, concatenation is possible. First, I defined these macros:

    #define CONCAT(a,b) a##b
    #define STRINGIZE_(x) #x
    #define STRINGIZE(x) STRINGIZE_(x)
    

    then, inside the dialog record:

      ...
    EXSTYLE WS_EX_APPWINDOW
    CAPTION STRINGIZE(CONCAT(Hello,World))
    FONT 10, "Segoe UI Semibold", 600, 0, 0x0
      ...
    

    With this, the dialog’s caption ends up looking like HelloWorld — no stray quotes or anything.
    I hope you can use this technique.

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

Sidebar

Related Questions

I currently have a resource-file where I store errormessages. And I would like to
I used to have something like this: We suggest you read our @Html.ActionLink(help page,
I would like to create a class that describes a file resource and then
ANSWER: Needed the call to getExternalFilesDir(p); like so: String p = thepathblah; File path=context.getExternalFilesDir(p);
I have a resource file named filetypes.resx. Some how I figured out to bind
I have a script that will convert a text file into a resource file,
I have a compiled .NET assembly with a specific resource file embedded (named 'Script.xml').
I have added an image to my form's resource file, myForm.resx, and I would
I have a simple question Is it possible to download a specific resource file
I have a specific requirement to read a resource from jar file and then

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.