Skip to content

Commit

Permalink
[SVN版本:741]
Browse files Browse the repository at this point in the history
[SVN版本:737]
* 同步GIT 2018-10-15
[SVN版本:739]
[QDialogBuilder]
* 修正了 Clear 函数类型错误
+ 增加对 Padding 属性的支持
* 修改了 CustomDialog 函数的,对左右边缘进行缩进,以提升视觉效果
[QHttpRequest]
+ TQUrl 新增 UrlWithoutParams 属性
+ TQHttpRequests 增加 CookieManager 支持
+ 增加 NewHeaders 以增加自定义 HTTP 协议头支持
[QJson]
* 析构函数直接改成调用 ResetNull
[SVN版本:740]
+ 增加额外的标志位和倒计时关闭窗口支持(默认改为多个按钮时禁止Alt+F4关闭)
[SVN版本:741]
+ 增加两个示例
  • Loading branch information
qdac committed Oct 18, 2018
1 parent 01b8554 commit 00333d3
Show file tree
Hide file tree
Showing 217 changed files with 77,306 additions and 50,540 deletions.
3 changes: 3 additions & 0 deletions Demos/CPP/VCL/QPlugins/FormService/dll_form.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include <vcl.h>
#include <tchar.h>

51 changes: 51 additions & 0 deletions Demos/CPP/VCL/QPlugins/FormService/dll_form_form.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// ---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "dll_form_form.h"
#include "qplugins_vcl_formsvc.hpp"
// ---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm3 *Form3;

// ---------------------------------------------------------------------------
__fastcall TForm3::TForm3(TComponent* Owner) : TForm(Owner) {
_di_IQNotifyManager AMgr = ToInterface<IQNotifyManager>(PluginsManager());
if (AMgr) {
AMgr->Subscribe(AMgr->IdByName(L"CPPNotify"),
ToInterface<IQNotify>((TObject *)this));
ScaleForPPI
}
}

// ---------------------------------------------------------------------------
void __stdcall TForm3::Notify(const unsigned AId,
Qplugins_params::_di_IQParams AParams, bool &AFireNext) {
Memo1->Lines->Add(L"Notify Fired");
}

void Register() {
RegisterFormService(L"/Services/Docks/Forms", L"SingleInstanceForm",
__classid(TForm3), false);
RegisterFormService(L"/Services/Docks/Forms", L"MultiInstanceForm",
__classid(TForm3), true);
}

void Unregister() {
QStringW ANames[2] = {L"MultiInstanceForm", L"SingleInstanceForm"};
UnregisterServices(L"/Services/Docks/Forms", ANames, 1);
}

#pragma startup Register
#pragma exit Unregister

void __fastcall TForm3::FormDestroy(TObject *Sender) {
_di_IQNotifyManager AMgr = ToInterface<IQNotifyManager>(PluginsManager());
if (AMgr) {
AMgr->Unsubscribe(AMgr->IdByName(L"CPPNotify"),
ToInterface<IQNotify>((TObject *)this));
}
}
// ---------------------------------------------------------------------------
30 changes: 30 additions & 0 deletions Demos/CPP/VCL/QPlugins/FormService/dll_form_form.dfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
object Form3: TForm3
Left = 0
Top = 0
Caption = 'Form3'
ClientHeight = 299
ClientWidth = 635
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
OnDestroy = FormDestroy
PixelsPerInch = 96
TextHeight = 13
object Memo1: TMemo
Left = 0
Top = 210
Width = 635
Height = 89
Align = alBottom
Lines.Strings = (
'Memo1')
TabOrder = 0
ExplicitLeft = 232
ExplicitTop = 128
ExplicitWidth = 185
end
end
40 changes: 40 additions & 0 deletions Demos/CPP/VCL/QPlugins/FormService/dll_form_form.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// ---------------------------------------------------------------------------

#ifndef dll_form_formH
#define dll_form_formH
// ---------------------------------------------------------------------------
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Forms.hpp>
#include <Data.DB.hpp>
#include "qplugins.hpp"
#define CppInterfaceFix \
ULONG STDMETHODCALLTYPE AddRef(void) \
{ \
return _AddRef(); \
} \
ULONG STDMETHODCALLTYPE Release(void) \
{ \
return _Release(); \
}

// ---------------------------------------------------------------------------
class TForm3 : public TForm, public IQNotify {
__published: // IDE-managed Components
TMemo *Memo1;
void __fastcall FormDestroy(TObject *Sender);

private: // User declarations
CppInterfaceFix;
void __stdcall Notify(const unsigned AId,
Qplugins_params::_di_IQParams AParams, bool &AFireNext);

public: // User declarations
__fastcall TForm3(TComponent* Owner);
};

// ---------------------------------------------------------------------------
extern PACKAGE TForm3 *Form3;
// ---------------------------------------------------------------------------
#endif
30 changes: 30 additions & 0 deletions Demos/CPP/VCL/QPlugins/FormService/dll_form_main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Important note about DLL memory management when your DLL uses the
// static version of the RunTime Library:
//
// If your DLL exports any functions that pass String objects (or structs/
// classes containing nested Strings) as parameter or function results,
// you will need to add the library MEMMGR.LIB to both the DLL project and
// any other projects that use the DLL. You will also need to use MEMMGR.LIB
// if any other projects which use the DLL will be performing new or delete
// operations on any non-TObject-derived classes which are exported from the
// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling
// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases,
// the file BORLNDMM.DLL should be deployed along with your DLL.
//
// To avoid using BORLNDMM.DLL, pass string information using "char *" or
// ShortString parameters.
//
// If your DLL uses the dynamic version of the RTL, you do not need to
// explicitly add MEMMGR.LIB as this will be done implicitly for you

#include <vcl.h>
#include <windows.h>

#pragma hdrstop
#pragma argsused

int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
{
return 1;
}

Loading

0 comments on commit 00333d3

Please sign in to comment.