Dialog text only updated on mouse moves

My PreTranslateMessage() function has code in it to update some of the
text in one of my dialog boxes.  It works, but instead of updating it
every second, it only udpates the text when my mouse is moving or
clicking. 

Any ideas on what might be causing this?

Thank you!

0
PloutzMR (23)
8/1/2006 6:28:31 PM
vc.mfc 33608 articles. 0 followers. Follow

6 Replies
626 Views

Similar Articles

[PageSpeed] 1

Well, that's becuase PreTranslateMessage gets called only when there is
message in the queue for that window.
Instead use a timer. See OnTimer (WM_TIMER)

AliR.



<PloutzMR@Npt.NUWC.Navy.Mil> wrote in message
news:1154456910.215194.170930@s13g2000cwa.googlegroups.com...
> My PreTranslateMessage() function has code in it to update some of the
> text in one of my dialog boxes.  It works, but instead of updating it
> every second, it only udpates the text when my mouse is moving or
> clicking.
>
> Any ideas on what might be causing this?
>
> Thank you!
>


0
AliR3470 (3236)
8/1/2006 6:37:12 PM
> My PreTranslateMessage() function has code in it to update some of the
> text in one of my dialog boxes.  It works, but instead of updating it
> every second, it only udpates the text when my mouse is moving or
> clicking.

Why have it in PreTranslateMessage if you want it to update every
second? For that you will need a timer(SetTimer). However is that what
you want(updating every second)? That would mean even if there is no
mouse move, updates will continue. Its better to do it with the mouse
move instead.

---
Ajay

0
ajaykalra (6842)
8/1/2006 6:38:45 PM
Hey Ajay,

Are you assuming he's displaying mouse corrdinates? ;)

AliR.

"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message
news:1154457525.203407.151800@m73g2000cwd.googlegroups.com...
> > My PreTranslateMessage() function has code in it to update some of the
> > text in one of my dialog boxes.  It works, but instead of updating it
> > every second, it only udpates the text when my mouse is moving or
> > clicking.
>
> Why have it in PreTranslateMessage if you want it to update every
> second? For that you will need a timer(SetTimer). However is that what
> you want(updating every second)? That would mean even if there is no
> mouse move, updates will continue. Its better to do it with the mouse
> move instead.
>
> ---
> Ajay
>


0
AliR3470 (3236)
8/1/2006 6:41:26 PM
AliR wrote:
> Well, that's becuase PreTranslateMessage gets called only when there is
> message in the queue for that window.
> Instead use a timer. See OnTimer (WM_TIMER)
>
> AliR.
>
>
>
> <PloutzMR@Npt.NUWC.Navy.Mil> wrote in message
> news:1154456910.215194.170930@s13g2000cwa.googlegroups.com...
> > My PreTranslateMessage() function has code in it to update some of the
> > text in one of my dialog boxes.  It works, but instead of updating it
> > every second, it only udpates the text when my mouse is moving or
> > clicking.
> >
> > Any ideas on what might be causing this?
> >
> > Thank you!
> >

The timer now updates the dialog every second...thanks guys!

0
PloutzMR (23)
8/1/2006 7:03:58 PM
AliR wrote:
> Hey Ajay,
>
> Are you assuming he's displaying mouse corrdinates? ;)
>

Yes, that was my incorrect assumption. Regardless, timer is the way to
go if OP wants timely updates.

---
Ajay

0
ajaykalra (6842)
8/1/2006 7:05:40 PM
Sounds like  a complete and total misuse of PreTranslateMessage.  What are you updating,
and if you need periodic updates, why not use an OnTimer handler?  Unless you have a
1-second timer, you will get PreTranslateMessage calls only when there is a message to
translate.  Move the code out of there into somplace more reasonable.
					joe

On 1 Aug 2006 11:28:31 -0700, PloutzMR@Npt.NUWC.Navy.Mil wrote:

>My PreTranslateMessage() function has code in it to update some of the
>text in one of my dialog boxes.  It works, but instead of updating it
>every second, it only udpates the text when my mouse is moving or
>clicking. 
>
>Any ideas on what might be causing this?
>
>Thank you!
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
8/1/2006 9:23:10 PM
Reply:

Similar Artilces:

