SetTimer IDs and return values

I have an app that uses a lot of timers. I'm using enums for the IDs
so that I can spot them more easily. My question is, can the return
value of SetTimer be different than the ID I set it too or is it only
so when SetTimer fails? IOW, can I safely count on my enum IDs to be
valid nIDEvents?

Thank you all and happy holidays.
0
the44secs (141)
12/23/2008 11:50:46 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
1148 Views

Similar Articles

[PageSpeed] 43

>I have an app that uses a lot of timers. I'm using enums for the IDs
>so that I can spot them more easily. My question is, can the return
>value of SetTimer be different than the ID I set it too or is it only
>so when SetTimer fails? IOW, can I safely count on my enum IDs to be
>valid nIDEvents?

According to the documentation a new timer ID (potentially different
from the one you pass) is only generated in the following situation:

"nIDEvent
 Specifies a nonzero timer identifier. If the hWnd parameter is NULL,
and the nIDEvent does not match an existing timer then it is ignored
and a new timer ID is generated
"

.... so if that's not what you're doing, I think your ID values should
be OK.

Merry Christmas
Dave
0
davidl7375 (2061)
12/23/2008 1:44:43 PM
On Dec 23, 10:44=A0pm, David Lowndes <Dav...@example.invalid> wrote:
> >I have an app that uses a lot of timers. I'm using enums for the IDs
> >so that I can spot them more easily. My question is, can the return
> >value of SetTimer be different than the ID I set it too or is it only
> >so when SetTimer fails? IOW, can I safely count on my enum IDs to be
> >valid nIDEvents?
>
> According to the documentation a new timer ID (potentially different
> from the one you pass) is only generated in the following situation:
>
> "nIDEvent
> =A0Specifies a nonzero timer identifier. If the hWnd parameter is NULL,
> and the nIDEvent does not match an existing timer then it is ignored
> and a new timer ID is generated
> "
>
> ... so if that's not what you're doing, I think your ID values should
> be OK.
>
> Merry Christmas
> Dave

Thank you, Dave, much appreciated. It seems my docs are out of date.
Gotta wonder for how long my trusty VC6 will go on ticking...
0
the44secs (141)
12/24/2008 5:37:56 AM
Reply:

Similar Artilces:

Using Formulas to Return a Range
Hello, I am trying to define a range using a cell containing a formula whic returns a concatenation of the range arguments I would like to use fo a worksheet function. For instance, in one cell, I have the formula: ="C"&TOP and another I have ="D"&BOTTOM where 'TOP' and 'BOTTOM' are names I have defined to equal values lik 3 and 200. I am trying to use a worksheet function, lik CORREL(C3:D200) using these formulas but I can't seem to get it to wor for some reason. I am using these formulas because my range will vary, so it won' always...

Bold ID in text box setting
Hello, I am pulling data from a table to create a letter. My problem is I have a text box that is similar to: =(('The XYZ would like to welcome you as a new member. For your reference, your membership identification number is:') & " " & [ID] & ". Please find enclosed your membership certificate.") I want the ID to be in bold text. I have tried conditional formatting and can only get the entire box in bold. Thank you in advance, S Alternatively, take a look at what Stephen Lebans has at http://www.lebans.com/mixbold-plain.htm -- Doug Steel...

Adding values and sum
List of numbers: 5 7 8 9 5 __ 34--Sum Now, I want to subsitute others numbers **but** to ADD to the present sum. 2 5 7 __ 48-Sum This could be modified to suit: http://www.mcgimpsey.com/excel/accumulator.html In article <1186085591.222318.37180@m37g2000prh.googlegroups.com>, Harry's GMail World <harryhill2475@gmail.com> wrote: > List of numbers: > 5 > 7 > 8 > 9 > 5 > __ > 34--Sum > > Now, I want to subsitute others numbers **but** to ADD to the present > sum. > > 2 > 5 > 7 > __ > 48-Sum ...

