Home > createdialog error > createdialog error 1812

Createdialog Error 1812

Join INTELLIGENT WORK FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free! Join Us! *Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki reStructuredText code below into your site. Microsoft: Visual C++ Forum at Tek-Tips HomeForumsProgrammersDevelopment ToolsMicrosoft: Visual C++ Forum 1812 error when trying to create dialog 2 thread116-889039 Forum Search FAQs Links MVPs 1812 error when trying to create dialog 1812 error when trying to create dialog snuv (Programmer) (OP) 28 Jul 04 05:20 I have a very small dll that only contains 1 simple dialog with two member variablesCODE#define DLLExport _declspec( dllexport )extern "C"{DLLExport int GetUserLoginAuto(char * pszUserName, BOOL* pbPermission);}int GetUserLoginAuto(char * pszUserName, BOOL* pbPermission){CPermissions test;int nRet = test.DoModal();*pbPermission = test.m_bAutoLogin;if (nRet !=IDOK)test.m_nErrorCode = nRet;return test.m_nErrorCode;}message boxes work ok but the do modal returns -1 and the last error is 1812Can anyone shed any light on this one? Go not to cats for advice for they will just walk over the keyboard RE: 1812 error when trying to create dialog tchouch (Programmer) 28 Jul 04 06:16 The problem with MFC DLLs is wrong ResourceHandle (it is the handle of executable called LoadLibrary(), not dll!). You can change this handle with AfxSetResourceHandle(m_Hinst_of_your_dll) and then call DoModal().Do not forget to restore old handle a

with a dialog from the RC file.I compile all my resources into a resource DLL. And my code loads theresource DLL.When I call DoModal on my dialog, sometimes it succeeds and sometimesDoModal() returns -1 and GetLastError() gives me error 1812(ERROR_RESOURCE_DATA_NOT_FOUND)As I said, sometimes I am able to successfully do a DoModal and it failssometimes. I opened my resource DLL and varified that it does contain thedialog I want to load.Can anyone point me to possible cause of this? I am using VC 7.1 on WindowsXP.Thanks muchSug Ajay http://www.tek-tips.com/viewthread.cfm?qid=889039 Kalra 2006-03-26 17:30:29 UTC PermalinkRaw Message Post by SugI have written an app and derived a calls from CDialog. This class isassociated with a dialog from the RC file.I compile all my resources into a resource DLL. And my code loads theresource DLL.Did you add this DLL to resource chain so that these resources can befound when you are http://microsoft.public.vc.mfc.narkive.com/hxP6nbSw/domodal-throws-error-1812-error-resource-data-not-found loading a resource from this DLL. (SeeCDynLinkLibrary).----Ajay Kalra***@yahoo.com VSP 2006-03-27 06:51:18 UTC PermalinkRaw Message Loading the resource dll is not sufficient.You have to call AfxSetResourceHandle(handle to the resource dll)HANDLE hPrevRes = AfxGetResourceHandle()AfxSetResourceHandle(hRes);...Use the resource(Create dialog, load strings...)AfxSetResourceHandle(hPrevRes);-VSPPost by SugHello,I have written an app and derived a calls from CDialog. This class isassociated with a dialog from the RC file.I compile all my resources into a resource DLL. And my code loads theresource DLL.When I call DoModal on my dialog, sometimes it succeeds and sometimesDoModal() returns -1 and GetLastError() gives me error 1812(ERROR_RESOURCE_DATA_NOT_FOUND)As I said, sometimes I am able to successfully do a DoModal and it failssometimes. I opened my resource DLL and varified that it does contain thedialog I want to load.Can anyone point me to possible cause of this? I am using VC 7.1 on WindowsXP.Thanks muchSug Sug 2006-04-03 16:12:53 UTC PermalinkRaw Message Post by VSPLoading the resource dll is not sufficient.You have to call AfxSetResourceHandle(handle to the resource dll)HANDLE hPrevRes = AfxGetResourceHandle()AfxSetResourceHandle(hRes);...Use the resource(Create dialog, load strings...)AfxSetResourceHandle(hPrevRes);-VSPHi VSP,Thanks for your responce. Yes

topic ForumsMembersHelp Files Developer Journals Gallery Calendar Downloads Resources Store Classifieds Tracker Links Home For Beginners Articles All Articles Post an Article Technical http://www.gamedev.net/topic/366757-createdialog-failed-from-a-static-lib/ Game Programming General Programming Graphics Programming and Theory DirectX and XNA OpenGL and Vulkan Multiplayer and Network Programming Artificial Intelligence Math and Physics Mobile Development Middleware, Libraries, and Tools Virtual and Augmented Reality Creative Game Design Music and Sound Visual Arts Business Breaking into the Industry Production and Management Interviews Business and Law Event Coverage Forums All Forums Technical Game Programming createdialog error General Programming Graphics Programming and Theory DirectX and XNA OpenGL & Vulkan Multiplayer and Network Programming Artificial Intelligence Math and Physics Mobile & Console Development Build Systems & Source Control Middleware, Libraries, and Tools Virtual and Augmented Reality Creative Game Design Writing For Games Music and Sound Visual Arts Gallery Business Breaking into the Industry Business & Law Production & Management Community createdialog error 1812 GDNet Lounge Coding Horrors Article Writing Comments, Suggestions and Ideas Your Announcements Hobby Project Classifieds Indie Project Showcase Community Developer Journals GDNet+ Subscriptions Gallery Store Classifieds Jobs Freelancers Hobby Projects Marketplace Newsletter » Home » Forums » The Technical Side » General Programming Chat Watched Content New Content 0 CreateDialog failed from a static lib... Started by LowRad, Dec 30 2005 01:29 AM Old topic! Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic. You cannot reply to this topic 2 replies to this topic #1 LowRad Members -Reputation: 234 Like 0Likes Like Posted 30 December 2005 - 01:29 AM Hi all, I am currently trying to add a nice little configuration dialog to my engine. Everything is compiling and linking fine. But when i call CreateDialog with the appropriate parameters it is returning NULL. The error code returned is 1812: The specified image file did not contain a resource section. As i red on the

 

Related content

createdialog error 1814

Createdialog Error p p p applications I'm having a problem getting a dialog box to pop up on top of my main window the CreateDialog method returns a NULL for some reason Would really relatedl appreciate some help with this Here is the source code -- http www apcx rror com main cpp the program runs but the test condition for CreateDialog 's return value shows a NULL value is returned The resource file Quote include windows h IDD TOOLBAR DIALOGEX STYLE DS MODALFRAME WS POPUP WS CAPTION EXSTYLE WS EX TOOLWINDOW CAPTION My Dialog Toolbar FONT MS Sans Serif

createdialog error 1813

Createdialog Error p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about relatedl Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up CreateDialog in BHO always fails with error resource not