{"id":1341,"date":"2014-03-07T14:20:53","date_gmt":"2014-03-07T22:20:53","guid":{"rendered":"http:\/\/darkly-cute.com\/blog\/?p=1341"},"modified":"2014-03-07T15:58:05","modified_gmt":"2014-03-07T23:58:05","slug":"see-plusplus-see-plusplus-run-run-plusplus-run-_","status":"publish","type":"post","link":"http:\/\/darkly-cute.com\/blog\/see-plusplus-see-plusplus-run-run-plusplus-run-_\/","title":{"rendered":"See Plusplus!  See Plusplus run!  Run Plusplus run! (>_<)"},"content":{"rendered":"<p>Hey! Smart people! My luck has run out. MSDN, cplusplus, StackOverflow, and various other sites can&#8217;t seem to help me. (&gt;_&lt;)<\/p>\n<p>Here goes: I have bitmap resources embedded in my x86 executable. I have them properly defined as resources. I have very similar code in another project for WinCE6. But, when I try to load my image resources, I keep getting error 1814(0x716)! (._.)<\/p>\n<p>resources.rc<\/p>\n<div>\n<pre dir=\"ltr\">#include \"resources.h\"\r\n\r\nIDB_BITMAP1 BITMAP \"tpcn.bmp\"\r\nIDB_BITMAP2 BITMAP \"red.bmp\"\r\nIDB_BITMAP3 BITMAP \"blu.bmp\"\r\nIDB_BITMAP4 BITMAP \"grn.bmp\"\r\nIDB_BITMAP5 BITMAP \"pat.bmp\"<\/pre>\n<\/div>\n<p>resources.h<\/p>\n<div>\n<pre dir=\"ltr\">#ifndef RESOURCES_H\r\n#define RESOURCES_H\r\n\r\n#ifndef IDC_STATIC\r\n#define IDC_STATIC      -1\r\n#endif\r\n\r\n#define IDI_CSICO       101\r\n\r\n#define IDB_BITMAP1    201\r\n#define IDB_BITMAP2    202\r\n#define IDB_BITMAP3    203\r\n#define IDB_BITMAP4    204\r\n#define IDB_BITMAP5    205\r\n\r\n#endif \/\/ RESOURCES_H<\/pre>\n<\/div>\n<p>The snippet of code that fails. (T_T)<\/p>\n<div>\n<pre dir=\"ltr\">\tHBITMAP image = (HBITMAP)LoadImage(NULL, MAKEINTRESOURCE(IDB_BITMAP1), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);\r\n\tif (image == NULL) printf(\"Failure Loading Bitmap %i\", GetLastError());<\/pre>\n<\/div>\n<p>I&#8217;m using GNU GCC as my compiler. It does compile. It does run. But, it does always print that &#8220;Failure&#8221; line I stuck in there. (._.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey! Smart people! My luck has run out. MSDN, cplusplus, StackOverflow, and various other sites can&#8217;t seem to help me. (&gt;_&lt;) Here goes: I have bitmap resources embedded in my x86 executable. I have them properly defined as resources. I &hellip; <a href=\"http:\/\/darkly-cute.com\/blog\/see-plusplus-see-plusplus-run-run-plusplus-run-_\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0},"categories":[1],"tags":[464,29,456,48,66,7,463,462],"_links":{"self":[{"href":"http:\/\/darkly-cute.com\/blog\/wp-json\/wp\/v2\/posts\/1341"}],"collection":[{"href":"http:\/\/darkly-cute.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/darkly-cute.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/darkly-cute.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/darkly-cute.com\/blog\/wp-json\/wp\/v2\/comments?post=1341"}],"version-history":[{"count":2,"href":"http:\/\/darkly-cute.com\/blog\/wp-json\/wp\/v2\/posts\/1341\/revisions"}],"predecessor-version":[{"id":1343,"href":"http:\/\/darkly-cute.com\/blog\/wp-json\/wp\/v2\/posts\/1341\/revisions\/1343"}],"wp:attachment":[{"href":"http:\/\/darkly-cute.com\/blog\/wp-json\/wp\/v2\/media?parent=1341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/darkly-cute.com\/blog\/wp-json\/wp\/v2\/categories?post=1341"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/darkly-cute.com\/blog\/wp-json\/wp\/v2\/tags?post=1341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}