469,265 Members | 1,951 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,265 developers. It's quick & easy.

Window is not getting repainted - Windows CE

Hi,
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,
Sachin
Aug 6 '09 #1
6 3111
RedSon
5,000 Expert 4TB
Which version of CE?

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

http://msdn.microsoft.com/en-us/library/ms927613.aspx
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
RedSon
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..

Thanks
Aug 10 '09 #5
RedSon
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 zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.