|
You try using the win32 API function EnumChildWindows().
Stephen Caldwell
Desick Information Technologies
|
|
|
|
|
What's up! I am trying to make a program that I am developing bullet
proof. What I need to do is prevent a user to use the "control-alt-delete" button
to kill a program. He needs to gracely terminate the program by using the programs
own termination buttons. Does anybody know how to accomplish this? The program
shows up in the taskmanager window. If this is not possible is there a hack to keep
a program out of the taskmanager and at the same time keep it running? This program
runs under win9x,ME and 2000. Is there also a possibility if they do get to the
program that is running and when they kill it ungracefully that I can make their
machine hang?
Thanks in advance,
Raymond
Raymond Bentoera
Cybergate Interactive
|
|
|
|
|
Well, as a user, I definitely don't like programs that can't be killed. And making somebody's machine hang after killing the process seems to be the activity of worm/virus.
Tomasz Sowinski
http://www.shooltz.com.pl
|
|
|
|
|
Hi,
My problem is similar to the one replied .It is related to process hiding in the TaskManager .I have a parent process running .The child process of this parent should not be able to see it's parent process in the TaskManager !But the aprent process will be runing . I want to show the parent when the child process is killed .How can I do it ?
Thanx in advance for the help !
Y.Yamini Devi
|
|
|
|
|
As a programmer I do not like users trying to cheat programs that I have developed. That is why I need to find a way to discourage these power users from cheating the software. Ok, let's try to explore a nicer way of discouraging the user to ungracefully kill the program. The idea of the software is not to disable the user from running the software. Because the software has its own way of closing it. It has its own close button. But the problem is that there is a way of cheating the program by using 'cntrl-alt-delete'. I am implementing the software now to run a s a service in win 95, 98 and ME. But I have a problem with windows 2000. You can see all the services that are running. Also I would like to explore another way of making this program bulletproof. The program I am writing is a free Internet Dialer program where the user gets a banner window that he should not be able to close if he is surfing online using this software. Another problem might be third party software like "system properties" that will unhide programs from the taskbar. That is why I would like to explore other ways of making this program bulletproof. Do you know of anyway this program can disconnect the user if it uses 'cntrl-alt-delete' instead of closing the program using its closing button. The software uses windows dialup networking to dial. If somebody knows a way how to make this program bulletproof please send me your remarks.
Thanks in advance,
Raymond Bentoera
Cybergate Interactive
|
|
|
|
|
You can't kill the service processes from Task Manager in Win2000 - you'll get the 'Access is denied' message.
Tomasz Sowinski
http://www.shooltz.com.pl
|
|
|
|
|
> The program I am writing is a free Internet Dialer program where
> the user gets a banner window that he should not be able to close
> if he is surfing online using this software.
So where's the problem? Just display a msgbox saying "You'll be disconnected if the banner window is closed. Close anyway?"
Tomasz Sowinski
http://www.shooltz.com.pl
|
|
|
|
|
I have implemented that message window already when the users click on the close button of the window. But that is not the problem. The problem is that at the moment the users can use 'cntrl-alt-delete' to kill the banner window. This way the banner window will disappear and the connection stays. So the user will be able to keep using the connection illigitimately Do you know of a way to also kill the connection when the user uses the 'cntrl-alt-delete' buttons. Or do you know a way to implement this?
Thanks in advance,
Raymond Bentoera
Cybergate Interactive
|
|
|
|
|
I'd periodically (once per minute?) check in dialer process if window is still open. If no banner window is open, the connection is terminated.
Tomasz Sowinski
http://www.shooltz.com.pl
|
|
|
|
|
Yes, but I will need to have a seperate process check this out since if I make it part of the dialer window If it is killed it wont be able to check if the dialer window is still open.
Thanks I will give this a try.
Raymond.
Raymond Bentoera
Cybergate Interactive
|
|
|
|
|
Hi there! I am trying to make a program that I am developing bullet
proof. What I need to do is prevent a user to use the "control-alt-delete" button
to kill a program. He needs to gracely terminate the program by using the programs
own termination buttons. Does anybody know how to accomplish this? The program
shows up in the taskmanager window. If this is not possible is there a hack to keep
a program out of the taskmanager and at the same time keep it running? This program
runs under win9x,ME and 2000. Is there also a possibility if they do get to the
program that is running and when they kill it ungracefully that I can make their
machine hang?
Thanks in advance,
Raymond Bentoera
Cybergate Interactive
|
|
|
|
|
Hi can anyone help?
I have dervied a class from CWnd to be a child window.
When i create multiple windows via the CWnd::Create function it doesnt show the active window.
Normall if a window is selected doesnt it darken to indicate it has focus.
Not matter which child window i select they all keep the lighter, not in focus, colour.
If any one could help or shed light on the subject i'd be grateful.
Cheers Will
|
|
|
|
|
you could try CWnd::SetActiveWindow
|
|
|
|
|
I have tried that and it doesnt seem to do anything. Any OTher Ideas?
|
|
|
|
|
-get parent frame of your child view
-call ActiveFrame() on method on parent frame
CMDIFrameWnd *pFrame = (CMDIFrameWnd*)yourChildView->GetParentFrame();
pFrame->ActivateFrame();
hope it works for you, i did for me.
F.Dost
|
|
|
|
|
This is what I do:
hwnd = CreateWindow("STATIC", pMessage,
WS_POPUP | WS_VISIBLE | WS_DLGFRAME | SS_CENTER | DS_SETFOREGROUND,
(rectMainWnd.right-rectMainWnd.left-iWidth)/2+rectMainWnd.left,
(rectMainWnd.bottom-rectMainWnd.top-iHeight)/2+rectMainWnd.top,
iWidth, iHeight, NULL, NULL, hi_app, NULL);
SetWindowText(hwnd, pMessage);
ShowWindow(hwnd, SW_SHOW);
UpdateWindow(hwnd);
|
|
|
|
|
Hi Gurus,
I wanted to do gradiant filling of irregular pattern. ie, for example, there is a Text in the DC, and the complex region defines the whole Text. I achived this thru', using paths and then converting paths to region fn. Now i need to fill these each characters with Gradiant filling which has to use the shape of the Text. ie, i need a procedure to seperate each character from the Text into a individual region and fill them with the Gradiant , which actually uses the shape of those character. How to achive this.
Pl. Help me.
I've a sample image of it. But i don't know how i can attach that image with this post.
Advance ThanX,
Subbi
|
|
|
|
|
The easiest solution I can come to think of is alpha-blending that text with a gradient bitmap and the trans-blit it onto the final surface.
You didn't mention time/CPU cycles constraints.
|
|
|
|
|
hi all,
here's what i want to do: i want to call a simple function by using a pointer to that function. curious about WHY? ok, the stupid enough reason is that i just want to do it (no offence to nike ) please help and feel free to fill in the blanks in the following piece of code.
void func1()
{
cout << "func1" << endl;
}
int main()
{
// something's gotta go here
return 0;
}
|
|
|
|
|
Wanting to call the following function using a pointer-to-function:
void func1();
Either typedef the pointer-to-function-type:
typedef void (*pfn1_t)();
or use it as-is:
int main()
{
void (*pfn1)();
pfn1 = &func1;
(*pfn1)();
pfn1_t pfn1_ = &func1;
(*pfn1_)();
return 0;
}
|
|
|
|
|
Or, to make the code simpler, drop the * before the function pointer, since it's unnecessary:
(*pfn1)(); becomes pfn1();
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
I'm hoping most of you have seen Winamp...
I want to know how they made that Winamp app look and feel the way it does. I'm not interested in the skins that we can add on, but in the way they managed to make a really thin title bar, a tiny scroll bar, etc etc. (btw: is Winamp a fancy dialog box )
|
|
|
|
|
> I'm not interested in the skins that we can add on, but
> in the way they managed to make a really thin title bar
WM_NCPAINT and company.
|
|
|
|
|
If I were doing a WinAmp-like UI, it would be a window with no caption or border, and all the UI elements drawn manually (including buttons and scrollbars). When a WM_LBUTTONDOWN message arrived, I'd compare the mouse coordinates with the RECTs of all the "controls" to figure out which "control" was clicked on.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
Given declarations like this:
void func(int, int (*)(int, int));
class a
{
public:
static int func1(int b, int c);
};
Is it possible with modification to do this:
...
ret = func(0, a::func1);
...
Or is there a better Object Orientated solution? I'm kind of baffled.
|
|
|
|