Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

DialogBox and resources

Posted on 2003-11-09
7
Medium Priority
?
633 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 200 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

636 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