Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. dynamic button on CFormView Child ??

dynamic button on CFormView Child ??

Scheduled Pinned Locked Moved C / C++ / MFC
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AlinRO
    wrote on last edited by
    #1

    how can i put with Create function a working button on a Child Window of my mdi app derived from CFormView ? << Thank you people >>

    R 1 Reply Last reply
    0
    • A AlinRO

      how can i put with Create function a working button on a Child Window of my mdi app derived from CFormView ? << Thank you people >>

      R Offline
      R Offline
      Roger Allen
      wrote on last edited by
      #2

      Add a meber varibale of the control type to your form view class. Then call Create on it in the OnInitialUpdate() procedure. You will also need to position the control correctly on your formview using MoveWindow() etc. If you re-size your form in OnSize() check to make sure the actual windows exist before trying to move them around. CButton m_MyButton ; m_MyButton.Create("STOP!", WS_CHILD | WS_VISIBLE | BS_OWNERDRAW | WS_TABSTOP | WS_CLIPSIBLINGS, CRect(0, 0, 10, 10), this, IDC_OF_YOUR_BUTTON) ; m_MyButton.MoveWindow(...) ; // put button in correct place Don;t forget to call m_MyButton.DestroyWindow() in the OnDestroy of your FormView. Roger Allen Sonork 100.10016 I think I need a new quote, I am on the prowl, so look out for a soft cute furry looking animal, which is really a Hippo in disguise. Its probably me.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups