|
Hi There,
Yes, it seems easy for you to say!;P Actually, each object does have a unique ID.
What's this about a map? Could you expand on that part a little bit more?
Thanks for responding to the post!
Regards,
Paul...
|
|
|
|
|
Look up CMap (MFC) in MSDN - it basically gives you a hashing table into which you can add elements with a refrence key. When you want to retrieve the element, you give it the key, and it provides the object - very handy indeed
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
OK,
Thanks for the info. Right now I'm using a CArray which sound close to what a CMap does. Well, thanks for the advice.
Paul...
|
|
|
|
|
Yeah, you can think of a CMap as a ultra-dynamic array (since if you have elements 0, and 100, it wouldn't need to allocate memory for elements 1-99)
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
I made a program that didn't allow the computer to shut down by adding WM_QUERYENDSESSION function and always returning FALSE. Now that works when I try to shut down. However, at school my teacher uses a program called Shutdown.exe and that seems to shut down the computer even when my program is running. My question is what message is Shutdown.exe sending to my computer?
-Raffi
Why do today what can be put of until tommorrow?
|
|
|
|
|
I know how I would do it. Kill all processes myself, then close Windows.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
Is there any way to prevent it from killing my program?
-Raffi
Why do today what can be put of until tommorrow?
|
|
|
|
|
Raffi wrote:
Is there any way to prevent it from killing my program?
You really cannot prevent a process from being killed! Unless you really muck up the system and crash it, in which case they'd power-off and reboot anyway
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
Nish - Native CPian wrote:
in which case they'd power-off and reboot anyway
I was actually wondering whether it is possible for my process to survive after power-off and reboot....
Best regards,
Alexandru Savescu
|
|
|
|
|
Alexpro wrote:
I was actually wondering whether it is possible for my process to survive after power-off and reboot....
Heheheh. Good one Alex
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
Nish - Native CPian wrote:
You really cannot prevent a process from being killed!
Sure you can. Just create a (D?)COM server that never returns from a call. That hangs the machine (at least NT's) to the point that the only way you can stop the process is the reset-button or a power cycle. Easy as pie. There are a number of other techniques also, but this is the easiest to implement I think.
|
|
|
|
|
Why would you want to, apart from being a pain in the neck ?
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
Christian Graus wrote:
Why would you want to, apart from being a pain in the neck ?
CG, I've said this many times before. But I believe there is some strong underground campaign to bring out an annoyance kit which includes stuff like this
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
Christian Graus wrote:
pain in the neck
LOL CG!
neck, eh?
I bet that's the first time you had to say 'neck' after 'pain in the'
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
GREETINGS!
I think, you can.
1) Just make a timer and watch the Shutdown.exe . When it is loading just kill it.
2) Write the program "Shutdown.exe" and replace the original.
Good luck!
LOVE & PEACE to everyone
|
|
|
|
|
SAV wrote:
LOVE & PEACE to everyone
Your answer will not bring peace to everyone atleast it will be painful for those who can't shutdown their system.
|
|
|
|
|
Kill him before!
"Nelle cose del mondo non e' il sapere ma il volere che puo'."
|
|
|
|
|
Hi.
Is it possible to incorporate a link in an edit view? For example, let say the program displays this line:
-----
Here is a link to Google: www.google.com
-----
Okay. I would like it such that the user can click on part of the line "www...com" and the program can do things such as open a the default web browser or open a dialog box. What is the best way to incorporate a link type of feature in a CEditView?
Thanks,
Kuphryn
|
|
|
|
|
I don't think this is possible with CEditView (at least without alot of work.) However, CRichEditView can do this. I can't remember the exact flag you have to set, but I'm pretty sure there is one.
|
|
|
|
|
Thanks.
I was afraid of this even before I posted. I have put a lot of work into the program using CEditView. I am not sure how much time I will take going from CEditView to CRichEditView.
Kuphryn
|
|
|
|
|
You could try putting a static control on top of the edit control and putting the link text in the static control. And handle the mouse click.
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
Thanks.
I will look at adding a static control.
Kuphryn
|
|
|
|
|
I don't know how you can do it in a CEditView. In a CRichEditView you need to process the EN_LINK message.
Best regards,
Alexandru Savescu
|
|
|
|
|
|
Hi,
I'm looking for the online tutorial and sample code about how to implement threading through unix pipe facility instead of pThread. (in C++ or C programming)
Does anyone know where i can find a good resource in these areas? Does anyone know what is pipe and how to use it???
Thanks!!!
|
|
|
|