|
me think it's some typo in one of his .h file that gets propagated to other files.
|
|
|
|
|
for example from: http://www.cs.umbc.edu/~squire/download/WinUser.h
/****************************************************************************
* *
* winuser.h -- USER procedure declarations, constant definitions and macros *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
****************************************************************************/
#ifndef _WINUSER_
#define _WINUSER_
//
// Define API decoration for direct importing of DLL references.
//
#if !defined(_USER32_)
#define WINUSERAPI DECLSPEC_IMPORT
#else
#define WINUSERAPI
#endif
#ifdef _MAC
#include <macwin32.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifndef WINVER
#define WINVER 0x0500 /* version 5.0 */
#endif /* !WINVER */
#include <stdarg.h>
#ifndef NOUSER
typedef HANDLE HDWP;
typedef VOID MENUTEMPLATEA;
typedef VOID MENUTEMPLATEW;
#ifdef UNICODE
typedef MENUTEMPLATEW MENUTEMPLATE;
#else
typedef MENUTEMPLATEA MENUTEMPLATE;
#endif // UNICODE
...
....
.....
|
|
|
|
|
i was interested in seeing your copy of winuser.h , since that's what your compiler is looking at.
but, you should also take a look at your stdafx.h file and everything that it #includes, and make sure there are no obvious syntax errors there
|
|
|
|
|
I use Visual Assist, and the bracket after the line-extern "C" is red, so I may lose the latter bracket.
But I can not find where.
|
|
|
|
|
it is usually at the bottom of the file
|
|
|
|
|
bloodwinner wrote: pop out so many errors, which seemed don't even exist:
--------------------Configuration: 12 - Win32 Debug--------------------
Compiling...
StdAfx.cpp
c:\program files\microsoft visual studio\vc98\include\winuser.h(3) : error C2143: syntax error : missing ';' before '.'
Have you compiled a VC++ 6.0 project with VC++ 8.0?
|
|
|
|
|
no, only VC++6.0.
I just wanted to check winuser.h, maybe edited something unconsciously
|
|
|
|
|
On VC++ 2003...
I get tons of odd errors when I make a copy of a project (build directories and all) and try to compile it in the new location.
I have to do a rebuild (or delete the build directories) and the gazillion errors go away. I haven't a clue if this would help but it's worth a try.
|
|
|
|
|
bloodwinner wrote: pop out so many errors, which seemed don't even exist:
--------------------Configuration: 12 - Win32 Debug--------------------
Compiling...
StdAfx.cpp
Check your stdafx.h for missing semicolon or some other syntax errors.
There is some problem with your include statements. As the errors point towards this.
|
|
|
|
|
pop out so many errors, which seemed don't even exist:
--------------------Configuration: 12 - Win32 Debug--------------------
Compiling...
StdAfx.cpp
c:\program files\microsoft visual studio\vc98\include\winuser.h(3) : error C2143: syntax error : missing ';' before '.'
c:\program files\microsoft visual studio\vc98\include\winuser.h(3) : error C2501: 'winuser' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\winuser.h(3) : error C2143: syntax error : missing ';' before '.'
c:\program files\microsoft visual studio\vc98\include\winuser.h(27) : error C2143: syntax error : missing ';' before '{'
c:\program files\microsoft visual studio\vc98\include\winuser.h(27) : error C2447: missing function header (old-style formal list?)
c:\program files\microsoft visual studio\vc98\include\winuser.h(7127) : error C2014: preprocessor command must start as first nonwhite space
c:\program files\microsoft visual studio\vc98\include\winuser.h(7474) : error C2001: newline in constant
c:\program files\microsoft visual studio\vc98\include\winuser.h(8267) : error C2014: preprocessor command must start as first nonwhite space
c:\program files\microsoft visual studio\vc98\include\winuser.h(8292) : error C2014: preprocessor command must start as first nonwhite space
c:\program files\microsoft visual studio\vc98\include\winuser.h(8300) : error C2014: preprocessor command must start as first nonwhite space
c:\program files\microsoft visual studio\vc98\include\winuser.h(8309) : error C2014: preprocessor command must start as first nonwhite space
c:\program files\microsoft visual studio\vc98\include\winuser.h(8526) : error C2014: preprocessor command must start as first nonwhite space
c:\program files\microsoft visual studio\vc98\include\winuser.h(8529) : error C2014: preprocessor command must start as first nonwhite space
c:\program files\microsoft visual studio\vc98\include\winuser.h(8534) : error C2014: preprocessor command must start as first nonwhite space
c:\program files\microsoft visual studio\vc98\include\winuser.h(9427) : fatal error C1070: mismatched #if/#endif pair in file 'c:\program files\microsoft visual studio\vc98\include\winuser.h'
Error executing cl.exe.
12.exe - 15 error(s), 0 warning(s)
|
|
|
|
|
I see a BIG DIFFERENT in performance, between the following 2 methoods, WHY IS THAT?:
---------------Method 1-----------------------------
Class
{
Member x
Function()
{
Write to x;
}
}
Main()
{
Call function()
}
--------------Method 2:--------------------------------
Class
{
Function(member x)
{
Write to the member x;
}
}
Main()
{
Member x ;
Call function (x)
}
|
|
|
|
|
Haoman17 wrote: I see a BIG DIFFERENT in performance, between the following 2 methoods,
if the second method is faster, it could be because the constructor or destructor of 'Member' takes a long time.
if the first method is faster, it could be because you're doing a deep copy of 'x' when passing it.
|
|
|
|
|
Could you post the code you used in the testing?
Best,
Jun
|
|
|
|
|
They will execute at the same speed if you pass x by reference in Method 2. Otherwise, if Member is a complex datatype, Method 2 will run slower since it has to copy the value of x into the function before entering the function.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hello,
I have create a CComboBox with like that and when I click on the droplist it happend nothing but when I use push left or right key the value chang.
CComboBox * pcombo=NULL;
pcombo = new CComboBox;
pcombo->Create(WS_CHILD|WS_VISIBLE|CBS_DROPDOWNLIST, CRect(x,y,rect.Width(),20), this, i);
How can I create or witch propertie should I use to do what I want to do.
Thank You
AutreChien
|
|
|
|
|
Do you need to create it at runtime? Does changing the (height) value of 20 to something larger make any difference?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thank you , it's work now
AutreChien
|
|
|
|
|
Hi,
I'm developing a NT Service using .NET 2.0, its a multithreaded TCP server, this service will handle connections from many enterprise applications.
The challenge is to avoid a single-point-of-failure. My first idea was create a service instance capable of just redirect incoming calls to service instances which implement the concrete service.
This solution decrease service unavailability risk, but AFAIK real cluster services like App Center uses another approach, it creates a virtual server that can redirect incoming calls to an available server, this approach really solve the single-point-of-failure problem.
I'd like to use the same solution, how it can be done ?
Thanks for any help !
|
|
|
|
|
need (preferably) straight C code to retreive document properties from a microsoft word document. C++ is OK. but prefer C.
i have been looking at other versions, and can't get my head around the various snippets of code published. would like complete functionality.
thanks in advance.
|
|
|
|
|
dannyjoe wrote: would like complete functionality.
How much are you ready to pay for that ?
|
|
|
|
|
See here.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
share the resource like bitmap, dialog box or others.
|
|
|
|
|
Just add the .rc file to both projects (including the resource.h header file). This method may be quick, but it's wrong. You should really create a resource only dll, and link that to both projects.
|
|
|
|
|
Hi all,
I have an application that shows a dialog with a listview control. I added a "Print" button to this dialog (with ID "IDC_PRINT"). Now, all of a sudden, the close button (the cross in the top-right corner) acts as if this print button has been pressed rather than closing the dialog. How do I get things right again?
Thanks in advance for any advice,
William
|
|
|
|
|
Hi again,
Sorry, I should have investigated further. For some reason, Studio decided to define IDC_PRINT with a value of 2 rather than to add it into the normal sequence of IDC values. After doing so manually, things are in order again.
Regards,
William
|
|
|
|