注意:VC++转为Delphi的问题?(30分)

  • 主题发起人 主题发起人 ydzi_
  • 开始时间 开始时间
Y

ydzi_

Unregistered / Unconfirmed
GUEST, unregistred user!
class CDRM : public CWnd
{
protected:
DECLARE_DYNCREATE(CDRM)
public:
CLSID const& GetClsid()
{
static CLSID const clsid
= { 0x645806a5, 0x6552, 0x4a4f, { 0xa9, 0xfe, 0xd5, 0x83, 0xaf, 0x75, 0x53, 0xae } };
return clsid;
}
virtual BOOL Create(LPCTSTR lpszClassName,
LPCTSTR lpszWindowName, DWORD dwStyle,
const RECT& rect,
CWnd* pParentWnd, UINT nID,
CCreateContext* pContext = NULL)
{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); }

BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle,
const RECT& rect, CWnd* pParentWnd, UINT nID,
CFile* pPersist = NULL, BOOL bStorage = FALSE,
BSTR bstrLicKey = NULL)
{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
pPersist, bStorage, bstrLicKey); }
}

请问怎么把上面的代码转为DELPHI啊,谢谢
 
追加两行,[:D]

void SetReturn(long);

void SetPwd(LPCTSTR);
 
这是一个类的声明啊
 
[:)]
代码:
BOOL AddEndTime(long id, BSTR* pBakTime);//  这里BSTR*是什么类型的? pBakTime在Delphi中应该怎么声明,谢谢!

TO:sp231957
我知道啊! 我想转到delphi中来!谢谢
 
pBakTime就是声明一个指向BSTR的指针而已 名字可以自己随便命名的

至于BSTR吗,就相当于DELPHI中的WIDE STRING
 
[:)]
TO: wp231957
我对delphi的指针还不熟,呵呵。。。

谁能帮我把上面的类转一下啊!谢谢
 
我对delphi的指针还不熟,呵呵。。。

呵呵,正相反,我对VC的指针也不熟悉
 
晕了……

救命啊。。。
 
没有答案怎么结贴啊!
 
class CDRM : public CWnd
{
protected:
DECLARE_DYNCREATE(CDRM)
public:
CLSID const& GetClsid()
{
static CLSID const clsid
= { 0x645806a5, 0x6552, 0x4a4f, { 0xa9, 0xfe, 0xd5, 0x83, 0xaf, 0x75, 0x53, 0xae } };
return clsid;
}
virtual BOOL Create(LPCTSTR lpszClassName,
LPCTSTR lpszWindowName, DWORD dwStyle,
const RECT& rect,
CWnd* pParentWnd, UINT nID,
CCreateContext* pContext = NULL)
{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); }

BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle,
const RECT& rect, CWnd* pParentWnd, UINT nID,
CFile* pPersist = NULL, BOOL bStorage = FALSE,
BSTR bstrLicKey = NULL)
{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
pPersist, bStorage, bstrLicKey); }
}
 
..........
只是把格式写了一下啊!
 
结贴不结案!
 
后退
顶部