static void drawkeys(void) { CMNVRAM *vram; vram = drawmng_surflock(kdwin.hdl); if (vram) { keydisp_paint(vram, TRUE); drawmng_surfunlock(kdwin.hdl); drawmng_blt(kdwin.hdl, NULL, NULL); } }
static void kddrawkeys(HWND hWnd, BOOL redraw) { RECT rect; RECT draw; CMNVRAM *vram; GetClientRect(hWnd, &rect); draw.left = 0; draw.top = 0; draw.right = min(KEYDISP_WIDTH, rect.right - rect.left); draw.bottom = min(KEYDISP_HEIGHT, rect.bottom - rect.top); if ((draw.right <= 0) || (draw.bottom <= 0)) { return; } vram = dd2_bsurflock(kdispwin.dd2hdl); if (vram) { keydisp_paint(vram, redraw); dd2_bsurfunlock(kdispwin.dd2hdl); dd2_blt(kdispwin.dd2hdl, NULL, &draw); } }