MSVC++ Express 8 error C2228

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2008
Posts: 3
Reputation: n321 is an unknown quantity at this point 
Solved Threads: 0
n321 n321 is offline Offline
Newbie Poster

MSVC++ Express 8 error C2228

 
0
  #1
Dec 27th, 2008
Hello, I am new to this community but you seemed to be knowlegable with this error so I thought you could help me.

I am more of a hobbiest programmer. I get by with doing as little as possible to accent my graphic design abilities. I am currently working on a modern FPS/RPG game using the open source Quake 3 engine. The engine modifications are complete (both renderer and game code) but as we began to finish a few loose ends my programmers wife got very sick. I have been getting by with my limited programming skills to modify my programmers code.

Recently I decided to try to create a simple launcher for the game. I am modifying the code for a launcher that was created for a Q2 engine mod. I decided to do this because I got it to work in the past a few years ago but that was with MSVC++2005.

Upon first compile I got 53 errors. They have all been resolved except for 2. They are one line apart and are the same problem. C2228. Since the code is not my own and is free I have no problem posting it. It consists of a header file a cpp file and a rc file.

Thank you for your help.

cwndinfo.h

  1. #include <string.h>
  2.  
  3. // CWndInfo: Holds the base information for any window
  4. class CWndInfo
  5. {
  6. private:
  7. HWND hwnd; // window handle
  8. char wndClassName[100]; // window classname
  9. public:
  10. // constructors
  11. CWndInfo() { hwnd = NULL; strcpy(wndClassName, "Launcher"); }
  12. CWndInfo(char cname[]) { hwnd = NULL; strncpy(wndClassName, cname, 99); }
  13.  
  14. // set functions
  15. HWND set_hwnd(HWND h) { return hwnd = h; }
  16.  
  17. // fetch functions
  18. HWND get_hwnd() { return hwnd; }
  19. char* get_cname() { return wndClassName; }
  20. };

