|
SetTimer is CWnd's member function, happens nothing extraordinary (i.e. no memory leak or anything bad) if you don't kill it separately. The framework does this for you when the CWnd object gets destroyed from which you called it regardless whether you called it from your view or framewnd or whatever place.
As for handling WM_CLOSE in your mainframe, this is a good place for things to clean up that require clean up.
Peter Molnar
|
|
|
|
|
Thanks! Thats what I needed!
|
|
|
|
|
I notice that Peter Molnar gave you the answer, but I consider it a good practice to kill the timers youself instead of depending on the frame work to do it. One of the reasons for this is that you have control and can close it when it is know longer needed, instead of letting it run after its' job is done. The second reason is that unless it is need to run during the life time of the object, it should be killed because it is still generating timer messages and wasting processor time.
INTP
|
|
|
|
|
how can i get the content of password edit box ( this edit box is located in other program) .
thanks !
|
|
|
|
|
there are many programs out there!
Don't try it, just do it!
|
|
|
|
|
You should send this particular password style edit box a WM_GETTEXT message.
The problem is that if the sender is an external app and the control a password box then you will not get any useful info.
Solution: force (!) the external app calling SendMessage itself.
Look up CreateRemoteThread
Peter Molnar
|
|
|
|
|
This sounds too much like a hacker attempting to steal passwords.
If this isn't the case, could you elaborate?
|
|
|
|
|
Ya, it does! But the information is already on the net and even though I did not care how it was done, I was happy to find a program that allowed me to point to my password entry field in order to find out what password I had used. So I could write it down and use it from work as well as home.
The fact that it is possible does worry me a little, since I now know that (given my posision in the company) I can get any password that anybody told thier computer to remember. If I wanted to I could probubably access it from the machine setting on my desk.
INTP
|
|
|
|
|
How can i make programs (in vc++) which cannot be seen in start bar? only in windows task menager! suppose i want my regular program to minimize into task bar (like GetRight) and not to be seen normaly! Thanks
|
|
|
|
|
if you are using win32 sdk
hide your main window by
ShowWindow(hWnd,SW_HIDE);
or if you are using MFC type
HideApplication(); in initinstance.
The World is getting smaller and so are the people.
|
|
|
|
|
OK download Chris Maunder's http://www.codeproject.com/shell/systemtray.asp?target=tray
You then can hide the ICON in the tray.
Best Wishes,
ez_way
|
|
|
|
|
How do i get the system path? I know there is a function GetSystemPath() but i cant find a description for it on MSDN. And it has two parameters: a pointer to a string and a DWORD and it returns a pointer to a string so i don't know how to use it..
Kuniva
--------------------------------------------
|
|
|
|
|
Check out SHGetSpecialFolderPath
The World is getting smaller and so are the people.
|
|
|
|
|
|
Yes Mike is right
Try This
char ch[MAX_PATH];
GetSystemDirectory(ch,sizeof(ch));
AfxMessageBox(ch);
Best Wishes,
ez_way
|
|
|
|
|
I've a dialog based application with a menu resource, when I've built the menu items I've used some shortcuts (eg. for the file menu I've used the "&File" caption). I'm working on XP so I know that the F doesn't appear while Alt key si pressed but when I press the Alt+F keys the menù doesn't appear at all.
What's wrong?
Gaetano Sferra
|
|
|
|
|
What does your accelerator table look like. I have the same problem on xp h.
OK I just tried to compile an app on 2000p and got the same results, no underscore.
This seems to be a problem I have not noticed.
Try this
CString s_buttontest = " &Open >>";
SetDlgItemText (IDC_BUTTON_1, s_buttontest);
Good catch!
Best Wishes,
ez_way
|
|
|
|
|
Well... my problem aren't underlines... but...
The new look & feel of XP doesn't show underlines while pressing Alt key, this is "normal"... Have you installed the lastest version of IE on Win2K? If the reply is "YES" you've installed the new look & feel also ... take a look on IE or Outlook Express if you don't belive me
The problem of mine is that pressing Alt+[key] NOT unroll the menu at all
Best wishes to you
Gaetano Sferra
|
|
|
|
|
Yes, I like somethings but I got a new system last month and avoid using it as I seems slow, even though it is 3 gHZ.
I found a bunch a spyware installed on it from the factory also.
Only thing is it is better that win 95-98SE and ME, past that I can't say much.
|
|
|
|
|
Yes, I like somethings but I got a new system last month and avoid using it as I seems slow, even though it is 3 gHZ.
I found a bunch a spyware installed on it from the factory also.
Only thing is it is better that win 95-98SE and ME, past that I can't say much.
|
|
|
|
|
I have an application that holds many invisible child-windows (which in turn hold their own normal child-windows).
I want to capture these invisible windows without having to show them on the screen. How can I do this ?
I currently grab the contents of a visible window by simplly bitblt'ing into a bitmap's dc from that window's dc. This gives me exactly what I had in that window, and not some WM_PRINT version with various owner-draw glitches.
Thanks
|
|
|
|
|
|
I need something that can capture a currently invisible (SW_HIDE) window, and hopefully without any printing API (WM_PRINT, WM_PRINTCLIENT).
|
|
|
|
|
I need something that can capture a currently invisible (SW_HIDE) window, and hopefully without any printing API (WM_PRINT, WM_PRINTCLIENT).
|
|
|
|
|
The referenced code makes the following:
1.It gets a handle to a window (every window even a hidden one has one)
2.It gets the window's DC and copies it to the memory
3.Prints it from memory
1./ and 2./ are the solution to your problem.
Peter Molnar
|
|
|
|