471,594 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Window is not getting repainted - Windows CE

I am working windows CE application.

I am opening a page which has Textbox in it.

In that TextBox I am showing a text report.

Previously the font of text was 'Tahoma' as system font was Tahoma too.

But now i want to show report in 'Corier New' Font but I am facing new.

I am opening the window using showDialog(). but that windows is showing the text with tahoma font.
But if that windows loose focus and again gains. Its get repainted.

so i have come to conclusion that when I open window using ShowDialog() window is not getting repainted. and I want to repaint it.

So please help me in this as I have wasted too much time in this.

Thanks and Regards,
Aug 6 '09 #1
6 3182
5,000 Expert 4TB
Which version of CE?

You can force the window to be repainted by Invalidating the rect and updating the window.

Aug 6 '09 #2
Version is CE 5.0
Do you mean that when window gets loaded i need to call the invalidate() method in gotFocus() event?
Aug 7 '09 #3
5,000 Expert 4TB
I don't know in what method you should call invalidaterect and updatewindow, it depends on your design. But if you want the window to repaint first you must invalidate the region that you want repainted and then tell the window to repaint itself. This is done normally by the Windowing system automatically but there may be times when you want to do it explicitly, therefore MS provides APIs for you to do that.
Aug 7 '09 #4
Will u elaborate more.
like..which API's I should use..

Aug 10 '09 #5
5,000 Expert 4TB
Invaldaterect and updatewindow....
Aug 10 '09 #6
There was problem in base class.

First time it was painting window from values from the base class which were readonly.

I needed to change to base classes so that values from base classes get updated or editable and thus will write text in proper format at first instance.

but anyway..thanks for ur replies
Aug 21 '09 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Daphne Tregear | last post: by
6 posts views Thread by David Hayes | last post: by
3 posts views Thread by Logan McKinley | last post: by
1 post views Thread by Diogo Alves - Software Developer | last post: by
1 post views Thread by muralikrishnae | last post: by
1 post views Thread by ValValVal | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

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.