/********************************************************************* * * _cbWin * * Purpose: * Callback routine of window which draws the content of the memory device */ static void _cbWin(WM_MESSAGE * pMsg) { WM_HWIN hWin; int xPos, yPos, xSize, ySize; GUI_MEMDEV_Handle hMem; hWin = pMsg->hWin; switch (pMsg->MsgId) { case WM_PAINT: // // Get window position // xPos = WM_GetWindowOrgX(hWin); yPos = WM_GetWindowOrgY(hWin); xSize = WM_GetWindowSizeX(hWin); ySize = WM_GetWindowSizeY(hWin); // // Draw memory device // WINDOW_GetUserData(hWin, &hMem, sizeof(hMem)); GUI_MEMDEV_WriteAt(hMem, xPos, yPos); // // Draw surrounding frame // GUI_DrawRect(0, 0, xSize - 1, ySize - 1); break; } }
/********************************************************************* * * GUI_MEMDEV_Write */ void GUI_MEMDEV_Write(GUI_MEMDEV_Handle hMem) { GUI_MEMDEV_WriteAt(hMem, GUI_POS_AUTO, GUI_POS_AUTO); }