|
I`m only a beginner to this kind of stuff but I think you could also try (as an alternative to Christians suggestion) using these statements to go at the top of the header file of the implementation of your class :
#ifndef YOURCLASSNAME_H
#define YOURCLASSNAME_H
You should then be able to #include the header into the .cpp file, and then #include the header anywhere you want. (Just make sure you specify YOURCLASSNAME_H all in capitals, for some reason it won`t work otherwise)
AEGC
|
|
|
|
|
Then you also need a
#endif
in the bottom of the headerfile...
If you only need to compile it in VC, you can get the same effect with a
#pragma once
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
That you do, cheers for the reminder Anders.
AEGC
|
|
|
|
|
>(Just make sure you specify YOURCLASSNAME_H all in capitals, for some reason it won`t work otherwise
Rubbish. You can use any case or any text, you just need to make sure it is unique across your project.
Michael
|
|
|
|
|
I've done the
#if !defined(_CLASSNAME_H)
#define _CLASSNAME_H
...
#endif
for all of my header files.
Stephen Caldwell
Blackfission, CEO
http://bf.steffc.yi.org:81
|
|
|
|
|
The only reason I said that was because I encountered a problem when the class name was in any other case but upper, and I couldn`t find a solution to the problem. Its good coding practice anyway to use all uppercase as a naming convention when defining classes! Check Steves example out above!
Alan.
|
|
|
|
|
Hi all,
I wanna know, can i write program with MFC, and i run on Linux ?
Does Linux support MFC classes ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
No, I'm pretty sure that you can't use MFC with linux. You can however program using the win32 api on linux using Wine. Wine is an implementation of the win32 api for unix systems. You can read more about it at Wine Developement HQ.
Stephen Caldwell
Blackfission, CEO
http://bf.steffc.yi.org:81
|
|
|
|
|
MFC programs will work on Wine too. As long as the required MFC DLLs are there
Nish
|
|
|
|
|
Oh okay, cool. I have been enlightened.
Stephen Caldwell
Blackfission, CEO
http://bf.steffc.yi.org:81
|
|
|
|
|
Thanks for your help !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Thanks for your help !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Wind/U might be a solution for you: http://www.bristol.com/windu/.
Peace!
-=- James.
|
|
|
|
|
Thanks for your help !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Most probably: Yes.
Have a look at WINE.
Using this, I think you can even recompile MFC to use native "winelib".
/Mike
|
|
|
|
|
Hi all,
I'm using Win98 SE ...
I have multi language in my operation system, English and Arabic ...
I'm writing Dialog-based program with MFC ...
How can i change language from Arabic to English ?
Please write source code .
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I've seen that some app's use a BMP as menus background, how can i do this?
|
|
|
|
|
Owner-draw it.
You might find some samples here in code project
Nish
|
|
|
|
|
I'm working on an icon handler which, most of the time, gets a file's normal icon with SHGetFileInfo(). Trouble is, SHGetFileInfo can only get 16x16 and 32x32 icons from the system image list (with SHGFILARGEICON and SHGFI_SMALLICON flags). Is there a way to get the 48x48 icons used in tile view? There's got to be a 48x48 system image list.
--Mike--
http://home.inreach.com/mdunn/
#include "witty_sig.h"
your with and
|
|
|
|
|
I have a button on my toolbar. At certimes i call a function which changes the bitmap of that button, however the buttons bitmap does not change unless you hover your mouse over the bitmap or dock or undock the toolbar. What code can i add to make it so the button's bitmap changes when i call the function?
<marquee>Raffi
|
|
|
|
|
From memory when I did it I called SetToolbarButton ( or whatever ) and it updated, although I may have called Invalidate on the button as well. I have a toolbar class on CP that allows setting of buttons though, check that out if you're stuck.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Fogot to Invalidate. Thanks alot!
<marquee>Raffi
|
|
|
|
|
Folks,
I KNOW there is a function I can use to ensure that a directory path exists. Basically, it will enumerate through all the folders in your path, an if it doesn't exist it will create it
UNKNOWNFUNCTIONAME ("C:\Name\Address\PhoneNumber");
If only C:\Name exists, it creates Address and Phone Number.
I'm working in VC6.0.... heelp..
Thx.
doner@obtain.com
|
|
|
|
|
There is a function
MakeSureDirectoryPathExists(PCSTR Pathname)
This function however is located in dbghelp.dll which you can /nedd to distribute with your application. for more information have a look in MSDN Platform SDK
cheers
Rainer
|
|
|
|
|
I use this:
#include <io.h>
BOOL FileExists(CString fn)
{
BOOL exists = FALSE;
if (!fn.IsEmpty()))
{
int status = _access((const char*)fn, 0);
if (status == 0)
{
exists = TRUE;
}
}
return exists;
}
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|