473,386 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

KillTimer() has not been after destroying the CWnd.

hi,

I have CView inherited class. After creating the window, I call SetTimer( ,
, NULL) to set a periodical timer. When the window is no longer need, I just
call DestroyWindow() to destroy the window but without calling KillTimer() to
kill timer. Is this code safe?

Thanks in advance.

Regards,
lauch2.
Nov 17 '05 #1
1 1305
Hallo lauch2!
I have CView inherited class. After creating the window, I call SetTimer( ,
, NULL) to set a periodical timer. When the window is no longer need, I just
call DestroyWindow() to destroy the window but without calling KillTimer() to
kill timer. Is this code safe?


Yes! Timers are directly associated with the window and are destryoed
when the window is destroyed.
--
Martin Richter [MVP] WWJD
"In C we had to code our own bugs. In C++ we can inherit them."
FAQ : http://www.mpdvc.de
Samples: http://www.codeguru.com http://www.codeproject.com
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Pete | last post by:
I have a site which is using sessions to pass data from one page through to the next. The problem that I have is that there are only two places where the session could/should be destroyed. This...
0
by: Robert Hanson | last post by:
Hi All, In an application's COM API, I can get the CWnd handle and I need some guidance on how to place either controls directly or place a child window with the additional controls on it...
2
by: Sam Riggens | last post by:
I am experimenting with C# and trying to use an unmanaged C++ dll. The UMC++ dll has a function defined as follows: extern "C" bool DllExport ShowLogonDlg(CWnd *pParent, CConfig& cfg); The...
1
by: Girish | last post by:
I was wondering if anybody has the implementation of CWnd::RunModalLoop/ CWnd::EndModalLoop in C# Mine is a single threaded application... what I want is, the application to wait at one point...
0
by: KK | last post by:
Hi all I have an MFC class named CCoordWnd derived from CWnd. Now I'm porting this class to .Net.So,I started with deriving from class System::Windows::Forms::UserControl. MFC class CCoordWnd...
0
by: Robert Hanson | last post by:
Hi All, In an application's API, I can get the CWnd handle and I need some guidance on how to place either controls directly or place a child window with the additional controls on it?? If I...
2
by: Eitan | last post by:
Hello, I am creating a new window class based on CWnd. I am placing it on the View (CFormView). How can I get the notification or any other indication that the cursor/mouse is not on this...
0
by: Eitan | last post by:
Hello, I am creating a new window class based on CWnd. I am placing it on the View (CFormView). How can I get the notification or any other indication that the cursor/mouse is not on this...
4
by: Olumide | last post by:
Hello - I have two classes A and B as follows: class B{ public: ~B(){ cout << "destroying B" << endl; } }; class A{
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.