MCPcopy Create free account
hub / github.com/cinience/RedisStudio / Create

Method Create

DuiLib/Core/UIDlgBuilder.cpp:10–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8}
9
10CControlUI* CDialogBuilder::Create(STRINGorID xml, LPCTSTR type, IDialogBuilderCallback* pCallback,
11 CPaintManagerUI* pManager, CControlUI* pParent)
12{
13 //��ԴIDΪ0-65535�������ֽڣ��ַ���ָ��Ϊ4���ֽ�
14 //�ַ�����<��ͷ��Ϊ��XML�ַ�����������Ϊ��XML�ļ�
15
16 if( HIWORD(xml.m_lpstr) != NULL ) {
17 if( *(xml.m_lpstr) == _T('<') ) {
18 if( !m_xml.Load(xml.m_lpstr) ) return NULL;
19 }
20 else {
21 if( !m_xml.LoadFromFile(xml.m_lpstr) ) return NULL;
22 }
23 }
24 else {
25 HRSRC hResource = ::FindResource(CPaintManagerUI::GetResourceDll(), xml.m_lpstr, type);
26 if( hResource == NULL ) return NULL;
27 HGLOBAL hGlobal = ::LoadResource(CPaintManagerUI::GetResourceDll(), hResource);
28 if( hGlobal == NULL ) {
29 FreeResource(hResource);
30 return NULL;
31 }
32
33 m_pCallback = pCallback;
34 if( !m_xml.LoadFromMem((BYTE*)::LockResource(hGlobal), ::SizeofResource(CPaintManagerUI::GetResourceDll(), hResource) )) return NULL;
35 ::FreeResource(hResource);
36 m_pstrtype = type;
37 }
38
39 return Create(pCallback, pManager, pParent);
40}
41
42CControlUI* CDialogBuilder::Create(IDialogBuilderCallback* pCallback, CPaintManagerUI* pManager, CControlUI* pParent)
43{

Callers 1

_ParseMethod · 0.45

Calls 15

LoadMethod · 0.80
LoadFromFileMethod · 0.80
LoadFromMemMethod · 0.80
IsValidMethod · 0.80
GetChildMethod · 0.80
GetSiblingMethod · 0.80
GetAttributeCountMethod · 0.80
GetAttributeNameMethod · 0.80
GetAttributeValueMethod · 0.80
AddImageMethod · 0.80
AddFontMethod · 0.80
SetDefaultFontMethod · 0.80

Tested by

no test coverage detected