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
Re: Creating a form inside a DLL [message #33906 is a reply to message #33825] Sat, 24 September 2011 21:30 Go to previous message
mirek is currently offline  mirek
Messages: 14266
Registered: November 2005
Ultimate Member
tcler wrote on Fri, 16 September 2011 14:04

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).


The initialization of form is definitely not the problem.

However, the issue could be about how you have arranged for DLL. Do you use DLL_APP_MAIN?
 
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: Sat Jul 19 12:00:37 CEST 2025

Total time taken to generate the page: 0.04147 seconds