visual c++ - How to add color picker in mfc? -


i want able select color want, attached pic.

color picker

yes want learn c++ or mfc . find more powerfull . u explain me how add project. want color iteslf , code appers in picture box , textbox.

thanks

use ccolordialog class in mfc used pick color mfc

 // selected color ccolordialog.   ccolordialog dlg;   if (dlg.domodal() == idok)   {        colorref color = dlg.getcolor();    } 

this sample popup dialog select color , after selecting color , click ok button color variable contain selected color.

use color in application.

edit

you can customize combo box or list box add color pick tool.

refer link : codeprojectsample


Comments