Solved

DialogBox and resources

Posted on 2003-11-09
7
624 Views
Last Modified: 2013-12-03
hello,

I am having a hard time designing a simple dialog box as a resource and then displaying it modally with the DialogBox() call. Do I have to use LoadResource, FindResource and LockResource to display this? Or should I just be able to design it in the resource editor and simply call DialogBox() to see it; I currently use the latter but I get error code 1812 when I make the call. If it is more complicated than this i would appreciate the steps involved in creating this dialog.

Thank you.
0
Comment
Question by:caesarhernandez
  • 3
7 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
Comment Utility
The error code is

//
// MessageId: ERROR_RESOURCE_DATA_NOT_FOUND
//
// MessageText:
//
//  The specified image file did not contain a resource section.
//
#define ERROR_RESOURCE_DATA_NOT_FOUND    1812L

It seems that you forgot to add the .rc file to your project. Apart from that, 'DialogBox()' will do fine. Don't forget to specify the resource ID in the 'MAKEINTRESOURCE()' macor as the 2nd parameter.
0
 

Author Comment

by:caesarhernandez
Comment Utility
oK..that rocks. Thanks!
0
 
LVL 86

Expert Comment

by:jkr
Comment Utility
So, you think we could close this Q?
0
 
LVL 86

Expert Comment

by:jkr
Comment Utility
Question answered :o)
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now