Solved

Trouble with resource definition

Posted on 1997-03-21
1
247 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

728 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