Main.cpp (this is where the error occures)

  1. #include <stdio.h>
  2. #include <windows.h>
  3. #include "cwndinfo.h"
  4. #include "resource.h"
  5.  
  6. #define WND_WIDTH 680 // window width
  7. #define WND_HEIGHT 365 // window height
  8.  
  9. #define EXECUTABLE "xrevelation.exe"
  10. #define XVersion "1.0"
  11. #undef UNICODE
  12.  
  13. // PROTOTYPES //
  14. ATOM RegisterWndClass(HINSTANCE);
  15. HWND CreateMainWnd(HINSTANCE);
  16. void ErrorMsg(char [], char []);
  17. void SetUpFont();
  18. HWND CreateButton(char [], int, int, int, int, HWND, HMENU);
  19. void LoadCmds(char []);
  20. void WriteCmds(char []);
  21. LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
  22.  
  23. // GLOBAL VARIABLES //
  24. // M$ leaves me little choice...
  25. CWndInfo g_wndinfo;
  26. HFONT g_defont; // default font
  27. HFONT g_verfont; // default font
  28. HBITMAP g_bmpLogo = NULL;
  29. HBRUSH g_hbrBackground = CreateSolidBrush(RGB(0, 0, 0));
  30. //HINSTANCE g_hInst;
  31.  
  32. // RegisterWndClass(): Register a window and return success/failure.
  33. ATOM RegisterWndClass(HINSTANCE hInstance)
  34. {
  35. WNDCLASSEX wc;
  36.  
  37. wc.cbSize = sizeof(WNDCLASSEX); // size of WNDCLASSEX struct
  38. wc.style = 0; // class style
  39. wc.lpfnWndProc = WndProc; // pointer to windows procedure function
  40. wc.cbClsExtra = 0; // allocate extra memory (bytes) per class
  41. wc.cbWndExtra = 0; // allocate extra memory (bytes) per window
  42. wc.hInstance = hInstance; // handle to application instance
  43. wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1)); // large icon (32x32)
  44. wc.hCursor = LoadCursor(NULL, IDC_ARROW); // cursor to use with application
  45. wc.hbrBackground = g_hbrBackground; // background color of window
  46. wc.lpszMenuName = NULL; // name of menu resource
  47. wc.lpszClassName = g_wndinfo.get_cname(); // window classname
  48. wc.hIconSm = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_ICON1), IMAGE_ICON, 16, 16, 0); // small icon (16x16)
  49.  
  50. return RegisterClassEx(&wc);
  51. }
  52.  
  53. HWND CreateMainWnd(HINSTANCE hInstance)
  54. {
  55. // g_hInst = hInstance;
  56.  
  57. return CreateWindowEx(
  58. WS_EX_WINDOWEDGE, // window style
  59. g_wndinfo.get_cname(), // window classname
  60. "Launcher", // window title
  61. WS_OVERLAPPED | WS_CAPTION | // more window styles
  62. WS_SYSMENU | WS_MINIMIZEBOX, // more window styles
  63. CW_USEDEFAULT, CW_USEDEFAULT, // x,y coords
  64. WND_WIDTH, WND_HEIGHT, // width,height
  65. NULL, NULL, // applies to MDI stuff
  66. hInstance, NULL); // window instance
  67. }
  68.  
  69. // ErrorMsg(): quicker interface for MessageBox().
  70. void ErrorMsg(char msg[], char title[])
  71. {
  72. MessageBox(NULL, msg, title, MB_ICONEXCLAMATION | MB_OK);
  73. }
  74.  
  75. // WndProc(): message handler.
  76. LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
  77. {
  78. switch(msg)
  79. {
  80. case WM_CREATE:
  81. { // window is being created
  82. char s[5001];
  83.  
  84. CWndInfo cmdLaunch("BUTTON"); // ok button
  85. CWndInfo cmdQuit("BUTTON"); // quit button
  86. CWndInfo cmdAbout("BUTTON"); // about button
  87. CWndInfo cmdSite("BUTTON"); // goto site button
  88. CWndInfo lblParams("STATIC"); // label for params box
  89. CWndInfo lblVersion("STATIC"); // label for version box
  90. CWndInfo txtParams("EDIT"); // extra params box
  91. /*
  92. cmdLaunch.set_hwnd(CreateButton("Launch!", 583, 155, 80, 30, hwnd, (HMENU)IDC_MAIN_LAUNCH));
  93. cmdQuit.set_hwnd(CreateButton("Quit", 583, 475, 80, 30, hwnd, (HMENU)IDC_MAIN_QUIT));
  94. cmdSite.set_hwnd(CreateButton("Website", 583, 290, 80, 30, hwnd, (HMENU)IDC_MAIN_SITE));
  95. cmdAbout.set_hwnd(CreateButton("About", 583, 330, 80, 30, hwnd, (HMENU)IDC_MAIN_ABOUT));
  96. */
  97. cmdLaunch.set_hwnd(CreateButton("PLAY", 583, 155, 80, 30, hwnd, (HMENU)IDC_MAIN_LAUNCH));
  98. cmdSite.set_hwnd(CreateButton("COMMUNITY", 583, 205, 80, 30, hwnd, (HMENU)IDC_MAIN_SITE));
  99. cmdAbout.set_hwnd(CreateButton("ABOUT", 583, 255, 80, 30, hwnd, (HMENU)IDC_MAIN_ABOUT));
  100. cmdQuit.set_hwnd(CreateButton("EXIT", 583, 305, 80, 30, hwnd, (HMENU)IDC_MAIN_QUIT));
  101.  
  102. lblParams.set_hwnd(CreateWindowEx(WS_EX_LEFT, "STATIC","Launch Parameters:", WS_CHILD | WS_VISIBLE,
  103. 10, 135, 150, 20, hwnd, (HMENU)IDC_MAIN_EDITLBL, GetModuleHandle(NULL), NULL));
  104.  
  105. txtParams.set_hwnd(CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "",
  106. WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN,
  107. 5, 155, 567, 180, hwnd, (HMENU)IDC_MAIN_EDIT, GetModuleHandle(NULL), NULL));
  108.  
  109. lblVersion.set_hwnd(CreateWindowEx(WS_EX_LEFT, "STATIC","Version " XVersion, WS_CHILD | WS_VISIBLE,
  110. 592, 135, 150, 20, hwnd, (HMENU)IDC_MAIN_VERLBL, GetModuleHandle(NULL), NULL));
  111.  
  112.  
  113. if (cmdLaunch.get_hwnd() == NULL || cmdQuit.get_hwnd() == NULL)
  114. ErrorMsg("Initialization failed in WM_CREATE!", "Error!");
  115.  
  116. // set up fonts
  117. SendMessage(cmdLaunch.get_hwnd(), WM_SETFONT, (WPARAM)g_defont, MAKELPARAM(FALSE, 0));
  118. SendMessage(cmdQuit.get_hwnd(), WM_SETFONT, (WPARAM)g_defont, MAKELPARAM(FALSE, 0));
  119. SendMessage(cmdSite.get_hwnd(), WM_SETFONT, (WPARAM)g_defont, MAKELPARAM(FALSE, 0));
  120. SendMessage(cmdAbout.get_hwnd(), WM_SETFONT, (WPARAM)g_defont, MAKELPARAM(FALSE, 0));
  121. SendMessage(txtParams.get_hwnd(), WM_SETFONT, (WPARAM)g_defont, MAKELPARAM(FALSE, 0));
  122. SendMessage(lblParams.get_hwnd(), WM_SETFONT, (WPARAM)g_defont, MAKELPARAM(FALSE,0));
  123. SendMessage(lblVersion.get_hwnd(), WM_SETFONT, (WPARAM)g_verfont, MAKELPARAM(FALSE,0));
  124.  
  125. LoadCmds(s);
  126. if (s[0] == '\0')
  127. strcpy(s, "+set game dday\r\n+set deathmatch 1");
  128.  
  129. // set default text inside edit box
  130. SetDlgItemText(hwnd, IDC_MAIN_EDIT, s);
  131.  
  132. // pbowens: dday's logo
  133. g_bmpLogo = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_BMPLOGO));
  134.  
  135. if(g_bmpLogo == NULL)
  136. MessageBox(hwnd, "Could not load IDB_BMPLOGO!", "Error", MB_OK | MB_ICONEXCLAMATION);
  137.  
  138. }
  139. break;
  140.  
  141. case WM_COMMAND:
  142. switch (LOWORD(wParam))
  143. {
  144. case IDC_MAIN_LAUNCH:
  145. { // clicked "Launch!" button
  146. int len = GetWindowTextLength(GetDlgItem(hwnd,IDC_MAIN_EDIT));
  147. long exec_rval=0;
  148. char *params;
  149.  
  150. params = new char[len+3]; // space, extra "+", and null byte
  151. GetDlgItemText(hwnd, IDC_MAIN_EDIT, params, len+1);
  152. strcat(params, " +"); // shows console by default
  153.  
  154. exec_rval=(long)ShellExecute(NULL,"open", EXECUTABLE, params,NULL, SW_SHOWNORMAL);
  155. if (exec_rval == ERROR_FILE_NOT_FOUND)
  156. ErrorMsg("Could not find " EXECUTABLE "!", "File Not Found");
  157. delete [] params;
  158. }
  159. break;
  160.  
  161. case IDC_MAIN_QUIT:
  162. // clicked "Quit" button
  163. DestroyWindow(g_wndinfo.get_hwnd());
  164. break;
  165.  
  166. case IDC_MAIN_SITE:
  167. // clicked "Website" button
  168. ShellExecute(NULL,"open","http://chili.planetquake.gamespy.com/forum",NULL,NULL,SW_SHOWNORMAL);
  169. break;
  170.  
  171. case IDC_MAIN_ABOUT:
  172. // clicked "About" button
  173. MessageBox(g_wndinfo.get_hwnd(),"XRevelations Launcher\n"
  174. "Version: " XVersion "\n"
  175. "Written By: n321\n"
  176. "GUI By: n321 \n\n"
  177. "Written in C++ using MSVC++.\n"
  178. "Copyright (c) 2008 NCG Productions",
  179. "About", MB_OK | MB_ICONQUESTION );
  180. break;
  181. }
  182. break;
  183.  
  184. case WM_PAINT:
  185. {
  186. BITMAP bm;
  187. PAINTSTRUCT ps;
  188.  
  189. HDC hdc = BeginPaint(hwnd, &ps);
  190.  
  191. HDC hdcMem = CreateCompatibleDC(hdc);
  192.  
  193. // pbowens: SelectObject apparently doesnt like HBITMAP
  194. // HBITMAP hbmOld = SelectObject(hdcMem, g_bmpLogo);
  195. HGDIOBJ hbmOld = SelectObject(hdcMem, g_bmpLogo);
  196.  
  197. GetObject(g_bmpLogo, sizeof(bm), &bm);
  198.  
  199. BitBlt(hdc, 0, 0, bm.bmWidth, bm.bmHeight, hdcMem, 0, 0, SRCCOPY);
  200.  
  201. SelectObject(hdcMem, hbmOld);
  202. DeleteDC(hdcMem);
  203.  
  204. EndPaint(hwnd, &ps);
  205.  
  206. hwnd.nWidth = WND_WIDTH;
  207. hwnd.nHeight = WND_HEIGHT;
  208. }
  209. break;
  210.  
  211. case WM_CTLCOLORDLG:
  212. return (LONG)g_hbrBackground;
  213.  
  214. case WM_CTLCOLORSTATIC:
  215. {
  216. HDC hdcStatic = (HDC)wParam;
  217. SetTextColor(hdcStatic, RGB(255, 255, 255));
  218. SetBkMode(hdcStatic, TRANSPARENT);
  219. return (LONG)g_hbrBackground;
  220. }
  221. break;
  222.  
  223.  
  224. case WM_CLOSE:
  225. // user closed the window
  226. DestroyWindow(hwnd);
  227. break;
  228.  
  229. case WM_DESTROY:
  230. { // program is exiting
  231. int len = GetWindowTextLength(GetDlgItem(hwnd,IDC_MAIN_EDIT));
  232. char *params;
  233.  
  234. params = new char[len+2]; // null byte
  235. GetDlgItemText(hwnd, IDC_MAIN_EDIT, params, len+1);
  236. WriteCmds(params);
  237. delete [] params;
  238.  
  239. DeleteObject(g_bmpLogo);
  240.  
  241. PostQuitMessage(0);
  242. }
  243. break;
  244.  
  245. default:
  246. return DefWindowProc(hwnd, msg, wParam, lParam);
  247. }
  248. return 0;
  249. }
  250.  
  251. // SetUpFont(): Set the default app font
  252. void SetUpFont()
  253. {
  254. HFONT hf;
  255. HFONT hf_ver;
  256. HDC hdc;
  257. long lfHeight;
  258.  
  259. hdc = GetDC(NULL);
  260. lfHeight = -MulDiv(10, GetDeviceCaps(hdc, LOGPIXELSY), 72);
  261. ReleaseDC(NULL, hdc);
  262.  
  263. hf = CreateFont(lfHeight, 0, 0, 0, FW_BOLD, FALSE, 0, 0, 0, 0, 0, 0, 0, "Verdana");
  264.  
  265. if(hf)
  266. {
  267. DeleteObject(g_defont);
  268. g_defont = hf;
  269. }
  270. else
  271. {
  272. ErrorMsg("Font creation failed!", "Error");
  273. }
  274.  
  275.  
  276. hdc = GetDC(NULL);
  277. lfHeight = -MulDiv(10, GetDeviceCaps(hdc, LOGPIXELSY), 96);
  278. ReleaseDC(NULL, hdc);
  279.  
  280. hf_ver = CreateFont(lfHeight, 0, 0, 0, 0, FALSE, 0, 0, 0, 0, 0, 0, 0, "Verdana");
  281.  
  282. if(hf_ver)
  283. {
  284. DeleteObject(g_verfont);
  285. g_verfont = hf_ver;
  286. }
  287. else
  288. {
  289. ErrorMsg("Font creation failed!", "Error");
  290. }
  291.  
  292. }
  293.  
  294. // CreateButton(): Reduce code redundancy by placing the
  295. // code to create a button in one func.
  296. HWND CreateButton(char s[], int x, int y, int width, int height, HWND hwnd, HMENU idc)
  297. {
  298. return CreateWindowEx(WS_EX_WINDOWEDGE, "BUTTON", s,
  299. WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | BS_FLAT, x, y, width, height, hwnd, idc,
  300. GetModuleHandle(NULL), NULL);
  301. }
  302.  
  303. // LoadCmds(): Load extra paramaters from a file
  304. void LoadCmds(char s[])
  305. {
  306. FILE *fp=NULL;
  307. int i=0;
  308.  
  309. fp = fopen("q2dday.dat", "r");
  310.  
  311. if (fp)
  312. {
  313. while (feof(fp) == 0)
  314. s[i++] = fgetc(fp);
  315. s[i-1] = '\0';
  316. fclose(fp);
  317. }
  318. else
  319. s[0] = '\0';
  320. }
  321.  
  322. // WriteCmds(): Save extra parameters to a file
  323. void WriteCmds(char s[])
  324. {
  325. FILE *fp=NULL;
  326. int i=0;
  327.  
  328. fp = fopen("q2dday.dat", "w");
  329.  
  330. if (fp)
  331. {
  332. while (s[i] != '\0')
  333. fputc(s[i++],fp);
  334. fclose(fp);
  335. }
  336. else
  337. ErrorMsg("Could not write to file!", "Error!");
  338. }
  339.  
  340. // WinMain(): application entry point.
  341. int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
  342. {
  343. MSG msg;
  344.  
  345. // set up the default app font
  346. SetUpFont();
  347.  
  348. // register a window class
  349. if(!RegisterWndClass(hInstance))
  350. {
  351. ErrorMsg("Window Registration Failed!", "Error!");
  352. return 0;
  353. }
  354.  
  355. // attempt to create the window
  356. if(!(g_wndinfo.set_hwnd(CreateMainWnd(hInstance))))
  357. {
  358. ErrorMsg("Window Creation Failed!", "Error!");
  359. return 0;
  360. }
  361.  
  362. // refresh the window
  363. ShowWindow(g_wndinfo.get_hwnd(), nCmdShow);
  364. UpdateWindow(g_wndinfo.get_hwnd());
  365.  
  366. // message loop
  367. while(GetMessage(&msg, NULL, 0, 0) > 0)
  368. {
  369. TranslateMessage(&msg);
  370. DispatchMessage(&msg);
  371. }
  372.  
  373. return (int)msg.wParam;
  374. }

