X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2afb9e169048b77a41c63b4f4eea3b10daee641a..4c509aecb650100d0bca898ec05801a0fbcae1f4:/src/palmos/msgdlg.cpp?ds=sidebyside diff --git a/src/palmos/msgdlg.cpp b/src/palmos/msgdlg.cpp index bde9907eb2..48445b23c5 100644 --- a/src/palmos/msgdlg.cpp +++ b/src/palmos/msgdlg.cpp @@ -23,7 +23,12 @@ #include "wx/msgdlg.h" #endif +#ifdef __WXPALMOS6__ #include +#else // __WXPALMOS5__ +#include // alertRscType +#endif + #include IMPLEMENT_CLASS(wxMessageDialog, wxDialog) @@ -35,9 +40,11 @@ int wxMessageDialog::ShowModal() int wxResult=wxID_OK; const long style = GetMessageDialogStyle(); +#ifdef __WXPALMOS6__ // Handle to the currently running application database DmOpenRef AppDB; SysGetModuleDatabase(SysGetRefNum(), NULL, &AppDB); +#endif // __WXPALMOS6__ // Translate wx styles into Palm OS styles if (style & wxYES_NO) @@ -71,7 +78,7 @@ int wxMessageDialog::ShowModal() // Get the alert resource char *AlertPtr; MemHandle AlertHandle; - AlertHandle=DmGetResource(AppDB,'Talt',AlertID); + AlertHandle = POS_DmGetResource (AppDB, alertRscType, AlertID); AlertPtr=(char *)MemHandleLock(AlertHandle); AlertPtr+=8; @@ -99,7 +106,7 @@ int wxMessageDialog::ShowModal() DmReleaseResource(AlertHandle); // Display the dialog - Result=FrmCustomAlert(AppDB,AlertID,GetFullMessage().c_str(),"",""); + Result = POS_FrmCustomAlert (AppDB, AlertID, m_message.c_str(), "", ""); // Convert the Palm OS result to wxResult if(AlertID<1100)