- m_clientData = NULL;
-
- // calc the message size
- // ---------------------
-
- wxArrayString lines;
- wxSize sizeText = SplitTextMessage(message, &lines);
- long heightTextMax = sizeText.GetHeight(),
- widthTextMax = sizeText.GetWidth();
- size_t nLineCount = lines.Count();
- long hTotalMsg = heightTextMax*nLineCount;
-
- // calc the button size
- // --------------------
-
- // always create the OK button - the code below supposes we do have buttons
- // and besides the user should have some way to close this dialog
- wxASSERT_MSG( style & wxOK, _T("this dialog should have OK button") );
-
- bool hasCancel = (style & wxCANCEL) != 0;
-
- wxSize sizeButtons = GetStandardButtonSize(hasCancel);
-
- long wButton = sizeButtons.GetWidth(),
- hButton = sizeButtons.GetHeight();
-
- long wTotalButtons = wButton;
- if ( hasCancel )
- {
- wTotalButtons *= 2; // second button
- wTotalButtons += MARGIN_BETWEEN_BUTTONS; // margin between the 2
- }
-
- // listbox and stat line
- // ---------------------