|
Yeah,
I was wondering if linking the lib file would be of any help.
Pankaj
Without struggle, there is no progress
|
|
|
|
|
I can't seem to map my accelerator keys to my dialog.
I have mapped the Accelerator 'Alt + 1' to my Dialog class but the functions are not being called?
If I map the accelerator keys to my MainFrame (to try to forward them to my Dialog) then the functions are not called when the dialog box is displayed.
No matter what I do I cannot seem to use accelerator keys when a dialog box is being displayed.
I know I'm doing something stupid becuase I've seen this functionality before.
Any ideas?
Cheers
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
I should just RTFM before I start posting shouldn't I.
Figured it out from here:
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q222/8/29.ASP&NoWebContent=1
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
How to write an application to send email.
I have:
FROM_email_address.
TO_email_address.
Subject, body of mail.
After a click on the button, the content will be send.
|
|
|
|
|
|
hope that i can complete and post an article shortly.
[ It is possible to represent everything in this universe by using 0 and 1 ]
|
|
|
|
|
HI ALL
I want that every memory allocation will be tracked...
is there a way for me to overwrite the new and delete functions...
this and every other solution will be appreciated gracefully.
Objective: Tracking Memory Allocations
Thank you all...
-==--==--==--==--==--==-
=--= The Server =--=
-==--==--==--==--==--==-
|
|
|
|
|
The_Server wrote:
is there a way for me to overwrite the new and delete functions...
I'm assuming you meant to say overload , because new and delete are not functions; they are operators. In that case, no- these operators CANNOT be overloaded.
[EDIT]Red alert! Red alert! I made a horrifying mistake. Both new and delete can be overloaded. See all posts below.[/EDIT]
Regards,
Vikram.
-----------------------------
My site due for a massive update
1. Don't ask unnecessary questions. You know what I mean?
2. Avoid redundancy at all costs.
3. Avoid redundancy at all costs.
"Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.
|
|
|
|
|
Vikram Punathambekar wrote:
I'm assuming you meant to say overload , because new and delete are not functions; they are operators. In that case, no- these operators CANNOT be overloaded.
Vikram, I'm afraid you aren't right. The new operator calls a function to allocate memory and you can overload or rewrite that. There is also "placement new". Look up a good C++ reference for more info. "More Effectiver C++" covers this briefly. And there maybe articles here on CP about overloading new and delete if my memory serves me correctly.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Neville Franks wrote:
Vikram, I'm afraid you aren't right.
Yes, I'm afraid you're right. Punning apart, thanks for correcting me. Yes, new can be overloaded and so can delete .In fact, I guess even calls like
int *p=new int[10];
and
foo *ptr=new foo;
can be considered overloading, right? I wasn't drinking. I feel so dumb ...I wonder if learning VB is any fun?
Vikram.
-----------------------------
My site due for a massive update
1. Don't ask unnecessary questions. You know what I mean?
2. Avoid redundancy at all costs.
3. Avoid redundancy at all costs.
"Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.
|
|
|
|
|
I thought this warranted a second reply- new is an operator, isn't it? It calls a function alright, just like you have to define a function when you're overloading the + operator for, say, a Complex class. But that doesn't mean + becomes a function, even w.r.t. class Complex
And yeah, my 5 for pointing it out. Thanks,
Vikram.
-----------------------------
My site due for a massive update
1. Don't ask unnecessary questions. You know what I mean?
2. Avoid redundancy at all costs.
3. Avoid redundancy at all costs.
"Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.
|
|
|
|
|
Hi,
Both new and delete can be overloaded. Also, after overloading, you can still call the global new by ::new()
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Yes, I made a mistake . I don't even know what I confused it with. See my earlier post.
Thanx for pointing it out.
Vikram.
-----------------------------
My site due for a massive update
1. Don't ask unnecessary questions. You know what I mean?
2. Avoid redundancy at all costs.
3. Avoid redundancy at all costs.
"Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.
|
|
|
|
|
1st of all: I want to thank all of you for your interest...
2nd: How can I overload the new and delete functions?
Thank you all
The Server
|
|
|
|
|
1st of all: I want to thank all of you for your interest...
2nd: How can I overload the new and delete functions?
Thank you all
The Server
|
|
|
|
|
You an overload class specific new and delete as:
void * operator new (size_t size)
{
// do your thing
}
void operator delete (void * mem)
{
if (mem)
// do yout thing
}
You can also overload the global new and delete. Example, you can define something like:
void * operator new (size_t size, char * fileName);
void operator delete (void * p, char * fileName);
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Dear Pankaj and every one that reads this message
Thank you
...
Only one question that which the most disturbing
How do I call the Object's constructor(if is object?)
=-=-=-=--=-=-=-=-=
The Server
=-=-=-=--=-=-=-=-=
|
|
|
|
|
|
Hi
Im trying to figure out subject but I cant get it to work. I have no problem saving but when I want to load the data again I have to somehow know what type of object it is and then create it...how do I do that?
Tnx in advance!!!
|
|
|
|
|
The easiest way is to precede the class in the file with an enumerator that indicates what sort of object follows.
|
|
|
|
|
Why don't you put all your objects in a CObArray and use the CObArray::Serialize to read and write?
|
|
|
|
|
Hi friends,
Anybody have an idea how to get the details of the clients, workstation in a network ???
I thought it will be possible with NetBIOS. Is there any API for using that ??
Any suggestion regarding this will be very useful for my project.
Thanks & Regards
Satya
|
|
|
|
|
These should get you started:
WNetOpenEnum()<br />
WNetEnumResource()<br />
NetWkstaGetInfo()<br />
NetWkstaUserGetInfo()<br />
NetWkstaUserEnum()
|
|
|
|
|
hi david,
can i get some examples for these calls or any links for the examples.
regards
satya
|
|
|
|
|