Button Creation at Runtime....
-
Bit of a Newbie to this so bare with me... In my Visual C++ 6 Project, I have a Form View whereby I wish to create another button dependant on results from a Database. In the OnInitialUpdate() of the form I am trying to use the Create Function - but can only generate a debug assertion Failure. Is have used this line of code: m_Button.Create("My button", WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, CRect(10,10,100,30), this, 1); Am I doing anything obviously wrong? Any help would be appreciated...
-
Bit of a Newbie to this so bare with me... In my Visual C++ 6 Project, I have a Form View whereby I wish to create another button dependant on results from a Database. In the OnInitialUpdate() of the form I am trying to use the Create Function - but can only generate a debug assertion Failure. Is have used this line of code: m_Button.Create("My button", WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, CRect(10,10,100,30), this, 1); Am I doing anything obviously wrong? Any help would be appreciated...
Place code like that in OnInitDialog. Don't try it, just do it! ;-)
-
Bit of a Newbie to this so bare with me... In my Visual C++ 6 Project, I have a Form View whereby I wish to create another button dependant on results from a Database. In the OnInitialUpdate() of the form I am trying to use the Create Function - but can only generate a debug assertion Failure. Is have used this line of code: m_Button.Create("My button", WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, CRect(10,10,100,30), this, 1); Am I doing anything obviously wrong? Any help would be appreciated...
blinkered wrote: m_Button.Create("My button", WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, CRect(10,10,100,30), this, 1); it working fine here in my test project,what ASSERTION notice are you getting.Second put a valid ID of button instead of Putting ID=1
[Vote One Here, Complete my Survey....] Alok Gupta
visit me at http://www.thisisalok.tk "I Think Believe this Will Help" -
Place code like that in OnInitDialog. Don't try it, just do it! ;-)