MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / InitFindReplace

Method InitFindReplace

editor/ScriptEditorDlg.cpp:147–171  ·  view source on GitHub ↗

This initializes a Find/Replace dialog box (if bFind==false it sets up a Find and Replace, else it's just Find)

Source from the content-addressed store, hash-verified

145
146// This initializes a Find/Replace dialog box (if bFind==false it sets up a Find and Replace, else it's just Find)
147void CScriptEditorDlg::InitFindReplace(BOOL bFind) {
148 //
149 // If the dialog has been called already, and then closed,
150 // the pointer is still non-NULL, but the object is already
151 // dead, so reset the pointer!
152 //
153 m_pdlgFindReplace = NULL;
154 m_LastWord = " ";
155
156 // Construct the dialog
157 m_pdlgFindReplace = new CFindReplaceDialog;
158 ASSERT(m_pdlgFindReplace != NULL);
159
160 // Initialize the dialog
161 if (!m_pdlgFindReplace->Create(bFind, 0, 0, FR_DOWN, this)) {
162 mprintf(0, "Error allocating find/replace dialog!");
163 m_pdlgFindReplace = NULL;
164 return;
165 }
166
167 // Display the dialog
168 ASSERT(m_pdlgFindReplace != NULL);
169 m_pdlgFindReplace->SetActiveWindow();
170 m_pdlgFindReplace->ShowWindow(SW_SHOW);
171}
172
173// This is the message handler of sorts for the Find/Replace dialog, it interprets the message and passes the control
174// to the appropriate function

Callers

nothing calls this directly

Calls 1

CreateMethod · 0.45

Tested by

no test coverage detected