Regarding Back ground color.
-
Hello Friends, I have 3 edit boxes in which I enter the values of RGB respectively. Whenever there is a change of value in the edit boxes, I display the appropraite color based on the inputted values in a picture control. My main problem lies, if I resize the window, then the color displayed in the picture control is gone, so for displaying it again, i have to change the value of edit box. So, please help me regarding this one so that even if i resize the window, the colour is shown to the user. Even I had included OnPaint() function and calling the color display, then it is flickering. Please help me. :( :doh: Thanks in Advance.
-
Hello Friends, I have 3 edit boxes in which I enter the values of RGB respectively. Whenever there is a change of value in the edit boxes, I display the appropraite color based on the inputted values in a picture control. My main problem lies, if I resize the window, then the color displayed in the picture control is gone, so for displaying it again, i have to change the value of edit box. So, please help me regarding this one so that even if i resize the window, the colour is shown to the user. Even I had included OnPaint() function and calling the color display, then it is flickering. Please help me. :( :doh: Thanks in Advance.
Check for the WM_SIZE event (OnSize() function).
-
Hello Friends, I have 3 edit boxes in which I enter the values of RGB respectively. Whenever there is a change of value in the edit boxes, I display the appropraite color based on the inputted values in a picture control. My main problem lies, if I resize the window, then the color displayed in the picture control is gone, so for displaying it again, i have to change the value of edit box. So, please help me regarding this one so that even if i resize the window, the colour is shown to the user. Even I had included OnPaint() function and calling the color display, then it is flickering. Please help me. :( :doh: Thanks in Advance.
It sounds like you are just redrawing the control in a new color and not setting it to the new color. In orther words, you should be calling a function that changes the drawing color of the control so that when it is being repainted it uses the new color. You should not need to define your own OnPaint() function to accomplish this. The flickering is noramaly caused by the OnEraseBkgnd(). INTP "The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes." Andrew W. Troelsen