Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Jul 14 08:07:40 CEST 2025

Total time taken to generate the page: 0.03751 seconds