Recource.h

  1. #define IDI_ICON1 1
  2. #define IDC_MAIN_LAUNCH 101
  3. #define IDC_MAIN_QUIT 102
  4. #define IDC_MAIN_ABOUT 103
  5. #define IDC_MAIN_EDIT 104
  6. #define IDC_MAIN_SITE 105
  7. #define IDC_MAIN_EDITLBL 106
  8. #define IDC_MAIN_VERLBL 108
  9. #define IDB_BMPLOGO 111
  10.  
  11. // Next default values for new objects
  12. //
  13. #ifdef APSTUDIO_INVOKED
  14. #ifndef APSTUDIO_READONLY_SYMBOLS
  15. #define _APS_NEXT_RESOURCE_VALUE 112
  16. #define _APS_NEXT_COMMAND_VALUE 40001
  17. #define _APS_NEXT_CONTROL_VALUE 1001
  18. #define _APS_NEXT_SYMED_VALUE 101
  19. #endif
  20. #endif

Ok the error is on these lines #216 and #217 in main.cpp and reads as follows

  1. hwnd.nWidth = WND_WIDTH;
  2. hwnd.nHeight = WND_HEIGHT;

Output reads

<br />
1>------ Build started: Project: Launcher, Configuration: Release Win32 ------<br />
1>Compiling...<br />
1>main.cpp<br />
1>c:\documents and settings\nick\desktop\launcher-src\cwndinfo.h(21) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br />
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\string.h(74) : see declaration of 'strcpy'<br />
1>c:\documents and settings\nick\desktop\launcher-src\cwndinfo.h(22) : warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br />
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\string.h(157) : see declaration of 'strncpy'<br />
1>..\..\main.cpp(137) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br />
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\string.h(74) : see declaration of 'strcpy'<br />
1>..\..\main.cpp(162) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br />
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\string.h(79) : see declaration of 'strcat'<br />
1>..\..\main.cpp(216) : error C2228: left of '.nWidth' must have class/struct/union<br />
1>        type is 'HWND'<br />
1>        did you intend to use '->' instead?<br />
1>..\..\main.cpp(217) : error C2228: left of '.nHeight' must have class/struct/union<br />
1>        type is 'HWND'<br />
1>        did you intend to use '->' instead?<br />
1>Build log was saved at "file://c:\Documents and Settings\Nick\Desktop\launcher-src\Launcher\Launcher\Release\BuildLog.htm"<br />
1>Launcher - 2 error(s), 4 warning(s)<br />
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========<br />
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,376
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1466
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Still Learning

