U++ framework
Do not panic. Ask here before giving up.

Home » Community » Newbie corner » Creating a form inside a DLL
Creating a form inside a DLL [message #33825] Fri, 16 September 2011 20:04 Go to previous message
tcler is currently offline  tcler
Messages: 4
Registered: September 2011
Junior Member
i write plugin for Download Master and have one question: how can i correctly initialize a form without a WinMain? my code:
StatDialog.h:
#include <CtrlLib/CtrlLib.h>
#include "StatPlugin.h"

using namespace Upp;

#define LAYOUTFILE "StatPlugin.lay"
#include <CtrlCore/lay.h>

class CStatDialog : public WithStatDialog<TopWindow> {
public:
	void setLnk (CStats &ptr);
	void Cal_CallBack ();
	void CBtn_CallBack();
	CStatDialog ();
	typedef CStatDialog CLASSNAME;
private:
	CStats _statslnk;
};

the form is created and then deleted when it calls (in other class):
UPP::Ctrl::InitWin32(0);
UPP::AppInitEnvironment__();
CStatDialog dform = CStatDialog();
dform.setPtr(stats_obj);
dform.RunAppModal();
UPP::DeleteUsrLog();
UPP::AppExit__();

it works but when app closes (dll detach) i get message "heap leaks detected" (debug build).
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Scatter: To find width bwt any two points.
Next Topic: gridctrl with sql
Goto Forum:
  


Current Time: Mon Oct 12 23:53:53 GMT+2 2026

Total time taken to generate the page: 0.00627 seconds