MCPcopy Create free account
hub / github.com/ajkhoury/ReClassEx / Initialize

Method Initialize

ReClass/CNodeFunctionPtr.cpp:149–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149void CNodeFunctionPtr::Initialize( CWnd* pParentWindow, ULONG_PTR Address )
150{
151 if (m_pAssemblyWindow != NULL)
152 {
153 m_pAssemblyWindow->Clear( );
154 m_pAssemblyWindow->ShowWindow( SW_HIDE );
155
156 delete m_pAssemblyWindow;
157 m_pAssemblyWindow = NULL;
158 }
159
160 m_pAssemblyWindow = new CScintillaEdit;
161
162 m_pParentWindow = static_cast<CWnd*>(pParentWindow);
163
164 m_pAssemblyWindow->Create( WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN, CRect( 0, 0, 0, 0 ), m_pParentWindow, 0 );
165 m_pAssemblyWindow->ShowWindow( SW_HIDE ); // Hide the window until we open the level
166 //m_pAssemblyWindow->EnableWindow( FALSE ); // Disables the ability to scroll
167 m_pAssemblyWindow->EnableScrollBarCtrl( SB_BOTH, FALSE );
168
169 m_pAssemblyWindow->SetLexer( SCLEX_ASM );
170 m_pAssemblyWindow->SetStyleBits( 5 );
171 m_pAssemblyWindow->SetTabWidth( 2 );
172 m_pAssemblyWindow->SetForeground( STYLE_DEFAULT, black );
173 m_pAssemblyWindow->SetBackground( STYLE_DEFAULT, g_crBackground );
174 m_pAssemblyWindow->SetSize( STYLE_DEFAULT, FONT_DEFAULT_SIZE );
175 m_pAssemblyWindow->SetHorizontalScrollVisible( FALSE );
176 m_pAssemblyWindow->SetVerticalScrollVisible( FALSE );
177 m_pAssemblyWindow->SetFont( STYLE_DEFAULT, g_ViewFontName );
178
179 m_pAssemblyWindow->SetAllStylesDefault( );
180
181 // Set syntax colors
182 for (int i = 0; s_rgbSyntaxAsm[i].iItem != -1; i++)
183 m_pAssemblyWindow->SetForeground( s_rgbSyntaxAsm[i].iItem, s_rgbSyntaxAsm[i].rgb );
184
185 m_pAssemblyWindow->SetMarginWidth( 0, 0 );
186 m_pAssemblyWindow->SetMarginWidth( 1, 0 );
187
188 // Finally, disassemble the bytes to get the memsize, height, and width
189 DisassembleBytes( Address );
190}
191
192void CNodeFunctionPtr::DisassembleBytes( ULONG_PTR Address )
193{

Callers

nothing calls this directly

Calls 13

SetStyleBitsMethod · 0.80
SetTabWidthMethod · 0.80
SetForegroundMethod · 0.80
SetBackgroundMethod · 0.80
SetAllStylesDefaultMethod · 0.80
SetMarginWidthMethod · 0.80
ClearMethod · 0.45
CreateMethod · 0.45
SetLexerMethod · 0.45
SetSizeMethod · 0.45

Tested by

no test coverage detected