Re: MSVC++ Express 8 error C2228

 
0
  #2
Dec 27th, 2008
warning c4996 -- Microsoft has declared many of the standard C functions from stdstring.h decpreciated (obsolete). The c and c++ standards say otherwise. So you have a choice: 1) ignore the warnings, they can be disabled with this pragma: #pragma warning(disable: 4996) , or 2) fix the problems by using Microsofts safe, but non-standard, replacements that are suggested in the warning. I just ignore and disable them.


The error on line 217: This is a true error. HWND is not a structure but a pointer.
Last edited by Ancient Dragon; Dec 27th, 2008 at 11:23 pm.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 3
Reputation: n321 is an unknown quantity at this point 
Solved Threads: 0
n321 n321 is offline Offline
Newbie Poster

Re: MSVC++ Express 8 error C2228

 
0
  #3
Dec 27th, 2008
Yea Im just ignoring the warnings. So in my code how would I go about fixing the c2228 error in 217? I know the code should work as I have compiled it before on an older version so it has to be something that has changed in the new version of MSVC++ Express or the new windows SDK. ( I was using the 2003 SDK and now Im using the 2008)
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,376
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1466
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Still Learning

Re: MSVC++ Express 8 error C2228

 
0
  #4
Dec 27th, 2008
I don't know how to do it because I have never seen HWND be a pointer to a structure with those items. I just tried it with VC++ 6.0 and it has the same problem. So I guess what you compiled before was wrong too. Check your work carefully -- my guess is that hwnd should not have been on those two lines.
Last edited by Ancient Dragon; Dec 27th, 2008 at 11:54 pm.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 3
Reputation: n321 is an unknown quantity at this point 
Solved Threads: 0
n321 n321 is offline Offline
Newbie Poster

Re: MSVC++ Express 8 error C2228

 
0
  #5
Dec 28th, 2008
well I tried to just remove the 2 lines and it built successfuly but the exe would not load IDP_BMPLOGO and when I close the error message the launcher opens with no title logo. Do you know of a way I could get this to work differently with out the HWND?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC