Results 1 to 3 of 3

Thread: changinh control on the fly

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    163

    changinh control on the fly

    Suppose I have a edit control in my dialog .Now I want to change it into check control or any other at runtime.Is it possible?
    If yes then how
    Purushottam

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Easiest way is just to hide the old one, and display a new control instead (create them both at the start if you want, or just keep creating/destroying them).

    The controls can't just "morph" into a new type, they have to be created specifically somehow.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    You'll have to do like Parskie said. Although, if you have created a button (of class "BUTTON"), you can change it to a checkbox, radio button, or a frame by changing its style using SetWindowLong accordingly.
    Baaaaaaaaah

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width