Hi,
As you suggested I use wxFrame as my main window. And from this wxFrame I call wxDialogs (5 or 6 of them).
With one, where I have sizers, grids, and buttons I have this problem.
In the modal dialog I only call End_Modal and destroy is called within wxFrame. What is strange this code works great on Pocket pc Emulator 2003 first edtion. But the main frame is closed on Pocket PC. I checked it on two devices with WM 5.0 and with Pocket PC 2003.
In code there is addtional description
Code: Select all
void PocketPCDlg::wxButLogInClick(wxCommandEvent& event)
{
//this code works fine under Emulator but on Device
// wxFrame is closed what I don't want
pDlgPrzeglad=new DlgPrzeglad(this);
pDlgPrzeglad->ShowModal();
pDlgPrzeglad->Destroy();
/*
//this code close my wxFrame on Emulator and on
//Device I don't know why, this code
//also should close only wxdialog
DlgPrzeglad d1(this);
if (d1.ShowModal()==wxID_OK){
};
*/
/*
//and this code work under Emulator and Device
//but I think that I should not write programs in this way
//the error propably is in destructor in wxDialog
if (!(pDlgPrzeglad==NULL)){
wxMessageBox(_T("NOT NULL"));
pDlgPrzeglad->ShowModal();
}
else {
wxMessageBox(_T("IS NULL"));
pDlgPrzeglad=new DlgPrzeglad(this);
pDlgPrzeglad->ShowModal();
};
*/
}
So what to say. Please give me some advice. I dont know what to do.
How you use wxDialog and wxFrame on Pocket PC? Please send me some you code? Maybe I am doing something wrong? My style of wxwdialog is:
Code: Select all
#define PocketPCDlg_STYLE wxCAPTION | wxSYSTEM_MENU | wxMINIMIZE_BOX | wxCLOSE_BOX
Is it OK? Please help.
Regards,
Daniel