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 ...

dynamic button ...

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorial
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

    Helllllo people .. i'm new in vc++ but i want to learn ... now i have a mfc mdi wizard with base class CFormView and i want to put on a new document something but in dynamic mode with Create function ... something like a button or a static text ... the problem is that i don't know where and how to do this .. i have tryed and the best result is that the button was there for a moment just and then gone .. i don't know where ... my last tryings are CMDIChildWnd * bb=((CMDIFrameWnd*)AfxGetMainWnd())->MDIGetActive(); CButton info1; CRect rct(50,50,200,200); info1.Create("Info1",WS_CHILD,rct,bb,130); info1.SetWindowText("Pleease !!!"); please help me ... and forgive my english :)

    H 1 Reply Last reply
    0
    • A AlinRO

      Helllllo people .. i'm new in vc++ but i want to learn ... now i have a mfc mdi wizard with base class CFormView and i want to put on a new document something but in dynamic mode with Create function ... something like a button or a static text ... the problem is that i don't know where and how to do this .. i have tryed and the best result is that the button was there for a moment just and then gone .. i don't know where ... my last tryings are CMDIChildWnd * bb=((CMDIFrameWnd*)AfxGetMainWnd())->MDIGetActive(); CButton info1; CRect rct(50,50,200,200); info1.Create("Info1",WS_CHILD,rct,bb,130); info1.SetWindowText("Pleease !!!"); please help me ... and forgive my english :)

      H Offline
      H Offline
      Hydralisk
      wrote on last edited by
      #2

      Your button object is define as a local variable,try to define a member variable to do this. Thinking in difference!

      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