Resetting controls using resource

This is a discussion on Resetting controls using resource within the Windows Programming forums, part of the Platform Specific Boards category; I would to add controls to a running dialog, I know how it can be done by creating a window, ...

  1. #1
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768

    Question Resetting controls using resource

    I would to add controls to a running dialog, I know how it can be done by creating a window, but can this be done using the resource?


    thanks for the help.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    You could always create all the controls you wish and simply render them visible or otherwise during the progress of your dialog.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    yeah but how can a style be applied when the window(control) already exists?

    And how can I resize a dialog box after it was created?
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    To change window styles use SetWindowLong with the GWL_STYLE flag. You may have to call SetWindowPos immediately after to ensure that the new styles are properly drawn.

    To resize your dialog programmatically use SetWindowPos or MoveWindow. To ensure a user can manually resize the dialog you can give it the WS_THICKFRAME style.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  5. #5
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    While we're on the subject. Is there a way to change values of buttons and static controls, without destroying and recreating them?
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  6. #6
    Even death may die... Dante Shamest's Avatar
    Join Date
    Apr 2003
    Location
    Malaysia
    Posts
    970
    is there a way to change values of buttons and static controls, without destroying and recreating them?
    SetWindowText ?

  7. #7
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    Thank you.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Controls Style: Resource View vs Running App
    By devGordon in forum Windows Programming
    Replies: 4
    Last Post: 06-19-2009, 09:43 PM
  2. Sorting out a resource manager
    By psychopath in forum Game Programming
    Replies: 1
    Last Post: 11-10-2008, 06:12 PM
  3. WIN32 API Controls used with Resource
    By parad0x13 in forum C++ Programming
    Replies: 0
    Last Post: 07-19-2008, 02:05 PM
  4. CreateProcess with Resource of executable, not the Filename
    By Ktulu in forum Windows Programming
    Replies: 4
    Last Post: 11-04-2006, 12:07 AM
  5. Serial Communications in C
    By ExDigit in forum Windows Programming
    Replies: 7
    Last Post: 01-09-2002, 09:52 AM

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