--------------------- ADD -----------------------
| 480 | } |
| 481 | // --------------------- ADD ----------------------- |
| 482 | bool dialog::addControl(dialog *ctrl) |
| 483 | { |
| 484 | if ( !this || !ctrl || ctrl->isDialog()) |
| 485 | return false; |
| 486 | |
| 487 | dialog *parent = this; |
| 488 | if ( !parent->isDialog() ) |
| 489 | parent = parent->parent(); |
| 490 | |
| 491 | ctrl->u.ctrl.pDlg = parent; |
| 492 | if ( !parent->child() ) |
| 493 | { |
| 494 | parent->u.dlg.pFirstChild = ctrl; |
| 495 | } |
| 496 | else |
| 497 | { |
| 498 | dialog *child = parent->child(); |
| 499 | while ( child->pNext ) |
| 500 | child = child->pNext; |
| 501 | child->pNext = ctrl; |
| 502 | } |
| 503 | return true; |
| 504 | } |
| 505 | // ------------------ INITIALIZE ------------------- |
| 506 | bool dialog::initialize() |
| 507 | { |