Subclassing

This is a discussion on Subclassing within the Windows Programming forums, part of the Platform Specific Boards category; WIll subclassing allow me to change the look of a control? How do people create custom controls? I mean like, ...

  1. #1
    Semi n00b Mithoric's Avatar
    Join Date
    Jun 2003
    Posts
    293

    Subclassing

    WIll subclassing allow me to change the look of a control?

    How do people create custom controls? I mean like, tab controls and sliders and things.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    WIll subclassing allow me to change the look of a control
    Yes, but it's more usual to make the control owner-drawn: give the control the appropriate owner draw style and then handle WM_DRAWITEM notification messages.
    I mean like, tab controls and sliders and things.
    These are common controls, although ms prefers to list them all together now with what used to be referred to as standard or user controls (buttons,edits,listboxes etc).
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Semi n00b Mithoric's Avatar
    Join Date
    Jun 2003
    Posts
    293
    Thanks. I'll have a little play around and see what I can figure out.

  4. #4
    Semi n00b Mithoric's Avatar
    Join Date
    Jun 2003
    Posts
    293
    Ok, I think I've figured it out. So when that message is sent windows would usually do some GDI functions to draw the control? And because it's ownerdrawn I can do it instead?
    Last edited by Mithoric; 11-22-2003 at 06:15 AM.

  5. #5
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Yup.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  6. #6
    Semi n00b Mithoric's Avatar
    Join Date
    Jun 2003
    Posts
    293
    Sweet...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I got subclassing to work, but....
    By cl2606 in forum Windows Programming
    Replies: 2
    Last Post: 07-06-2008, 03:28 PM
  2. Subclassing
    By alex0751 in forum C++ Programming
    Replies: 2
    Last Post: 01-21-2008, 05:39 PM
  3. Subclassing Problem
    By Thunder in forum Windows Programming
    Replies: 4
    Last Post: 10-22-2003, 03:49 PM
  4. Subclassing a dialog->Calling DialogProc
    By knutso in forum Windows Programming
    Replies: 7
    Last Post: 05-20-2003, 12:33 AM
  5. Subclassing a listbox and the speed of the postal service
    By SMurf in forum Windows Programming
    Replies: 3
    Last Post: 09-14-2002, 07:25 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21