Solved

Trouble with resource definition

Posted on 1997-03-21
1
243 Views
Last Modified: 2013-12-03
Hi,

I am trying to create the 'Open' common dialog box and
I am using the sample code found in the help files of
the Microsoft Visual C++ 4.0 Standard Edition.  Part
of the code is as follows:

cbString = LoadString(hInst, IDS_FILTERSTRING, szFilter,
sizeof(szFilter));

Towards the end of the help, it says

The string referred to by the IDS_FILTERSTRING value is
defined as follows in the resource-definition file.

STRINGTABLE
BEGIN
    IDS_FILTERSTRING "Bitmap File(*.BMP)|*.bmp|"
END

Now, I assumed that I should include this IDS_FILTERSTRING
stuff in <projname>.rc file.

When I compile, I get a message saying that 'IDS_FILTERSTRING is an undefined keyword or key name' in .rc file.  Could someone tell me where I should define this ID?  Am I doing the right thing by including it in the <projname>.rc file?  Any help will be greatly appreciated.  Thanks in advance.  
0
Comment
Question by:raghu022597
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
sapek earned 70 total points
ID: 1334196
If you are using a symbol value (like IDS_FILTERSTRING) in a recource file you must define the symbol in the resource header file (usually resource.h), for example:
#define IDS_FILTERSTRING 100
If you had added IDS_FILTERSTRING string using resource editor rather than by manually editing *.rc file, that would have been done automaticaly.
So to fix this either add the definition of IDS_FILTERSTRING to the header or better remove the stuff you added to *.rc file and add the string resource using resource editor.

Adam

0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question