I have problum in drawing rect in MFC.(dialoge based) Actually i want 2 draw rect by clicking a button. bt it go ON_Paint function b4 going to button. n display rect n after clicking button it display another rect. i have aply flags on it bt it didnt work. now what to do???