Create configuration page for Plug In

Alex DV

Member
Hi

I am new to Plug In development for PL/SQL Developer, however I have successfully managed to write, compile and deploy a simple C++ plug in.

I now would like to extend that plug-in to allow the user to specify some configuration options.

I have read through the plugindoc.pdf as well as looked at the shipped examples.

I cannot find anywhere how to create and display a custom screen/dialog. All I really want to do is display a dialog that contains a few check-boxes and OK/Cancel buttons. If the OK button is pressed I intend to store the state of the checkboxes using the IDE_SetPrefAsString built-in.

Any help on my specific issue would be appreciated - or even just a pointer to further documentation / examples would be great.

Many thanks

Alex.
 
Hi,
here is the code i am using for my plugin to display my configuration screen.

Code:
//---------------------------------------------------------------------------
// Show configuration dialog
void  Configure()
{

	AFX_MANAGE_STATE(AfxGetStaticModuleState());
	CConfiguration dlg;
	dlg.DoModal();
//	ShowMessage("No configue menu");
}

CConfiguration is my class for my dialog box.

The declaration of the Configure function must be define in your .h if not already there.
Should look like this

Code:
//Functions to expert to PL/SQL Dev
extern "C"
{
  __declspec(dllexport) char* IdentifyPlugIn(int);
  __declspec(dllexport) char* CreateMenuItem(int);
  __declspec(dllexport) void  RegisterCallback(int, void *);
  __declspec(dllexport) void  OnMenuClick(int);
  __declspec(dllexport) void  OnCreate();
  __declspec(dllexport) void  OnActivate();
  __declspec(dllexport) void  OnDestroy();
  __declspec(dllexport) void  OnBrowserChange();
  __declspec(dllexport) void  OnWindowChange();
  __declspec(dllexport) void  OnConnectionChange();
  __declspec(dllexport) int	  OnWindowClose(int WindowType, BOOL Changed);
  __declspec(dllexport) void  OnWindowCreate(int WindowType);
  __declspec(dllexport) void  Configure();
}

I think this should be enough to call your configuration screen.

Hope it help
 
Back
Top