Home › Forums › C++ Programming › errors while executing vc++ code › Reply To: errors while executing vc++ code
@guru wrote:
Thanks for ur reply.
Here I am posting the errors and the code where i am getting these errors with line no.
1) Error 1 error C2146: syntax error : missing ‘;’ before identifier ‘HwndMSWheel’ c:program filesmicrosoft visual studio 8vcplatformsdkincludezmouse.h 141
2)Error 2 error C2433: ‘HWND’ : ‘inline’ not permitted on data declarations c:program filesmicrosoft visual studio 8vcplatformsdkincludezmouse.h 141
3)Error 3 error C4430: missing type specifier – int assumed. Note: C++ does not support default-int c:program filesmicrosoft visual studio 8vcplatformsdkincludezmouse.h 141
4)Error 4 error C2065: ‘PUINT’ : undeclared identifier c:program filesmicrosoft visual studio 8vcplatformsdkincludezmouse.h 142
5)Error 5 error C2146: syntax error : missing ‘)’ before identifier ‘puiMsh_MsgMouseWheel’ c:program filesmicrosoft visual studio 8vcplatformsdkincludezmouse.h 142
6)Error 6 error C4430: missing type specifier – int assumed. Note: C++ does not support default-int c:program filesmicrosoft visual studio 8vcplatformsdkincludezmouse.h 142
7)Error 7 error C2059: syntax error : ‘)’ c:program filesmicrosoft visual studio 8vcplatformsdkincludezmouse.h 146
8)Error 8 error C2143: syntax error : missing ‘;’ before ‘{‘ c:program filesmicrosoft visual studio 8vcplatformsdkincludezmouse.h 148
9)Error 9 error C2447: ‘{‘ : missing function header (old-style formal list?) c:program filesmicrosoft visual studio 8vcplatformsdkincludezmouse.h 148
The code is:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | __inline HWND HwndMSWheel( (141)<br /> PUINT puiMsh_MsgMouseWheel, (142)<br /> PUINT puiMsh_Msg3DSupport,<br /> PUINT puiMsh_MsgScrollLines,<br /> PBOOL pf3DSupport,<br /> PINT piScrollLines) (146)<br /> { (148)<br /> HWND hdlMsWheel;<br /> hdlMsWheel = FindWindow(MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE);<br /> *puiMsh_MsgMouseWheel = RegisterWindowMessage(MSH_MOUSEWHEEL);<br /> *puiMsh_Msg3DSupport = RegisterWindowMessage(MSH_WHEELSUPPORT);<br /> *puiMsh_MsgScrollLines = RegisterWindowMessage(MSH_SCROLL_LINES);<br /> if (*puiMsh_Msg3DSupport)<br /> *pf3DSupport = (BOOL)SendMessage(hdlMsWheel, *puiMsh_Msg3DSupport, 0, 0);<br /> else<br /> *pf3DSupport = FALSE; // default to FALSE<br /> if (*puiMsh_MsgScrollLines)<br /> *piScrollLines = (int)SendMessage(hdlMsWheel, *puiMsh_MsgScrollLines, 0, 0);<br /> else<br /> *piScrollLines = 3; // default<br /> return(hdlMsWheel);<br /> } |
I think this will be helpful in giving suggestions and modifications.
Thanku