OnCtlColor
-
what is the purpose of OnCtlColor i have used one brush in onctlcolor and i am returning the handle of that brush. cos of that GDI objects(can see in task manager) are going on increasing and memory usage is also increasing. if i comment that brush everything is ok.. nothing is increasing. but in my application i must use that brush to draw the whole application. can anyone give me solution to solve that problem
regards sudhakar
-
what is the purpose of OnCtlColor i have used one brush in onctlcolor and i am returning the handle of that brush. cos of that GDI objects(can see in task manager) are going on increasing and memory usage is also increasing. if i comment that brush everything is ok.. nothing is increasing. but in my application i must use that brush to draw the whole application. can anyone give me solution to solve that problem
regards sudhakar
-
make the brush a member of your Window class! what is the purpose of OnCtlColor=> RTFM
Greetings from Germany
-
i need to change the color of the the entire dialog not only the controls on that dialog.
regards sudhakar
-
what is the purpose of OnCtlColor i have used one brush in onctlcolor and i am returning the handle of that brush. cos of that GDI objects(can see in task manager) are going on increasing and memory usage is also increasing. if i comment that brush everything is ok.. nothing is increasing. but in my application i must use that brush to draw the whole application. can anyone give me solution to solve that problem
regards sudhakar
I guess you are creating a new brush in every time in OnCtlColor function. if yes a simple solution would be to 1>make the brush object as a memeber of a classs 2>create thebrush object only once say in the constructor. 3>return the same handle every time in the function. 4>delete the object in the destructor. Thanks Rizwan