Hi, I am making application where I need to repaint windows form where I display some variables. I used InvalidateRect(NULL,0,0); - now the form is refreshing but started to blink because I refresh whole area,and I dont need to refresh all the buttons and static text ,only area where I display values of variables. In InvalidateRect the middle argument should be rectangle I want to refresh,but it is some type - LPCRECT - I dont really understand.I tried a lot,but nothing had worked.Please could someone post me just how to refresh area for example from x=20,y=20 with width=30 and height=100 ? Thanks for reply.

Hi broli100 :-)

Give this a try:

RECT rct;
rct.left = 20;
rct.top = 20;
rct.right = rct.left + 30;
rct.bottom = rct.top + 100;
InvalidateRect(NULL, &rct, 0);

LPRECT is short for "Long Pointer to RECT".

It works perfect! I had spend two days by looking for tutorial where is this,I thought I will smash keyboard through the wall. Thanks a lot!