NS_ENSURE_ARG_POINTER(checkValue);  StDialogHandler	theHandler(dlog_AlertCheck, CBrowserChrome::GetLWindowForDOMWindow(parent)); LWindow			 *theDialog = theHandler.GetDialog(); nsCAutoString    cStr; Str255           pStr;  CPlatformUCSConversion::GetInstance()->UCSToPlatform(nsDependentString(dialogTitle), pStr); theDialog->SetDescriptor(pStr);  LStaticText	*msgText = dynamic_cast<LStaticText*>(theDialog->FindPaneByID('Msg ')); CPlatformUCSConversion::GetInstance()->UCSToPlatform(nsDependentString(text), cStr); cStr.ReplaceChar('\n', '\r'); msgText->SetText(const_cast<char *>(cStr.get()), cStr.Length());  LCheckBox *checkBox = dynamic_cast<LCheckBox*>(theDialog->FindPaneByID('Chck')); CPlatformUCSConversion::GetInstance()->UCSToPlatform(nsDependentString(checkMsg), pStr); checkBox->SetDescriptor(pStr); checkBox->SetValue(*checkValue ? 1 : 0);  theDialog->Show(); theDialog->Select();  while (true) { MessageT	hitMessage = theHandler.DoDialog();  if (hitMessage == msg_OK) { *checkValue = checkBox->GetValue(); break; } }
CMozillaBrowser *pOwner = GetOwningBrowser(parent); if (pOwner) {  USES_CONVERSION; pOwner->MessageBox(W2T(text), W2T(dialogTitle), MB_OK | MB_ICONEXCLAMATION); }
NS_IMETHODIMP CPromptService::AlertCheck(nsIDOMWindow *parent, const PRUnichar *dialogTitle,                                         const PRUnichar *text,                                         const PRUnichar *checkMsg, PRBool *checkValue){    NS_ENSURE_ARG_POINTER(checkValue);    StDialogHandler	theHandler(dlog_AlertCheck, CBrowserChrome::GetLWindowForDOMWindow(parent));    LWindow			 *theDialog = theHandler.GetDialog();    nsCAutoString    cStr;    Str255           pStr;    CPlatformUCSConversion::GetInstance()->UCSToPlatform(nsDependentString(dialogTitle), pStr);    theDialog->SetDescriptor(pStr);    LStaticText	*msgText = dynamic_cast<LStaticText*>(theDialog->FindPaneByID('Msg '));    CPlatformUCSConversion::GetInstance()->UCSToPlatform(nsDependentString(text), cStr);    cStr.ReplaceChar('\n', '\r');   			    msgText->SetText(const_cast<char *>(cStr.get()), cStr.Length());        LCheckBox *checkBox = dynamic_cast<LCheckBox*>(theDialog->FindPaneByID('Chck'));    CPlatformUCSConversion::GetInstance()->UCSToPlatform(nsDependentString(checkMsg), pStr);    checkBox->SetDescriptor(pStr);    checkBox->SetValue(*checkValue ? 1 : 0);    theDialog->Show();    theDialog->Select();		while (true)  // This is our modal dialog event loop	{						MessageT	hitMessage = theHandler.DoDialog();				if (hitMessage == msg_OK)		{		    *checkValue = checkBox->GetValue();       		    break;   		}	}    return NS_OK;}