Canvas.MapMode = CMAP_MODE_16;
Canvas.MapMode = (MainWndInfo.CanvasMode == CANVAS_MODE_MAP32) ? CMAP_MODE_32 : CMAP_MODE_16;
static void CanvasInit(HWND hwnd){	RECT rc;	GDI_LOCK(); // gdi_lock	Canvas.hwnd = hwnd;	Canvas.hParentWnd = GetParent(Canvas.hwnd);	GetClientRect(Canvas.hParentWnd,&rc);	MoveWindow(Canvas.hwnd,0,0,rc.right-rc.left,rc.bottom-rc.top,FALSE);	GetClientRect(Canvas.hwnd,(RECT *)&(Canvas.rcMe));	Canvas.hdc = GetDC(Canvas.hwnd);	Canvas.hbitmap = CreateCompatibleBitmap(Canvas.hdc,CANVAS_XMAX,CANVAS_YMAX);	Canvas.hmdc = CreateCompatibleDC(Canvas.hdc);	ReleaseDC(Canvas.hwnd,Canvas.hdc);	Canvas.hBitmapSleep = LoadBitmap(hInst,MAKEINTRESOURCE(IDB_BITMAP_SLEEP));	Canvas.hgdiobj_hmdcprev = SelectObject(Canvas.hmdc,Canvas.hbitmap);	SetRect((RECT *)&(Canvas.rcSleep),0,0,96,64);	SetRect((RECT *)&(Canvas.rcMap),3,2+2,0,0);	SetRect((RECT *)&(Canvas.rcKeyboard),1,1,0,0);	SetRect((RECT *)&(Canvas.rcGSLCD),3,4,99,68);   Canvas.rcMapMap.left = Canvas.rcMap.left;   Canvas.rcMapMap.top = Canvas.rcMap.top;   Canvas.rcMapMap.right = Canvas.rcMapMap.left + 6*16 - 1;   Canvas.rcMapMap.bottom = Canvas.rcMapMap.top + 3*16 - 1;   Canvas.rcMapSub.left = Canvas.rcMapMap.left;   Canvas.rcMapSub.top = Canvas.rcMapMap.bottom + 2;   Canvas.rcMapSub.right = Canvas.rcMapSub.left + 6*16 - 1;   Canvas.rcMapSub.bottom = Canvas.rcMapSub.top +4+3+3+3+4 - 1;	Canvas.MapDelay = 1;	Canvas.MapResidual = 0;	Canvas.MapMode = CMAP_MODE_16;	//	Canvas.MapMode = CMAP_MODE_32;	Canvas.MapBarMax = 16;	//	Canvas.CKNoteFrom = 24;	//   Canvas.CKNoteTo = 24 + 96;	Canvas.CKNoteFrom = 12;   Canvas.CKNoteTo = Canvas.CKNoteFrom + 96 + 3;	Canvas.CKCh = 16;	Canvas.CKPart = 1;	Canvas.UpdateAll = 0;	Canvas.Mode = MainWndInfo.CanvasMode;	Canvas.PaintDone = 0;	GDI_UNLOCK(); // gdi_lock	CanvasReset();	CanvasOK = 1;}