set report field forecolour based upon corresponding id entry in a 2nd report
hi, just joined..beginner i'm afraid.. if i have just read 'access help' properly it appears i should use condtional formatting to change a field colour in one report provided the 2nd report is open...can you advise the neccessary code format to use to refer to a 2nd report please as i'm not a programmer..hope this isn't too janet & john!.. thanx in advance, mike ...

pmControlNumberValidate returned the ff. DBMS: 0, Great Plains: 21
Whenever we do the edit check procedure on Great Plains Version 8 ---> Transactions--->Purchasing--->Edit Checks we get this error. The stored procedure pmControlNumberValidate returned the following results: DBMS: 0, Great Plains: 21032 Hi If you have access to Customersource, Knowledgebase article 854516 will hopefully solve the error. -- Regards James[MVP] Visit MGP Blog Central http://spaces.msn.com/members/hushdontspamme/ "Jess M." <Jess M.@discussions.microsoft.com> wrote in message news:4F684AA9-E4DF-4479-8844-2DE24BAF1589@microsoft.com... > ...

problem with SetTimer()
Hi All, I've a problem with SetTimer function. I've wrote this code: class myClass { void CALLBACK TimerProc( HWND hWnd, // handle of CWnd that called SetTimer UINT nMsg, // WM_TIMER UINT nIDEvent // timer identification DWORD dwTime // system time ){ //some code.... } myClass() { SetTimer (1, 1000, (TIMERPROC) TimerProc); } } the compiler returns a conversion error for 3th parameter of SetTimer (TimerProc) help me, what's wrong ?? System info: - Visual Studio 7.0 - Windows XP SP2 Make TimerProc() static. class myClass { static...

Responsible ID
Dears, How can we add ResponsibleID (Case Initiator field) in Logical User list in CRM 3.0 Look up Records, "In fact I would like to use Responsible ID in the CRM Email Notification" as whenever engineer resolved the case the case initiator should get informed as his case has been resolved..." Kindly Advice. Your early response will be much appriciated. Regars, Syed ...

mixed up product keys and product ID's
I have 14 legal office 2004 boxed cds of which 11 have been installed on my network of computers. I now need to install the other 3 but someone has deleted the file i wrote noting which product keys I had already installed. I now do not know which three keys to use and when you go to 'about' in any of the programs they only give you the product ID code which bares no relation to the product keys! How can I tell what keys I have already used? or is it possible to re- enter the product keys for all of the macs that I have already installed? k In article <1138204737.236456.40200@f...

lookup function not returning correct value
hello, i am trying to search a range of cells for a certain value, specifically an "X". from my understanding, in order for the lookup function to work properly, the list must first be sorted and in proper order...that is not possible for what i am doing. as a result of using an unsorted range of cells, some times an incorrect value is returned. here is the formula i am using: =IF(ISNA(LOOKUP("X",A1:D1)),"OK",(IF(LOOKUP("X",A1:D1)<>"X","OK","Not Complete"))) my intent is that anytime there is at least one "X...

SOP Site ID
We have different Sites, but every single item is only assigned to one site. In SOP transactions you can define a default site and you can change the site per line item. Is it possible to get the assigned site automatically per line item, because not every order entry clerck knows the site per item. Thanks, Toni Not without a modification. Why do you have your items split up like this? -- Richard L. Whaley Author / Consultant / MVP Documentation for Software Users Get our Free Tips and Tricks Newsletter and check out our books at http://www.AccoladePublications.com "Toni&quo...

Conditional format lowest value greater than zero and copy formula
I am using Excel 2007 but cannot get the conditional formatting to work correctly. I have 100 rows of data. In the 1st row I need to fill the cell with color if it's the lowest value greater than $0. Then I need to copy that conditional format to the next 99 rows. The conditional formating only works if the cell that's $0 is blank. After I select the 1st row, copy, paste special, formats, it only works on a few of the rows. The rest don't show any color. If I paste special 1 row at a time, it works. Thanks for any help! I'm guessing your CF formula is incor...

Event ID 8263
Has anyone come across this problem in Exchange2003 on Server 2003 Standard: Event Type: Warning Event Source: EXCDO Event Category: General Event ID: 8263 Date: 10/26/2005 Time: 9:59:10 AM User: N/A Computer: EXCHANGE Description: The recurring appointment expansion in mailbox User Name has taken too long. Some recurring appointment instances may not be visible at this time. To ensure that the calendar view is correct, please refresh the calendar view in Microsoft Outlook Web Access. *** This message is in the Application Log on my exchange server when an end user is accessing, from ...

Looking up any match, returning data
I've got a spreadsheet that has over 1700 rows of data. The data has columns for: Property # (col A) Production Period (col C) Status (col F) There are more columns of data, but for this particular question, they are irrelevant. The property numbers are listed many times, as are the Production Period, Product Type and Status. In Column G, what I need to do, is create a function that looks in columns A, C, D and F, and applies the following logic: Let's say that my formula will go into G8. If any row in the range matches A8 and C8, and the Status for that row ...

SetTimer ?
In my VC6 MFC app, I establish a timer by using a call to SetTimer(...) for an elapsed time of 5 second intervals. All working fine in this manner, but... I need to reset this timer to start counting at zero if a certain unrelated event occurs. Can this be done in this rather primitive arrangement? I'm wondering if I could call KillTimer and immediately call SetTimer each time I need to reset this timer? Is there a better way? Essentially, I am recognizing when a mouse cursor enters a window and at that moment, I need to set the timer to trigger a message 5 seconds later. Any...

Changing the values in a column
I have several thousand rows in my spreadsheet. My question is that I want to look at the value of one column and based on its value, change the value of another column. I would I do this? -- Dirk From what to what? -- HTH Bob Phillips "Dirk_Bob" <DirkBob@discussions.microsoft.com> wrote in message news:0C8575BA-0D12-43B2-A3AA-927E662F1B77@microsoft.com... > I have several thousand rows in my spreadsheet. > My question is that I want to look at the value of one column and based on > its value, change the value of another column. > > I would I do this? &g...

Event ID 2887
I've been getting this error since we upgraded the domain controllers to server 2008. After enabling the detailed logging I get event ID 2887 about every 3 minutes from my Mac computers: The following client performed a SASL (Negotiate/Kerberos/NTLM/Digest) LDAP bind without requesting signing (integrity verification), or performed a simple bind over a cleartext (non-SSL/TLS-encrypted) LDAP connection. Client IP address: 207.157.74.96:49660 Identity the client attempted to authenticate as: NSSTC-UAH\christymac$ We've tried forcing them to digitally sign their LDAP ...

Event ID 8270 MSExchangeAL
Hi, I am repeatedly getting this error in my event viewer every 6 hours: LDAP returned the error [32] Insufficient Rights when importing the transaction dn: CN=Recipient Update Service (JJYT),CN=Recipient Update Services,CN=Address Lists Container,CN=JJYT,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=JJYT,DC=LOCAL changetype: Modify msExchServer1LastUpdateTime:20060116143914.0Z msExchServer1HighestUSN:156341 msExchServer1HighestUSNVector:ROOTDC00:156341 : ROOTDC01:191433 - I am going to guess this has been caused by moving the RUS from my FE server. When I first tried to make t...

Linking numerical values to a text drop down box
Hi I have a drop down box in XL from which I'd like my customers to make a text selection. Depending on which text is selected, I'd like this to then equate to a number which can be utilised in equations elsewhere in the workbook. For instance if they select "EASY" it equates to "1", if they select "MEDIUM" it equates to "3" and if they select "HARD" it equated to "7". I'd also like in the future to be able to easily change these 1,3,7 numbers to other numbers of my choosing Any ideas would be greatfully receiv...

<Return> in CPropertyPage
Hello NG, I have a simple CEdit (without multiple lines) and a default button. When I type text in my edit control and press <Return>, I want to call the default button's OnBtnClickedDefaultbutton(). In a CDialog this functions perfect. Now I want to do the same in my MDI applicationin a childframe window, consisting of property pages. In a CPropertyPage I have a CEditCtrl and a default button. But when I press <Return> in my edit control, the default function is not called. Why is it and how can I manage to get the default function called (like in my CDialog)? Thanks for h...

WinHelp IDs?
Hi, I'm handling WinHelp for my Property Pages like this : void PropCVCSetup::WinHelp(DWORD dwData, UINT nCmd) { char cContext[48]; switch(dwData) { case 131178: strcpy(cContext, "Blob.htm"); break; case 131272: strcpy(cContext, "Fields.htm"); break; case 144073: strcpy(cContext, "Minos.htm"); break; etc etc But I don't understand where the help IDs (ie dwData) are generated. Can someone help me out with this? Thanks search for 'makehm' utility in msdn. -- Cheers Check Abdoul [VC++ MVP] ------------------...

Can I convert a TODAY() value into a string
I have a datasource where the SQL Server data type for a date column is varchar(10) (i.e. yyyy-mm-dd). I need to compare this to today's date ( ex. =today()>$f2, where $f2 is the varchar(10) date field returned from SQL Server ) but am not sure of how to do it. Should I convert today() to a text field? Try this: =IF(TEXT(today(),"yyyy-mm-dd")>$F2, is_true, is_false) where "is_true" is the formula you want if the condition is true and "is_false" follows the same logic. Hope this helps. Pete If you want it in VBA, try dates_string = &quo...

Erro ID no: 0xc00206fc
We upgraded to AD 2003 this weekend and have Exchange 5.5 When we go to the permissions properties of any mailbox this is the error we get. The Trust relationship between the primary domain and the trusted domain failed. Does anyone know what we can do to fix this? Thank you | We upgraded to AD 2003 this weekend and have Exchange 5.5 | | When we go to the permissions properties of any mailbox this is the error | we get. | | The Trust relationship between the primary domain and the trusted domain | failed. | | Does anyone know what we can do to fix this? | | Thank you | Your sym...

Annual Returns Calculation
Money states the following: An annualized percentage return is the annual profit on an investment as a percentage of the amount invested. Money uses the Internal Rate of Return (IRR) formula to calculate the annualized percentage return on each investment. Why does money use IRR when nothing else uses this. Morningstar, CNN Money etc etc etc? The returns shown on my portfolio in money do not equal anything else. Because everybody else has the luxury of assuming the return on $1 invested all year and Money has to deal with Money flow into and out of the investment? If you'd had $10...

problem with settimer
Hi i'm using Settimer in a service. I've called Set timer as UINT nid = ::SetTimer(NULL, 0,100,(TIMERPROC) MyTimerProc); where TimerProc is defined as void CALLBACK MyTimerProc( HWND hWnd, // handle of CWnd that called SetTimer UINT nMsg, // WM_TIMER UINT nIDEvent, // timer identification DWORD dwTime // system time ) { switch(nMsg) { case WM_TIMER: break; } } I dont know why but i dont get the WM_TIMER event in the callback function..i mean the function TimerProc is never called even after the time specified in SetTimer() func...

Macro to check data from excel list against access query and return value back to excel
(I posted this yesterday but am tryign to make it clearer) I have an excel list with "name" and "title" and there are many erros and mis-spellings. I havbe an acess quesry that has the correct names and titles and also some mis-spellings and foreign language spellings pointing to the correct english name and title. I would like to write a macro in excel to do a lookup of the excel value in the access quesry and find EITHER an exact match or close match and return the value of a specified field back into an excel column. Here is a hypothetic example: Access list: PK=Van G...