| 115 | } |
| 116 | |
| 117 | void CNodeFunction::Initialize( CClassView* pParentWindow, ULONG_PTR Address ) |
| 118 | { |
| 119 | if (m_pEdit != NULL) |
| 120 | { |
| 121 | m_pEdit->Clear( ); |
| 122 | m_pEdit->ShowWindow( SW_HIDE ); |
| 123 | |
| 124 | delete m_pEdit; |
| 125 | } |
| 126 | |
| 127 | m_pEdit = new CScintillaEdit; |
| 128 | |
| 129 | m_pEdit->Create( WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN, CRect( 0, 0, 0, 0 ), (CWnd*)pParentWindow, 0 ); |
| 130 | |
| 131 | m_pEdit->ShowWindow( SW_HIDE ); // Hide the window until we open the level |
| 132 | //m_pEdit->EnableWindow( FALSE ); // Disables the ability to scroll |
| 133 | m_pEdit->EnableScrollBarCtrl( SB_BOTH, FALSE ); |
| 134 | |
| 135 | m_pEdit->SetLexer( SCLEX_ASM ); |
| 136 | m_pEdit->SetStyleBits( 5 ); |
| 137 | m_pEdit->SetTabWidth( 2 ); |
| 138 | m_pEdit->SetForeground( STYLE_DEFAULT, black ); |
| 139 | m_pEdit->SetBackground( STYLE_DEFAULT, g_crBackground ); |
| 140 | m_pEdit->SetSize( STYLE_DEFAULT, FONT_DEFAULT_SIZE ); |
| 141 | m_pEdit->SetHorizontalScrollVisible( FALSE ); |
| 142 | m_pEdit->SetVerticalScrollVisible( FALSE ); |
| 143 | m_pEdit->SetFont( STYLE_DEFAULT, g_ViewFontName ); |
| 144 | |
| 145 | m_pEdit->SetAllStylesDefault( ); |
| 146 | |
| 147 | // Set syntax colors |
| 148 | for (int i = 0; s_rgbSyntaxAsm[i].iItem != -1; i++) |
| 149 | m_pEdit->SetForeground( s_rgbSyntaxAsm[i].iItem, s_rgbSyntaxAsm[i].rgb ); |
| 150 | |
| 151 | m_pEdit->SetMarginWidth( 0, 0 ); |
| 152 | m_pEdit->SetMarginWidth( 1, 0 ); |
| 153 | |
| 154 | // Finally, disassemble the bytes to get the memsize, height, and width |
| 155 | DisassembleBytes( Address ); |
| 156 | } |
| 157 | |
| 158 | void CNodeFunction::DisassembleBytes( ULONG_PTR Address ) |
| 159 | { |
nothing calls this directly
no test coverage detected