Creating controls at runtime

Hi...

Can anyone please tell me how can I create a control (a button for example) during runtime? I tried:

CButton *btn = new CButton();

but I had an error at runtime.

Ayman Madkour

Comments

  • : Hi...
    :
    : Can anyone please tell me how can I create a control (a button for example) during runtime? I tried:
    :
    : CButton *btn = new CButton();
    :
    : but I had an error at runtime.
    :
    : Ayman Madkour
    :

    after calling new, you have to call the button's Create() then Show() methods.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion