MCPcopy Create free account
hub / github.com/ariccio/altWinDirStat / InitInstance

Method InitInstance

Reference code/osImageTool/OSImageTool.cpp:164–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162 return true;
163}
164BOOL COSImageToolApp::InitInstance()
165{
166 DebugOutputDebugString();
167
168 // InitCommonControls() is required on Windows XP if an application
169 // manifest specifies use of ComCtl32.dll version 6 or later to enable
170 // visual styles. Otherwise, any window creation will fail.
171 InitCommonControls();
172
173 CWinApp::InitInstance();
174
175 AfxEnableControlContainer();
176
177 SetRegistryKey("XDA Developers\\OSImageTool");
178
179 if (!ParseCommandLine(string(this->m_lpCmdLine)))
180 {
181 g_err.Display();
182 return false;
183 }
184
185 if (m_bDoRegisterSelf)
186 return g_cfg.RegisterSelf();
187
188
189 DiskList list;
190 DiskInfo::GetDiskList(list);
191 for (DiskList::iterator i= list.begin() ; i!=list.end() ; ++i)
192 m_sdcards.push_back(new LocalSdCard(*i));
193
194 m_sdcards.push_back(new RemoteSdCard());
195
196 debug("before create\n");
197 COSImageToolDlg dlg;
198 dlg.Create(dlg.IDD, NULL);
199 m_pMainWnd = &dlg;
200
201 StringList namelist;
202 GetFriendlyNameList(namelist);
203 namelist.push_back("Device Memory (current rom)");
204 dlg.m_src.Initialize(namelist);
205
206 namelist.pop_back();
207
208 namelist.push_back("Device Memory (via Programme A)");
209 dlg.m_dst.Initialize(namelist);
210
211 int index;
212 if (FindListIndex(m_cmdsourcename, index))
213 dlg.m_src.SetSelection(index);
214 else
215 dlg.m_src.SetText(m_cmdsourcename);
216 if (FindListIndex(m_cmdtargetname, index))
217 dlg.m_dst.SetSelection(index);
218 else
219 dlg.m_dst.SetText(m_cmdtargetname);
220
221 // if only 1 local sdcard and target is localsdcard

Callers

nothing calls this directly

Calls 14

DebugOutputDebugStringFunction · 0.85
debugFunction · 0.85
DisplayMethod · 0.80
RegisterSelfMethod · 0.80
beginMethod · 0.80
PumpMessagesMethod · 0.80
EnableInterfaceMethod · 0.80
InitInstanceFunction · 0.50
endMethod · 0.45
CreateMethod · 0.45
InitializeMethod · 0.45
SetSelectionMethod · 0.45

Tested by

no test coverage detected