|
CYourApp d'tor will be called after frame window is destroyed, because application object is global and frame window is created dynamically.
Of course, when application destructor is invoked you don't have any documents/views/frames.
Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
|
|
|
|
|
Going through some files from another programmer, I found that he always put a using namespace std; in his public headers. Trying to limit the scope of the using I tried to move the using clause inside the class declaration
class C
{
using namespace std;
}; but it results in a compilation error on VC6.0 sp5. But it shouldn't!? Anyone have an idea here?
(I finally qualified every single item from the std namspace.)
|
|
|
|
|
Niklas Lindquist wrote:
But it shouldn't!?
Why?
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
I suppose, since you may limit the scope of using to within any other scope, like functions, other namespaces, limited scopes with a { and a corresponding }, it should be possible to us it within a class declaration. That was at least what I thought. Why may I use it within, what seems to be any other scope, but not within a class or struct declaration?
|
|
|
|
|
Niklas Lindquist wrote:
Why may I use it within, what seems to be any other scope, but not within a class or struct declaration?
Well, you can't use it because C++ Standard forbids it explicitly:
"A using-directive shall not appear in class scope, but may appear in
namespace scope or block scope." (C++ Standard, 7.3.4).
Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
|
|
|
|
|
Thank you. I feel better now
Do you have any idea why it is has been forbidden? I can't see any clear reason. Does it introduce any problems, and if so what?
|
|
|
|
|
Niklas Lindquist wrote:
Do you have any idea why it is has been forbidden?
I was able to find some discussions on that using Google newsgroup search, but none had satisfactory answers. If you accidentally meet Bjarne in the pub, ask him and let us all know
Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
|
|
|
|
|
Will do!
Thanks for the help.
|
|
|
|
|
Hi All,
I'm working on an application that would get system information for each machine on a network and report it back to the central database.
I was looking for a function to get the CPU Speed (MHz), however couldn't find one.
Are there any functions that would return the CPU speed? (Using Win API to do this.)
Thanks.
Regards,
Venet.
Donec eris felix, multos numerabis amicos.
|
|
|
|
|
Have a look at this[^] Venet. Might help
Actually.. This one might be better http://www.codeproject.com/system/sysinfo.asp[^]
"When a friend hurts us, we should write it down in the sand, where the winds of forgiveness get in charge of erasing it away, and when something great happens, we should engrave it in the stone of the memory of the heart, where no wind can erase it" Nish on life [methinks]
"It's The Soapbox; topics are optional" Shog 9
|
|
|
|
|
Thanks Brian,
Looks good.
P.S. I hope you got my e-mail yesterday on snet? MY ^D is assigned to SoftICE!!!
Regards,
Venet.
Donec eris felix, multos numerabis amicos.
|
|
|
|
|
Venet wrote:
MY ^D is assigned to SoftICE!!!
What ya using SoftICE for???? I presume it's TSSG's copy?
"When a friend hurts us, we should write it down in the sand, where the winds of forgiveness get in charge of erasing it away, and when something great happens, we should engrave it in the stone of the memory of the heart, where no wind can erase it" Nish on life [methinks]
"It's The Soapbox; topics are optional" Shog 9
|
|
|
|
|
Brian Delahunty wrote:
What ya using SoftICE for???? I presume it's TSSG's copy?
Yep, same as machine that I'm using it in.
btw. got the problem sorted. Works quite well after few tweaks.
Regards,
Venet.
Donec eris felix, multos numerabis amicos.
|
|
|
|
|
Hello,
Is there a way to specify the position of the underline of a font ?
thanx
|
|
|
|
|
Set lfUnderline to TRUE in LOGFONT.
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
I know how to set the underline attribute, but i want to set the position (relative to the baseline) of the line. If possible !
Thanks anyway.
|
|
|
|
|
Sorry - I've misunderstood your question.
You don't have any control over position of underline drawn by GDI. You'd have to create non-underline font and draw line yourself at position of your choice.
Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
|
|
|
|
|
Thanks, I'll have to code
ps : your .scr is cool !
|
|
|
|
|
My database has a Image field.How can I show each image in my application?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
what is your doubt ?
Is it abt retrieving the image
from the database or show the
bitmap on the screen ?
If it is abt the retrieving and
assuming that you are using binary
you can use the method GetChunk
to read the binary data from the
database.
If abt the bitmap, there are a lot
of articles here at CP.
|
|
|
|
|
Thanks for reply.
Prem Kumar wrote:
Is it abt retrieving the image
from the database or show the
bitmap on the screen ?
What is abt?
Prem Kumar wrote:
If it is abt the retrieving and
assuming that you are using binary
you can use the method GetChunk
to read the binary data from the
database.
My field is Image(OLE Object) and I think you are right.So I have to go and check those articles now.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Mazdak wrote:
What is abt?
I'm guessing it means about
"When a friend hurts us, we should write it down in the sand, where the winds of forgiveness get in charge of erasing it away, and when something great happens, we should engrave it in the stone of the memory of the heart, where no wind can erase it" Nish on life [methinks]
"It's The Soapbox; topics are optional" Shog 9
|
|
|
|
|
I'm guessing this is programmer/company specific but what does doumenting your source code usually entail...?
More than comments obviously...?
I was looking at a mechanics manual for an 87 Camaro and thought...how detailed...any moron could figure out how to fix a car (Camaro anyways) using this book as a guide. Then I thought...you could probably do the same for source code you write...step by step explanations and pictures (where appropriate) giving anyone with knowledge in C++ the ability to quickly make changes or fix bugs. After some more thought however...I realized that software changes all the damn time and to keep a book of that size up to date would require to much time. So my question is this...How much time and effort do you spend documenting your source code...???
I've never done this, but i'm starting to develope quite the number of *.cpp files w/ *.h and i'm finding it harder and harder to sift through my code and extract cool code when needed and actually understanding what it does without having to break it down. I'm thinking docs would really help...but i'm at a loss as to how much time one should spend...i'd like to learn from others past experiences and hear what you have to say about the most efficient time useage. I figure...to little and your not gonna understand what your docs are saying later on and too much and your wasting time which could be spent doing somehting else...
Actually I guess I don't figure...it's common sense...
Anyways....this is what I would like to know...keep in mind i'm an individual programmer, not a major CORP. like M$....
Cheers
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
If done properly the design document you wrote before writing the actual code should be enough. Of course this is an imperfect world. I spend about 60% of my project time writing the design docs and then about 20% doing the actual coding. You have to get into the habit of designing first and then coding. The hardest habit to pick-up is revising your design docs when you make coding alterations.
I tend to approach a project from the point of view of somebody else doing the actual coding, this helps to make your documentation better. It's hard but once you get into the habit, development life is much easier.
Michael
Time flies like an arrow. Fruit flies like a banana
|
|
|
|
|
I wanna use SendMessage() or any other function in my InitInstance() to close application in a condition.But I cant find correct argument for it.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|