Text Wrapping Issue
This is in Excel 2003 and appears to be a bug. I have a cell with a large amount of text. Text wrapping has been enabled and works fine for part of the cell. Eight lines down, it suddenly stops wrapping and runs off the page. I've tried Paste Special off other cells to correct this; turning off word wrap and turning it back on--I even tried pasting it into a different cell with the same result. Nothing works except to manually insert a carriage return, which is a big nuisance. I don't know if it helps, but this problem starts at 164 words and and 960 characters. -- Linda ...

CTabCtrl and retrieving text with GetItem
I am using the following code to show a popup menu when the user right clicks on a tab in a CTabCtrl: void CTabBar::OnRButtonDown(UINT nFlags, CPoint point) { TCHITTESTINFO info; info.pt.x = point.x; info.pt.y = point.y; long tab = m_tabctrl.HitTest(&info); if (tab == -1) return; TCITEM item; item.mask = TCIF_TEXT; if (!m_tabctrl.GetItem(tab, &item)) return; ....... My next step from here was to retrieve item.pszText. However - GetItem is ALWAYS returning false. For example, I have 1 tab and I right click on it. HitTest return 0 (ind...

How do I make numbers become text?
I am trying to create a spreadsheet where numbers entered in one location become text in another. I tried the Help option, but I am still lost. Please help, and thank you. From earlier postings: How to Convert a Numeric Value into English Words http://support.microsoft.com/default.aspx?scid=KB;EN- US;140704& and: (courtesy of a cut and paste from a Tom Ogilvy post): If you want an addin that provides a worksheet function that does this, download Laurent Longre's free morefunc.xll addin found here: http://longre.free.fr/english/ It is downloaded in a zip file which also conta...

How to set a icons instead of a menu text?
Hello, I'm not quiet sure this can be done , but i would like for some reasons to set icons to describe my menus. Can this be done and how? Many thanks Breadl, It is possible to owner-draw menus, youmight want to check here: http://www.codeproject.com/menu/ and here: http://www.codeguru.com/Cpp/controls/menu/ for samples. Johan Rosengren Abstrakt Mekanik AB "Bredal Jensen" <Bredal.Jensen@mimosa.com> a �crit dans le message de news:%23hH2cnyxEHA.2540@TK2MSFTNGP09.phx.gbl... > > Hello, > I'm not quiet sure this can be done , but i would like for so...

disable reports daterange dialog to show up twice
Hi, I created a report with daterange parameters. Everythings works fine but when I want to print some report, the report asks the user again for the date parameters. Having installed the CRM update CRM1.2-KB834913-Server.exe which should repair this bug, I noticed no change. The reports always asks twice for the parameters. Is there any secret for this mystery... Greetings Thomas Ott are all these parameters in a single report or are you using sub reports as well? -- John O'Donnell Microsoft CRM MVP http://www.microsoft.com/BusinessSolutions/Community/CRMFaqLanding.aspx "Th...

Changing text in X and Z reports
Hi, I want to change a text in X and Z reports. The original text is "Paid on Account." I want it to say "On Account." How can I do the change? I already found the XML report template but don't know where to go from there. Thank you in advance. Win open file in Frontpage or text editor. Do "find" and type in "paid on account" to get you to the section quickly. or, just roll down until you find this section =========================== Section: Grand Total Out =========================== --> <!--BOOKMARK--> <ROW...

Moving my files to a new computer
So I've copied my old .pst file to my new computer, used Tools>options>mail setup>data files to introduce outlook to it, and reset it to to default and removed the old entry so there is just the one entry in the list. Both my new and old outlooks are 2003. So far so good and I can see my mail folders and contacts in the left hand pane, *but* tools>address book is not showing any of my contact addresses, nor will check names show them. Anyone know whay or can point me at an article that tells me what to do? Also, I have several email accounts is there an easy way of movi...

Moving data between Excel sheets
"I have an excel spreadsheet that has 2 sheets, one has a list of open issues" and one a list of "closed issues". One of the fields on the "open issues" sheet has a "closed date" field. Whenever a date is typed into this field, I would like for it to be moved to the "closed issues" sheet, to avoid duplicate, manual entries being done. Can anyone help me with the best way to achieve this? Can this be achieved by using Macro's. Any help with this, would be greatly appreciated. Thanks! Suggest you send this to the programming newsgroup...

Export a range to a text file
Hello need some advise on how to procede I need to be able to create a text file containg some text as well as data that is within a named range in excel and then some more text. I can handle printing to the text files using cell values etc but am unsure of the best way to print the ranges data. Is there a way or procedure to just print the range as is in csv format? As well my range will contain about 6 columns, each containg a number field (formatting of decimal places is important, some have 2 dec some 3 etc) Also the range has a max of 50 rows however will always contain lower rows of...

Where is the Keep Text Formatting feature located in Word 07
I believe this Keep Text Formatting feature might be what I need, but I have been unable to locate exactly where it is located in Word 2007. I'm trying to rid a Word document sent to me of tables, text boxes, graphics and all other document formatting, while retaining the document's text content. It is unimportant to me whether the text formatting is retained or not. Thanks. Are you referring to a Keep Text Formatting feature in an earlier version of Word? I wonder whether what you're looking for is "Paste Unformatted," since you seem to be saying you _don...

Need an unbound text box and command button (Search)
I need to create an unbound text box with a command button (Search) on my form which will enable the user to find the current record for a space no. I would like the user to only have to type in the space no. My fields are: SpaceNo Current "Yes" I am not experienced at writing code. Thanks so much. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200911/1 On Wed, 25 Nov 2009 23:09:36 GMT, "Uschi via AccessMonster.com" <u25116@uwe> wrote: If you don't write code, it may be easier to instruc...

CONCATENATE text to create a formula to be evaluated
Hi, I am wanting to concatenate a set of text to create a formula. I have done so below. =CONCATENATE("=MAX('",O1,"'!A3:A65536)") The result is: =MAX('2009'!A3:A65536) ....but it treats this as a text string when I try to use INDIRECT Cell O1 contains the year minus 1. In this case O1 = 2009. All of my worksheets are named as a year e.g. 2007....2008....2009...2010. I am entering this on sheet 2010. Now the real question: How do I make another cell evaluate this string as an actual formula and spit out the highest number for ...

rules question
This is a multi-part message in MIME format. ------=_NextPart_000_0008_01C58E9B.93495960 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I'd like to make a rule similar to the one I have - move all emails from a certain SENDER to a specified FOLDER. I want to also make a rule to move to a specified folder, when an email is sent to a specific USER. I don't see how to do this in the canned rules? Has anyone got creative with this and made it work? I can get it to do a COPY, but not a move. Thanks!!! ------=_NextPart_000_0008_0...

Lines of text move when viewed in print preview and printed
I am inserting pictures with-in paragraphs of text. I have tried formating as both exact and in-line, using top/bottom. The text moves up 1-2 lines when printed or viewed in print preview. This change in text lines also happens when view is changed from 50% to 100%. I am working with two column text and the pictures are inserted into each column. How can I fix this problem? What version of Windows and Publisher are you using??? You people that think we have crystal balls or are mind readers are exasperating! -- >-----Original Message----- >What version of Windows and Publi...

Selecting Text Box
Is there a keyboard command that one can use with the mouse to select the text box (frame) rather than trigger the Edit Text mode? When there are many objects on the page, getting the mouse to click on the right frame can be a real problem. But if the cursor is in the right box, some keyboard command (with or without the mouse) should help select the right object. Thanks! ...

CRM 1.2
I am going to move the CRM SQL databases to a new server. We will also be moving Great Plains off the CRM server and on to the new SQL server. We are bouncing around the idea of naming the new SQL server to the name that the current CRM server uses and renaming the current CRM server. The thinking here is that we won't have to touch the Great Plains clients. What kinds of issues can I expect in this scenario? I believe that CRM "might" make us of the SID in which case I would need to use SysPrep to create the new one? I wouldn't think that this is that unusal of a proje...

text in formula
Help!!! Is there a way to have a formula where a cell with text is in it, but it is not included in the formula. Like I have a random cell that appears sometimes within the range but because it is text and I do not want to include it in the formula. Is there a certain "symbol" that could be used? HELP!! Hi maureen, It depends on what the actual formula is, but *some* functions ignore text entries. You could use the ISNUMBER function to include only those entries that are numbers. Post your formula for a more detailed reply. Biff >-----Original Message----- >Help...

descriptive statistics
I have a survey which has some text answers and some numerical answers. I need to complete histogram and descriptive statistics on this data but I get an error message stating my "data contains non-numerice input". Does that mean all data has to be converted to nummerical format? one way to solve theproblem use count if suppose non numeric data for e.g. a.s.d.f.g etc are in A1 to A100 find out unique set by using advance filter and then use countif function "allen367" <allen367@discussions.microsoft.com> wrote in message news:E3E2CE4F-7A2E-47FF-8B6E-D88EFF52C...

Linking text within Excel-- help!
I have a mailing list that I will be importing into Excel, and am trying to link the names on the list to invoices for those people on the list. Can I do this in Excel by using links? The Excel help feature only seems to describe links with figures (numbers), not text. e.g. Mr. Bill Jones, 123 Main Street, Middletown, OK 40404 (each word in its own cell in the mailing list worksheet) ....would link to a worksheet that had Bill Jones' name and address but also indicted that he purchased a $100 product on June 15 and his bill has been paid in full. My questions: 1. Each of the 300 or...

Deleting a single character in a text field
In one of my tables i have a field that has a text values like '123.23123' i would like , to delete the full stop. How can i do this. I cant do it in excel as the number of records that i have is over 200000. hi, ma1000 wrote: > In one of my tables i have a field that has a text values like '123.23123' i > would like , to delete the full stop. How can i do this. I cant do it in > excel as the number of records that i have is over 200000. Create a update query, use Replace([yourField], ".", "") as new value. mfG --> stefan <-- ...

Can I display the current date in a text box?
I know how to display the current date in a cell, but can I display it in a text box? And how would I do that? You would have to have some code to load it, such as Textbox1.Text = Format(Date,"dd mmm yyyy") or link the texbox to a cell with the formula =TODAY() -- HTH RP (remove nothere from the email address if mailing direct) "stephiebrady" <stephiebrady@discussions.microsoft.com> wrote in message news:C78C4C78-C12C-4A8F-9121-E377ACAE3B5B@microsoft.com... > I know how to display the current date in a cell, but can I display it in a > text box? And ...

Update stored procedure question
We are using VS 2008 and SQL Server 2005. I have a table Spread that has 1 Integer column called SecurityID. I have a stored procedure spUpdateSpread that increment the SecurityID by 1, and returns that value. If more than 1 process call the stored procedure at the same time, will it return the correct SecurityID ? Thank you CREATE TABLE [dbo].[Spread]( SecurityID [int] NOT NULL, PRIMARY KEY NONCLUSTERED ( [SecurityID] ASC ) ) ON [PRIMARY] CREATE PROCEDURE [dbo].[spUpdateSpread] @SecurityID int output as update Spread set SecurityID = SecurityID + 1 select @Secu...

Recipient update service #2
In ESM --> Recepients --> Recepient Update Service --> Property --> General Tab: There is a filed Windows Domain Controller, If I have two DC (one is GC and another one is not), which DC is the best to choose, GC one? or the other one Thanks Patric "Patrick" <anonymous@discussions.microsoft.com> wrote: > >In ESM --> Recepients --> Recepient Update Service --> Property --> General Tab: There is a filed Windows Domain Controller, If I have two DC (one is GC and another one is not), which DC is the best to choose, GC one? or the other one? >...

Moving CRM
Hi All. I am in the process of relocating CRM 1.2 to a new SBS 2003 Server. If I have not created any custom reports with Crytal Reports, is it really necessary for me to back that up and then restore it on the new server? Since I have only been using the default reports, shouldn't everything be fine??? THanks! Jake, You shouldn't need to migrate the reports. But, are you using the redeployment tool for this? If so, then there may be some reasons that this introduces that make it a requirement. Matt Parks MVP - Microsoft CRM ---------------------------------------- ---------...

I'm trying to display the next month in a text field
Hi there, I've gone through all the forms and can't seem to get the code straight for displaying the next month on a text field on my form. I just want the entire month name and nothing else and I have been struggling with: DateSerial(Year(Date()), Month(Date()) + 1, 1) but its showing the day and year too and thats not what I need. Thanks in advance! GM gmazza wrote: >Hi there, >I've gone through all the forms and can't seem to get the code straight for >displaying the next month on a text field on my form. >I just want the entire month name and nothing else...