Narrow width layout Medium width layout Full-screen width layout    Small text Medium text Large text    Color Palette Selector      Search
Register  |  
Forum policy    

These Discussion Forums are dedicated to discussions on Sophis products. Some are private, you shall be connected to see their content.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to Sophis products.
2. No Flaming or Trolling.
3. No Profanity, Racism, or Prejudice.
4. Publishing information for insider trades or other illegal trading is forbidden and will be reported,
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Private messaging between users is enable. If you already put a message on forums, a registered user can send you a private message by clicking on the username link, and thus on the "Message User" link on the "Private Messaging" row. The messages can be read by clicking on the Inbox button of the toolbar.

 
Forums    
 
  Forum  Development  GUI  capture event in non modal box
Previous Previous
 
Next Next
New Post 8/27/2008 8:46 PM
  karim_belabbas
8 posts
No Ranking


capture event in non modal box 

Hello,

 

I have a problem to capture the “click” events for a button on my None Modal dialog Box.

I set the dialog box options to “style: Child”, “border: none”, “More Styles: visible”.

 

I wrote a class CMyButton who extended the class CSRButton

And use the CMyButton::Action methods

 

When I launch the application ,the Dialog Box is ok and none modal but each time I click

to a button an error occurs “INTERNAL COMMAND ERROR”

 

Someone can help me ?

 
New Post 8/28/2008 1:59 AM
  Philippe Bonneau
254 posts
www.ebsys.fr
1st Level Poster


Re: capture event in non modal box 
Modified By Philippe Bonneau  on 8/28/2008 1:00:15 AM)

Hi,

Could you, please, post your code in a .zip file - dialog + button - in attachment, by selecting the "forums/" item in the file location combo box when adding a post and upload new file after (otherwise, you cannot upload new files).

Philippe

 
New Post 8/28/2008 2:23 PM
  karim_belabbas
8 posts
No Ranking


Re: capture event in non modal box 

hello philippe,

this the source code of the non modal dialog box project

Karim

 

 
 Login to download attachment
New Post 8/28/2008 3:07 PM
  Philippe Bonneau
254 posts
www.ebsys.fr
1st Level Poster


Re: capture event in non modal box 
Modified By Philippe Bonneau  on 8/28/2008 2:10:53 PM)

Taking a look at your code, you declare the dialog as non-modal using CSRDialog::DoDialog and setting the first parameter to false, but in your function that shows the dialog, you create and delete the object just after.

The right code should be:

void CSearchScenario::LaunchDialog(char * title)
{
 
 if(CUDialogSearchRefCon::m_dialog!=NULL) // static member, the best should be a CUDialogSearchRefcon::GetInstance
 // that creates the object if not already created
 {
  CUDialogSearchRefCon::m_dialog = new CUDialogSearchRefCon(this);
  if(CUDialogSearchRefCon::m_dialog)
   DialogSearchInstrument->DoDialog(false, title); // concerning the return, at your convenience..
 }
 else
  CUDialogSearchRefCon::m_dialog->Show();
}

and you must overload the destructor of CUDialogSearchRefCon in order to set to null the static member m_dialog that you have to create:

CUDialogSearchRefCon::~CUDialogSearchRefCon() // declare it as virtual in the declaration of the class
{
 CUDialogSearchRefCon::m_dialog = NULL;
}


This is at least the main error I saw. Otherwise, for the identifer of the dialog, you should be careful: don't use identifiers that are already used by Sophis (for instance not in the 2000 range, best in the 6000). And ask the other developers who develop other toolkits: no dll, if loaded in the same process, should use the same identifier for a dialog.

Rgds,
Philippe

 
New Post 8/28/2008 4:45 PM
  karim_belabbas
8 posts
No Ranking


Re: capture event in non modal box 

thank's a lot Philippe

 

 
Previous Previous
 
Next Next
  Forum  Development  GUI  capture event in non modal box
 Syndicate  

Copyright 2007-2008 by Ebsys  | Terms Of Use | Privacy Statement  | Skin by Speerio