debuggerapp.cpp 901 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #include "stdafx.h"
  2. #include "debugger.h"
  3. #include "debuggerapp.h"
  4. #include "resource.h"
  5. #include "prefs.h"
  6. DebuggerApp debuggerApp;
  7. DebuggerApp::~DebuggerApp(){
  8. }
  9. BOOL DebuggerApp::InitInstance(){
  10. AfxInitRichEdit();
  11. main_frame=new MainFrame();
  12. m_pMainWnd=main_frame;
  13. RECT rect;
  14. SystemParametersInfo( SPI_GETWORKAREA,0,&rect,0 );
  15. int x=rect.left;
  16. int w=rect.right-x;
  17. int h=240;
  18. int y=rect.bottom-h;
  19. main_frame->Create( 0,"Blitz Debugger",
  20. WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN,
  21. CRect( x,y,x+w,y+h ) );
  22. main_frame->ShowWindow( SW_SHOW );
  23. main_frame->UpdateWindow();
  24. return TRUE;
  25. }
  26. int DebuggerApp::ExitInstance(){
  27. main_frame->DestroyWindow();
  28. return 0;
  29. }
  30. MainFrame *DebuggerApp::mainFrame(){
  31. return debuggerApp.main_frame;
  32. }
  33. Debugger * _cdecl debuggerGetDebugger( void *mod,void *env ){
  34. debuggerApp.mainFrame()->setRuntime( mod,env );
  35. return debuggerApp.mainFrame();
  36. }