|
#define is a preprocessor job, it simply defines text to replace in source code before it's passed to compiler. It does know nothing about types.
Pavel
Sonork 100.15206
|
|
|
|
|
Yeah! He's right. This code:
#define XXX void function(int r)
static XXX
{
}
will be seen by the comiler as:
static void function(int r)
{
}
You can write anything after #define
Ñ There is only one MP Ð
|
|
|
|
|
why not consider:
const char xmlBeginStatement[] = "<";
some would consider it be be 'better form'.......
Just trying to keep the forces of entropy at bay
|
|
|
|
|
I did. I had decided on using defines at the time. I'm certainly not married to it, however.
|
|
|
|
|
Meyer's will argue that using const definitions over #define is the way to go...I agree with him....
Just trying to keep the forces of entropy at bay
|
|
|
|
|
|
how about INT_MAX? It's defined in limits.h
|
|
|
|
|
if you do a search for LARGE_INTEGER in the index of MSDN, you will find its entry. Here's the brief:
The LARGE_INTEGER structure is used to represent a 64-bit signed integer value.
Header: Declared in Winnt.h; include Windows.h.
|
|
|
|
|
It's defined in winnt.h
#if defined(MIDL_PASS)
typedef struct _LARGE_INTEGER {
#else // MIDL_PASS
typedef union _LARGE_INTEGER {
struct {
DWORD LowPart;
LONG HighPart;
};
struct {
DWORD LowPart;
LONG HighPart;
} u;
#endif //MIDL_PASS
LONGLONG QuadPart;
} LARGE_INTEGER;
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
|
I have looked through all the postings on this website and no one seems to have a reasonable answer to the question of using a container and microsoft word. And I am going to post the question, hopefully someone will have a useful idea. I am using VC++ 6.0 and I am trying to create a COM exe or dll. This is what I am doing: I am creating a frame window and automatically opening an ms word document so basically, it is a container window for microsoft word. This part I can get to work but there are some problems. Why are there several toolbar buttons disabled? How can I enabled them? Why does the print/print preview not work? I am not using ATL (and I prefer not too). Also, if I add a menu option of my own, how do I know when the user has selected my menu option? I have researched this through this website and MSDN and I am doing everything that was suggested. But it still isn't working. I have seen similar posting but all the answers have been things like "have you tried to record a macro through VB." and such, things that really don't help. CAN ANYONE OUT THERE HELP ME??????? IS THIS AN INFINITE PROBLEM THAT ONLY MICROSOFT CAN SOLVE??????? IS IT HOPELESS????
|
|
|
|
|
I wouldn't think print preview would work when word in embeded. That should be up to the main application.
Todd Smith
|
|
|
|
|
Actually, MSDN and a few posting suggest doing this:
BOOL CXOfficeView::OnPreparePrinting(CPrintInfo* pInfo)
{
if (!CView::DoPreparePrinting(pInfo))
return FALSE;
if (!COleDocObjectItem::OnPreparePrinting(this, pInfo))
return FALSE;
return TRUE;
}
According to most of the documentation, this should work because print preview would call the print. This doesn't work.
Also, what about the standard print, it doesn't work. And the toolbar buttons!
|
|
|
|
|
Please, how can I detect if my network card works in full or half duplex mode?
|
|
|
|
|
I need to add an Outlook toolbar to a .NET form? Does .NET come with such a feature? If not is there a free way to do this or must a component be purchased? If a componentmust be purchased does anyone recommend one for C++ .NET forms?
Many Thanks,
Derek
|
|
|
|
|
|
I've created a resource with the resource editor inside vc6. A resource.h has also been created. It contains several ID's used by the dialog.
My question is this: can I safely move all those ID's to another header file and completely remove (delete) resource.h ? Will the resource editor still work after that? Or do I have to change something somewhere in the project's preferences (most likely)?
btw. It's obvious that I have to change all the resource.h includes
using: [VISUAL STUDIO 6.0] [WIN98/2]
|
|
|
|
|
the resources are in a .rc file, and you'll need to change the include in there also! I don't know how VC will react to that!
Max.
|
|
|
|
|
I'm assuming you're playing with VC6; there's 'Resource includes' option in view menu which allows you to specify other resource ID header. If you just delete resource.h, .rc file probably won't load.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
But I can move the definitions and still open the resource editor if I keep an empty resource.h?
If you open the rc-file with a text editor, resource.h is in it 2 times. Maybe deleting that will do it.
Better to make a copy now
using: [VISUAL STUDIO 6.0] [WIN98/2]
|
|
|
|
|
Grote Smurf wrote:
But I can move the definitions and still open the resource editor if I keep an empty resource.h?
I don't think so.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Did it, removed resource.h and it works fine.
using: [VISUAL STUDIO 6.0] [WIN98/2]
|
|
|
|
|
You've removed resource.h from project *and* from disk as well?
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
yep
using: [VISUAL STUDIO 6.0] [WIN98/2]
|
|
|
|
|
that worked?
|
|
|
|