Solved

DialogBox and resources

Posted on 2003-11-09
7
630 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
[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
  • 3
7 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
ID: 9711854
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
ID: 9711882
oK..that rocks. Thanks!
0
 
LVL 86

Expert Comment

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

Expert Comment

by:jkr
ID: 10801348
Question answered :o)
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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

739 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