11#include  < Polycode.h> 
22#include  " PolycodeIDEApp.h" 
3- #include  " PolycodeView .h" 
3+ #include  " PolycodeWinIDEView .h" 
44#include  " windows.h" 
55#include  " resource.h" 
66#include  < Shlobj.h> 
77#include  < Shlwapi.h> 
88#include  < shellapi.h> 
99
10+ extern  PolycodeIDEApp *globalApp;
11+ 
1012using  namespace  Polycode ; 
1113
1214void  registerFileType (String extension, String progId, String app, String defaultIcon, String desc) {
@@ -73,9 +75,11 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
7375	PathRemoveFileSpec ( FilePath );    
7476	SetCurrentDirectory ( FilePath );
7577
76- 	PolycodeView  *view = new  PolycodeView (hInstance, nCmdShow, L" Polycode"  , true , false );
78+ 	PolycodeWinIDEView  *view = new  PolycodeWinIDEView (hInstance, nCmdShow, L" Polycode"  , true , false );
7779	PolycodeIDEApp *app = new  PolycodeIDEApp (view);
7880
81+ 	globalApp = app;
82+ 
7983	if (fileName != " "  ) {
8084		app->openProject (fileName);
8185	}
@@ -89,8 +93,11 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
8993	MSG Msg;
9094	do  {
9195		while  (PeekMessage (&Msg, NULL , 0 , 0 , PM_REMOVE)) {
92- 			TranslateMessage (&Msg);
93- 			DispatchMessage (&Msg);
96+ 
97+ 			if  (!TranslateAccelerator (view->hwnd , view->haccel , &Msg)) {
98+ 				TranslateMessage (&Msg);
99+ 				DispatchMessage (&Msg);
100+ 			}
94101		}
95102		if (((Win32Core*)app->core )->hasCopyDataString ) {
96103			app->openProject (((Win32Core*)app->core )->copyDataString );
0 commit comments