|
If whatever you need to include also needs to be include in another file to work with your class (say for instance, one member returns a vector), then put the include in the header file.
Also, if your class (or whatever) encapsulates all dependencies then do not put the includes in the header file.
Jeremy Falcon
|
|
|
|
|
If the cpp uses the functions inside the h files put in the cpp otherwise put them somewhere where the functions could be used by the program.
It is advisable that you make a .h file that stores all the .h files you need.
for ex:
storing_h_files.cpp should be loking like this:
#include storing_h_files.h
storing_h_files.h should be loking like this:
#ifndef storing_h_files
#define storing_h_files
#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
.
.
.
.
.
.
.
#endif
gabby
|
|
|
|
|
How can I display My Computer folder in a CFileDialog? I tried with SHGetSpecialFolderPath , but the path is empty, i believe because Ny Computer is a vitual folder, not a system one or a real one.Thank you.
|
|
|
|
|
you can set a default directory if your CFileDialog opens.
look into the ONF structure or something.
Don't know if it will work with Virtual Folders though.
Good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Only some CSIDLs are supported with SHGetFolderPath() , and CSIDL_DRIVES is not one of them. You can, however, use CSIDL_DRIVES in conjunction with SHBrowseForFolder() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi
When I try to open .vcprj files which were created by converting c++ prjects I get this error: "The application for project '<project name="">.vcproj' is not installed. Make sure the application for the project type (.vcproj) is installed"
I have been expermenting with addins for the last couple of days, and handled the registry myself (for cleaning addin leftovers) so I probably erased one tto many registry entries.
Could you help me restore the right entry?
Thx
Naama
|
|
|
|
|
Hello everyone:
How to get back color of a dialog? Please help me.
Thank you.
-Freehawk
|
|
|
|
|
In OnInitInstance you can call SetBkDialogColour(i am not sure if the syntax is right) maybe there is a function also for getting the background color.
|
|
|
|
|
Have you looked at GetSysColor() ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Thank you for the reply.
I called GetSysColor(); It run good.
-Freehawk
|
|
|
|
|
Great! What COLOR_xxx value did you end up using?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi
I did as the following:
GetSysColor (COLOR_3DFACE)
I hope it can be useful for you.
-Freehawk
|
|
|
|
|
Question: It's required to make the simplified window
of preview goods. The window is consisted
of two parts - on the left it's the tree
of good's categories( only one level),on
the right side it's the list of goods co-
rresponding category.Attached to
the definite category in the tree in the list
on the right side the goods of this
category have been appeared.The window of
adding of goods is called by right click
of mouse in the right window and the window
of adding of category is called
by right click of mouse in the left window.
It's required to make the sql-scripts of
making of structure of database and for
inputing of data into database.
Igor Sidorov - 22th june 2004
|
|
|
|
|
Ok, so which part specifically of this overall design are you having trouble with?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello,
I created a class inherited from CBitmap to add some functionality like rotation, blur and so one.
Now I need to create a function that changes the color depth of the bitmap.
I need to convert the 24 bpp color bitmap into B/W, 8, 16, 256 Colors and 16 bpp I also need a function that converts from all the above color's depths to 24 bpp bitmap, the function perform save directly.
Any ideas
thanx in advance
Enjoy.
Ouss.
|
|
|
|
|
HI,
I wana to add tool bar , i not want to design then in Editor .. bcoz its diffcult .
I wanaa use BMP. how can i use BMP image on toolbar.
thanx
n if i wanna import A Toolbar .. wt extension it has ..
it only shows icon files to import.
thanx
|
|
|
|
|
That u fnd dsgning toolbrs in th rsrc-edtr 2 dffclt & instd wanna do it mnlly snds lke a bad wy of lrning.
The toolbar is a bitmap and a part in the resorce file (*.rc). If you want to see how it works, create a simple project with a toolbar. Then open the rc-file as text (it is a textfile) and search for your toolbar ID - if you have changed it, or just the word "toolbar". You'll see that it is composed of a bmp (that you can edit with another paint application), and a TOOLBAR -resource. You'll immediately understand the syntax
|
|
|
|
|
Johan Rosengren wrote:
That u fnd dsgning toolbrs in th rsrc-edtr 2 dffclt & instd wanna do it mnlly snds lke a bad wy of lrning.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
maybe it's an option to create one in the resources and customize it later? You can add-remove buttons, set a location, change the bmp's ......
using BMP's or ICON's is easy, you can use a CImageList.
Good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Can anyone please tell me why "C" and "C++" does not support nested functions?
|
|
|
|
|
Haven't you asked this before? What is a "nested function" -do you mean where you define a function inside a function, givinge the inner function access to the outer function local variables? Have you ever maintained such code? Then you don't need to ask
|
|
|
|
|
I have not used such a code defining function inside function. but i am eager to know why such a thing cannot be done. wht r the problems tht we come accross. does ur statement "givinge the inner function access to the outer function local variables" hold true?? I may sound silly, but i want to get it clarified.
|
|
|
|
|
Anonymous wrote:
i am eager to know why such a thing cannot be done
Of course it can be done, you just redefine the language
Anonymous wrote:
does ur statement "givinge the inner function access to the outer function local variables" hold true??
It is you asking about nested functions, I have no idea if you mean the Pascal flavour of this (slightly bizarre) concept. They give access to the local variables in the "function parent".
Why isn't this included in the C++ language definition? Who knows, I wasn't consulted - and if I had been, I had most certainly advocated against it
It leads to long and difficult-do-read functions, giving functionality that can be replaced by other constructs.
|
|
|
|
|
It does. Just put a class within another class, and hey presto - instant nested functions.
|
|
|
|
|
Probably because it is never necessary to have such a construct in C++.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|