|
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.
|
|
|
|
|
> Given declarations like this:
> void func(int, int (*)(int, int));
This one returns "void".
class a {
public:
static int func1(int b, int c);
};
Disregarding parameters, this one returns int. Are you really sure you want to do this? If you are, try reinterpret_cast, but I'm quite confident you'll find std::mem_fun more suitable.
|
|
|
|
|
Change
void func(int, int (*)(int, int));
to
void func(int, int (a::*)(int, int));
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
I'm reading an INI file with GetPrivateProfileString on a windows 2000 machine. When I read a string, I get back the entire line including any comment that might be there, like so:
"value ; this is the comment"
This is *not* the desired nor the expected result - I've been using INI files for a long time and have never seen this happen before.
One strange thing about this ini file is that the keys look like this:
thiskey = value ; this is the comment
There is a space between the keyname and the equal sign, and between the equal sign and the value. Could this be what's causing the retrieval of the comment as well as the value?
Next question, is there a way to programatically get/set a comment in an ini file (short of treating it like a normal text file)?
|
|
|
|
|
I'm afraid the .ini file syntax hasn't been specified too clearly by MS or whoever.
Since it is not detailed what a string to be read by Get(Private)ProfileString(),
I won't make any assumptions regarding special characters.
The only comment I have yet come across is the single line comment, that is a line
starting with a ';'
A rest-of-line comment would demand specific treatment of the ';' character.
It seems to be unimportant wether the '=' is surrounded by whitespace or not.
To get slightly more (and less) control of how an .ini file is accessed, use
Get(Private)ProfileSection(), which reads a whole section into memory.
|
|
|
|
|
1. What is the best way to reboot the system which is really not platform specific?
ExitWindowsEx seems to be the function, but it has too many
platform restriction. I tried looking for a KB but could not
find anyone on this.
Any help?
2. I have a simply installation startup, which will install some system stuff like DCOM95/MDAC/50COMUPD/HHUPD before executing the main program to be installed.
Most of the updates require a reboot, and I use the RunOnce registry key to automatically restart the installing steps.
The problem is the main installation is Windows Installer
based program and I wish to follow the tradition here to allow the user access to the desktop. However, with the RunOnce key, Windows seems to wait for the program to complete before displaying the desktop. Is there any good way to yield control to Windows to display the desktop?
Best regards,
Paul.
|
|
|
|
|
The ExitWindowsEx function will work on all Windows platforms, but under NT/W2k/XP, you will have to check and/or modify the system privileges to enable the ExitWindowsEx call to work correctly.
See this link on CodeGuru for some code:
http://codeguru.earthweb.com/cgi-bin/bbs/wt/showpost.pl?Board=vc&Number=232529&page=16&view=collapsed&sb=5
Cheers,
Peter
|
|
|
|
|
Thanks, just looking for a safer ways and I got it now.
Regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for day job or programming contract anywhere!
|
|
|
|
|
It seems that WS_EX_LEFTSCROLLBAR style is not working with combo boxes - has anybody found a solution to that?
Even thought there is a property called "left scrollbar" in the resource editor, it does not change a scroll position. ModifyStyleEx is also not working...
|
|
|
|
|
It works on my Win2000 box. Are you sure that you have enough items in your combobox to actually display the scrollbar? Combos with no items display no scrollbar at all.
Tomasz Sowinski
http://www.shooltz.com.pl
|
|
|
|