•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 391,548 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,539 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:
Views: 2155 | Replies: 9
![]() |
•
•
Join Date: Jun 2006
Posts: 8
Reputation:
Rep Power: 0
Solved Threads: 0
Hi
I have one opensource of vc++. While executing this code it is giving the following errors.
1)error C2433: 'HWND' : 'inline' not permitted on data declarations
2)error C2143: syntax error : missing ';' before '{'
3)error C2447: '{' : missing function header (old-style formal list?)
4)error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
5)error C2086: 'int CALLBACK' : redefinition
If any one got these errors and knew the solution please let me know.
Thank You
angle
I have one opensource of vc++. While executing this code it is giving the following errors.
1)error C2433: 'HWND' : 'inline' not permitted on data declarations
2)error C2143: syntax error : missing ';' before '{'
3)error C2447: '{' : missing function header (old-style formal list?)
4)error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
5)error C2086: 'int CALLBACK' : redefinition
If any one got these errors and knew the solution please let me know.
Thank You
angle
While my crystal ball is out for polishing, why not post the lines of code associated with these errors?
•
•
Join Date: Jun 2006
Posts: 8
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Originally Posted by Dave Sinkula
While my crystal ball is out for polishing, why not post the lines of code associated with these errors?
Hi,
Thanks for ur reply. Here I am posting the errors and codelines where i am getting the errors.
1)Error 1 error C2146: syntax error : missing ';' before identifier 'HwndMSWheel' c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 141
2)Error 2 error C2433: 'HWND' : 'inline' not permitted on data declarations c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 141
3)Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 141
4)Error 4 error C2065: 'PUINT' : undeclared identifier c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 142
5)Error 5 error C2146: syntax error : missing ')' before identifier 'puiMsh_MsgMouseWheel' c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 142
6)Error 6 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 142
7)Error 7 error C2059: syntax error : ')' c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 146
8)Error 8 error C2143: syntax error : missing ';' before '{' c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 148
9)Error 9 error C2447: '{' : missing function header (old-style formal list?) c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 148
The code is:
__inline HWND HwndMSWheel( (141) PUINT puiMsh_MsgMouseWheel, (142) PUINT puiMsh_Msg3DSupport, PUINT puiMsh_MsgScrollLines, PBOOL pf3DSupport, PINT piScrollLines) (146) { (148) HWND hdlMsWheel; hdlMsWheel = FindWindow(MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE); *puiMsh_MsgMouseWheel = RegisterWindowMessage(MSH_MOUSEWHEEL); *puiMsh_Msg3DSupport = RegisterWindowMessage(MSH_WHEELSUPPORT); *puiMsh_MsgScrollLines = RegisterWindowMessage(MSH_SCROLL_LINES); if (*puiMsh_Msg3DSupport) *pf3DSupport = (BOOL)SendMessage(hdlMsWheel, *puiMsh_Msg3DSupport, 0, 0); else *pf3DSupport = FALSE; // default to FALSE if (*puiMsh_MsgScrollLines) *piScrollLines = (int)SendMessage(hdlMsWheel, *puiMsh_MsgScrollLines, 0, 0); else *piScrollLines = 3; // default return(hdlMsWheel); }
I think this is helpful for u to find the solutions.
Thanku
angel
Last edited by cscgal : Jun 12th, 2006 at 4:27 pm.
What about your source code, does it include windows.h before including any other windows header file?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
As the diagnostic message is heavily hinting for you to do, look at the code before line 141. Why do you have code in a header?
•
•
•
•
Error 1 error C2146: syntax error : missing ';' before identifier 'HwndMSWheel' c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 141
__inline HWND HwndMSWheel( /* 141 */
PUINT puiMsh_MsgMouseWheel, /* 142 */
PUINT puiMsh_Msg3DSupport,
PUINT puiMsh_MsgScrollLines,
PBOOL pf3DSupport,
PINT piScrollLines) /* 146 */
{ /* 148 */
HWND hdlMsWheel;
hdlMsWheel = FindWindow(MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE);
*puiMsh_MsgMouseWheel = RegisterWindowMessage(MSH_MOUSEWHEEL);
*puiMsh_Msg3DSupport = RegisterWindowMessage(MSH_WHEELSUPPORT);
*puiMsh_MsgScrollLines = RegisterWindowMessage(MSH_SCROLL_LINES);
if ( *puiMsh_Msg3DSupport )
*pf3DSupport = (BOOL)SendMessage(hdlMsWheel, *puiMsh_Msg3DSupport, 0, 0);
else
*pf3DSupport = FALSE; // default to FALSE
if ( *puiMsh_MsgScrollLines )
*piScrollLines = (int)SendMessage(hdlMsWheel, *puiMsh_MsgScrollLines, 0, 0);
else
*piScrollLines = 3; // default
return(hdlMsWheel);
} Last edited by Dave Sinkula : Jun 12th, 2006 at 9:24 am.
Is it this? What's in afxwin.h? You need to
•
•
•
•
Originally Posted by angle188.shroff
In my source code windows.h is not included. afxwin.h is included in that code.
#include <windows.h> before you #include "zmouse.h". #include <windows.h> #include "zmouse.h"
Last edited by Dave Sinkula : Jun 13th, 2006 at 9:33 am.
•
•
Join Date: Jun 2006
Posts: 8
Reputation:
Rep Power: 0
Solved Threads: 0
Hi thanks for ur reply.
The code is like this,
#include<stdlib.h>
#include<malloc.h>
#include<memory.h>
#include<tchar.h>
#include<zmouse.h>
I included <windows.h>. Then it is giving the following error
Error 1 fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxv_w32.h 16
What I have to do now?
Thanku
The code is like this,
#include<stdlib.h>
#include<malloc.h>
#include<memory.h>
#include<tchar.h>
#include<zmouse.h>
I included <windows.h>. Then it is giving the following error
Error 1 fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxv_w32.h 16
What I have to do now?
Thanku
Boy, you're really trying hard not to be helped.
Post copy-and-paste of real code, not "like this" paraphrasing. Where?!? This is important to the question.
So, you've got an MFC project? Why are you adding old mouse stuff to it? I know neither area very well, but please tell us what the heck you are trying to do.
Post copy-and-paste of real code, not "like this" paraphrasing.
•
•
•
•
I included <windows.h>.
So, you've got an MFC project? Why are you adding old mouse stuff to it? I know neither area very well, but please tell us what the heck you are trying to do.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
access activation api blogger blogging blogs code coding combo compilers dani daniweb data debugging development dreamweaver dropdownlist errors gdata google gpl html innovation key languages linux microsoft module net news openbsd product programming reuse rss serial source tags vista web wysiwyg xml
- Previous Thread: Need Help In C++
- Next Thread: DB and C++



Linear Mode