Click here to Skip to main content
15,913,090 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: capCreateCaptureWindow - change window title after creation? Pin
Vaclav_3-Dec-08 7:43
Vaclav_3-Dec-08 7:43 
GeneralRe: capCreateCaptureWindow - change window title after creation? Pin
Mark Salsbery3-Dec-08 9:20
Mark Salsbery3-Dec-08 9:20 
GeneralRe: capCreateCaptureWindow - change window title after creation? Pin
Vaclav_3-Dec-08 10:51
Vaclav_3-Dec-08 10:51 
QuestionMultiByteWideChar and € (Euro sign) Pin
BadJerry3-Dec-08 6:35
BadJerry3-Dec-08 6:35 
AnswerRe: MultiByteWideChar and € (Euro sign) Pin
YoungJin Shin3-Dec-08 18:58
YoungJin Shin3-Dec-08 18:58 
QuestionGina and TSE Pin
Narfix3-Dec-08 5:51
professionalNarfix3-Dec-08 5:51 
QuestionRe: Gina and TSE Pin
Narfix4-Dec-08 5:27
professionalNarfix4-Dec-08 5:27 
Questionzmouse.h and prsht.h errors in BOTH my afx projects for no reason... Pin
CalvinB3-Dec-08 5:30
CalvinB3-Dec-08 5:30 
Hello all,

I am having some issues with a few of my projects at work here. I have one which is a service using the afx dll and one which is a mfc project and also includes the afx dll. The reason I am pointing out that the afx dll is included is that I have a project which does not use stdafx.dll or #define _AFXDLL and it still compiles fine.

The weird thing is it worked on Wednesday before the Thanksgiving vacation. I even have an installer that I had created. When I got back to work on Monday, it gives me these 13 errors:

from zmouse.h:
Error 1 error C2146: syntax error : missing ';' before identifier 'HwndMSWheel'
Error 2 error C2433: 'HWND' : 'inline' not permitted on data declarations
Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 4 error C2065: 'PUINT' : undeclared identifier
Error 5 error C2146: syntax error : missing ')' before identifier 'puiMsh_MsgMouseWheel'
Error 6 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 7 error C2059: syntax error : ')'
Error 8 error C2143: syntax error : missing ';' before '{'
Error 9 error C2447: '{' : missing function header (old-style formal list?)

from prsht.h:
Error 10 error C2065: 'CALLBACK' : undeclared identifier
Error 11 error C2065: 'LPFNPSPCALLBACKA' : undeclared identifier
Error 12 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 13 fatal error C1903: unable to recover from previous error(s); stopping compilation


I even rebuilt my service from scratch, just copy and pasting code into the new project from my old project. That did not work.

Like I said before, it worked on Wednesday, I did not touch it for four days, and on Monday I tried to compile it and it would not work. It has the same exact errors no matter which settings I choose in my project settings, or which order my includes are in. I am really at a loss here, and was wondering if anyone else has ran across this.

I redownloaded and reinstalled the Windows SDK. No worky.

I have tried to research this extensively but the only advice I see is to include windows.h before zmouse. I am not actively including zmouse, however, so I am not sure why it is erroring.

Here is my stdafx.h:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
#pragma once

#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers

#define _AFXDLL
#include afxsock.h
#include stdio.h
#include tchar.h
#include winsock2.h
#include ws2tcpip.h
// TODO: reference additional headers your program requires 


It is a pretty basic project which just uses a 3rd party SDK to connect to and control a telephone PBX. I need the socket classes in there to communicate with one of the companies servers.

Here is the stdafx.h from my other project (uses a SDK to create a video viewer that connects to a DVR out in the field). This project was one I inherited from another developer, then modified it when the clients wanted something added. This one compiled fine as well, until this Thanksgiving weekend.

// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently

#pragma once

#define WM_MYTHREADMESSAGE (WM_USER+1)

#ifndef _SECURE_ATL
#define _SECURE_ATL 1
#endif

#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN		// Exclude rarely-used stuff from Windows headers
#endif

// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER				// Allow use of features specific to Windows XP or later.
#define WINVER 0x0501		// Change this to the appropriate value to target other versions of Windows.
#endif

#ifndef _WIN32_WINNT		// Allow use of features specific to Windows XP or later.                   
#define _WIN32_WINNT 0x0501	// Change this to the appropriate value to target other versions of Windows.
#endif						

#ifndef _WIN32_WINDOWS		// Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif

#ifndef _WIN32_IE			// Allow use of features specific to IE 6.0 or later.
#define _WIN32_IE 0x0600	// Change this to the appropriate value to target other versions of IE.
#endif

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS	// some CString constructors will be explicit

// turns off MFC's hiding of some common and often safely ignored warning messages
#define _AFX_ALL_WARNINGS


#include afxwin.h	// MFC core and standard components
//#include windows.h
#include afxext.h // MFC extensions

#include afxdisp.h      // MFC Automation classes


#ifndef _AFX_NO_OLE_SUPPORT
#include afxdtctl.h	// MFC support for Internet Explorer 4 Common Controls
#endif
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include afxcmn.h		// MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT




I would greatly appreciate any help on this and any more information you may need I will be glad to post.

I am using Visual Studio 2008
Windows XP Service pack 3
.NET Framework 3.5
Windows SDK 2008 for XP SP 2

The only thing I can think is that this weekend my computer downloaded an update when I was sleeping... but I have also researched that extensively and could find nothing on it.




EDIT: I had to take the greater and less than's off my includes so they would show. That is *NOT* a syntax error.
AnswerRe: zmouse.h and prsht.h errors in BOTH my afx projects for no reason... Pin
CalvinB5-Dec-08 2:30
CalvinB5-Dec-08 2:30 
QuestionCan't receive broadcast UDP at the socket [modified] Pin
fizzoxx3-Dec-08 5:16
fizzoxx3-Dec-08 5:16 
QuestionRe: Can't receive broadcast UDP at the socket Pin
led mike3-Dec-08 6:49
led mike3-Dec-08 6:49 
AnswerRe: Can't receive broadcast UDP at the socket Pin
fizzoxx3-Dec-08 21:18
fizzoxx3-Dec-08 21:18 
GeneralRe: Can't receive broadcast UDP at the socket Pin
led mike4-Dec-08 5:26
led mike4-Dec-08 5:26 
AnswerRe: Can't receive broadcast UDP at the socket Pin
fizzoxx5-Dec-08 0:54
fizzoxx5-Dec-08 0:54 
Questionkeyboardmanger() class Pin
hnaghdali3-Dec-08 2:33
hnaghdali3-Dec-08 2:33 
QuestionRe: keyboardmanger() class Pin
sashoalm3-Dec-08 2:47
sashoalm3-Dec-08 2:47 
AnswerRe: keyboardmanger() class Pin
Maximilien3-Dec-08 3:20
Maximilien3-Dec-08 3:20 
AnswerRe: keyboardmanger() class Pin
Jijo.Raj3-Dec-08 9:27
Jijo.Raj3-Dec-08 9:27 
QuestionDisabling Propery sheet close button Pin
koumodaki3-Dec-08 2:19
koumodaki3-Dec-08 2:19 
AnswerRe: Disabling Propery sheet close button Pin
Nishad S3-Dec-08 3:49
Nishad S3-Dec-08 3:49 
GeneralRe: Disabling Propery sheet close button Pin
koumodaki3-Dec-08 16:57
koumodaki3-Dec-08 16:57 
QuestionWhat is the best way of handling a code like Pin
ComplexLifeForm3-Dec-08 2:02
ComplexLifeForm3-Dec-08 2:02 
AnswerRe: What is the best way of handling a code like Pin
KarstenK3-Dec-08 3:47
mveKarstenK3-Dec-08 3:47 
QuestionGeneric report writer VC++ Pin
Member 2755193-Dec-08 1:11
Member 2755193-Dec-08 1:11 
AnswerRe: Generic report writer VC++ Pin
Nishad S3-Dec-08 3:53
Nishad S3-Dec-08 3:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.