I create a sample dialog application which has a circle drawn. Also on mouse move the circle will be re-drawn. I am providing my code below. Its also compilable.
I tried using double buffering and erasebackground, i was not getting the flickering issue, but i observed that the drawining is not erased properly. So to erase, in OnPaint i wrote the erasing code. Again i am facing the flickering issue.
I modified my dialog to a polygon region dialog. Then i am trying to frame/draw the border.Using device context the CRgn::FrameRgn, i am bale to draw the border around the dialog. But i want to achieve this using Gdi+. I did as below, but the border is appearing only on left and top of the dialog. Can someone please help on this.
Thanks for your solution.
I used AddLine and the same vertex. Still it was not working.
Then i decreased 1 from right and bottom, now its working.
Is it something like i need to use offset or something. I dont want to hardcode.
This works but I want to check if the user enter a number outside a defined range and block values that are too big or to small.
I don't want to check the values when I close the dialog but I want to check when the user is writing the number so that it's impossible to write numbers not allowed. The edit control must show only permitted value.