Color Dialog Control Set

Environment: VC6 SP4 (with newest platform SDK for GDI+)

There are three controls included with the demo project, which are CLumChooser, CHusSatChooser and CColorBox.

To make use of these controls, you can simply add a custom control to your dialog template and specific the correct Windows class name (which is declared inside CtrlSetting.h)

You are then required to add code to your dialog implementation file:

1) Add necessary DDX_Control to DoDataExchange

  DDX_Control(pDX, IDC_COLORBOX1, m_box[0]);
  DDX_Control(pDX, IDC_COLORBOX2, m_box[1]);
  DDX_Control(pDX, IDC_COLORBOX3, m_box[2]);
  DDX_Control(pDX, IDC_COLORBOX4, m_box[3]);
  DDX_Control(pDX, IDC_LUMCHOOSER, m_LumChooser);
  DDX_Control(pDX, IDC_HUESAT, m_HueSatChooser);

2) Add necessare Macros and routines to handle child notification

ON_NOTIFY(CHueSatChooser::NM_COLORCHANGE, 
          IDC_HUESAT, 
          OnHueSatChange)
ON_NOTIFY(CLumChooser::NM_COLORCHANGE,
          IDC_LUMCHOOSER, 
          OnLumChange)
ON_NOTIFY(CColorBox::NM_BOXCLICK,
          IDC_COLORBOX1, 
          OnColorBoxClick)
ON_NOTIFY(CColorBox::NM_BOXCLICK,
          IDC_COLORBOX2, 
          OnColorBoxClick)
ON_NOTIFY(CColorBox::NM_BOXCLICK,
          IDC_COLORBOX3, 
          OnColorBoxClick)
ON_NOTIFY(CColorBox::NM_BOXCLICK,
          IDC_COLORBOX4,
          OnColorBoxClick)

afx_msg void OnHueSatChange(NMHDR * pNotifyStruct,
                            LRESULT * result );
afx_msg void OnLumChange(NMHDR * pNotifyStruct,
                         LRESULT * result );
afx_msg void OnColorBoxClick(NMHDR * pNotifyStruct,
                             LRESULT * result );

If there is any kind of bugs or memory leaks, please let me know.

Have fun.

Downloads

Download demo project - 23 Kb


Comments

  • can't compile - Bitmap undeclared identified

    Posted by Legacy on 04/19/2002 12:00am

    Originally posted by: Gilles Dufour

    Upgraded my version to the latest SDK to include GDI.
    But I still get an error when compiling about Bitmap undeclated identifier

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • On-demand Event Event Date: September 10, 2014 Modern mobile applications connect systems-of-engagement (mobile apps) with systems-of-record (traditional IT) to deliver new and innovative business value. But the lifecycle for development of mobile apps is also new and different. Emerging trends in mobile development call for faster delivery of incremental features, coupled with feedback from the users of the app "in the wild." This loop of continuous delivery and continuous feedback is how the best mobile …

  • Webinar on September 23, 2014, 2 p.m. ET / 11 a.m. PT Mobile commerce presents an array of opportunities for any business -- from connecting with your customers through mobile apps to enriching operations with mobile enterprise solutions. Join guest speaker, Michael Facemire, Forrester Research, Inc. Principal Analyst, as he discusses the new demands of mobile engagement and how application program interfaces (APIs) play a crucial role. Check out this upcoming webinar to learn about the new set of …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds