-
February 4th, 2005, 07:28 AM
#1
Problems with drawing.
Hi,all.
I made tab control and status window in my window.WM_PAINT execute one
function- Plot(),that draw graphic.But,when i click on my status window and
tab my window is redrawing and the background is painting upon my status window and tab control for a second. how can i fix this problem?
Thanks.
-
February 4th, 2005, 08:20 AM
#2
Re: Problems with drawing.
Originally Posted by HolyNick
how can i fix this problem?
Without seeing your code - who knows?
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
February 4th, 2005, 08:33 AM
#3
Re: Problems with drawing.
2JohnCz: The feature is that,"he"(windows) treat tab control&status window
as part of client area,and refresh it,when i call WM_PAINT -->draw backgroun upon controls for a second). I think so.If i comment WM_PAINT all is ok.
So,want to know,how to refresh not all client area,for example.
(code is large)
Message is standart WM_PAINT: hdc=BeginPaint(..)
Plot();
EndPaint();
-
February 4th, 2005, 08:59 AM
#4
Re: Problems with drawing.
Do you send WM_PAINT message? If yes, do not. use: InvalidateRect, InvalidateRgn or RedrawWindow. See MSDN for details.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
February 4th, 2005, 10:03 AM
#5
Re: Problems with drawing.
No,i dont send.( i dont use SendMessage() function,if you mean that).
I have function that handling different messages for window (you know of course)
.....
switch(message)
{
.....//different messages (WM_COMMAND etc)
case WM_PAINT:
hdc=BeginPaint(...);
Plot();
EndPaint(...);
break;
}
And (,as i think,) when i click ,windows redraw all client area with my controls,unfortunatly
Yes,i thout about this function(InvalidateRect) ,i use it in my program,but i still
did'n find how it can concerned with my problem.i'll try to find.
-
February 4th, 2005, 10:54 AM
#6
Re: Problems with drawing.
As I have stated, without a code I am not able to help you since there may be gazillion combination of reasons for redrawing. Description you gave is not enough to identify a problem.
Code is the only way to identify a problem because problem is exclusively generated by your code. Zip and post entire project. Do not include debug, release, *.ncb, *.opt, *.plg, *.aps.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
February 4th, 2005, 01:27 PM
#7
Re: Problems with drawing.
2JohnCz:
I have no it(porjct) now here,unfortunatly. I'll try to fix it by myself soon.
And if i will not be able to do that,i'll post.
Thank you
-
February 16th, 2005, 06:24 AM
#8
Re: Problems with drawing.
try to use it like this...and tell me if it works (I am also curious), I had a problem like this some time ago and I could solve in this way...I dont know why...if anyone knows please write us.
...
hdc = GetWindowDC(hframe);
BeginPaint(hframe, lp);
...
EndPaint(hframe, lp);
ReleaseDC(hframe, hdc);
...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|