Hi, In one of the screens, we are trying to create a Graph.
Just when the initialization is done, the whole screen goes Gray and gets blurred until I reset the unit.Initialization of the Graph widget in WM_INIT_DIALOG:
hItem = WM_GetDialogItem(pMsg->hWin, ID_GRAPH_0);
GRAPH_SetBorder(hItem, 40, 1, 1, 30);
hData = GRAPH_DATA_YT_Create(GUI_DARKGREEN, 500, 0, 0);
GRAPH_AttachData(hItem, hData);
GRAPH_SetGridDistY(hItem, 25);
GRAPH_SetGridVis(hItem, 1);
GRAPH_SetGridFixedX (hItem, 1);
hScaleV = GRAPH_SCALE_Create(35, GUI_TA_RIGHT, GRAPH_SCALE_CF_VERTICAL, 25);
#ifdef USE_FONTS
GRAPH_SCALE_SetFont(hScaleV, FONT_CALIB16);
#endif
GRAPH_AttachScale(hItem, hScaleV);
hScaleH = GRAPH_SCALE_Create(110, GUI_TA_HCENTER, GRAPH_SCALE_CF_HORIZONTAL, 50);
#ifdef USE_FONTS
GRAPH_SCALE_SetFont(hScaleH, FONT_CALIB16);
#endif
GRAPH_AttachScale(hItem, hScaleH);
GRAPH_SetColor(hItem, Custom_Color, GRAPH_CI_BORDER);
GRAPH_SetUserDraw(hItem, _UserDraw);
We are drawing a Rect on the screen and the graph is drawn in the rect.
Part of the GUI_PAINT looks something like this:
GUI_SetBkColor(Custom_Color);
GUI_SetColor(Custom_TextColor);
GUI_Clear();
GUI_DrawRect(0, 0, (FB_XSIZE-1), (FB_YSIZE-1));
GUI_DrawHLine(40, 0, FB_XSIZE);
GUI_DrawHLine(190, 0, FB_XSIZE);
To my surprise, if I comment out the GUI_SetBkColor() from the WM_PAINT event, the graph is displayed with properties set by me, but the rest of the screen is still Gray, but not blurred out.
Have anybody come across such a situation? What might have caused this?
Just when the initialization is done, the whole screen goes Gray and gets blurred until I reset the unit.Initialization of the Graph widget in WM_INIT_DIALOG:
hItem = WM_GetDialogItem(pMsg->hWin, ID_GRAPH_0);
GRAPH_SetBorder(hItem, 40, 1, 1, 30);
hData = GRAPH_DATA_YT_Create(GUI_DARKGREEN, 500, 0, 0);
GRAPH_AttachData(hItem, hData);
GRAPH_SetGridDistY(hItem, 25);
GRAPH_SetGridVis(hItem, 1);
GRAPH_SetGridFixedX (hItem, 1);
hScaleV = GRAPH_SCALE_Create(35, GUI_TA_RIGHT, GRAPH_SCALE_CF_VERTICAL, 25);
#ifdef USE_FONTS
GRAPH_SCALE_SetFont(hScaleV, FONT_CALIB16);
#endif
GRAPH_AttachScale(hItem, hScaleV);
hScaleH = GRAPH_SCALE_Create(110, GUI_TA_HCENTER, GRAPH_SCALE_CF_HORIZONTAL, 50);
#ifdef USE_FONTS
GRAPH_SCALE_SetFont(hScaleH, FONT_CALIB16);
#endif
GRAPH_AttachScale(hItem, hScaleH);
GRAPH_SetColor(hItem, Custom_Color, GRAPH_CI_BORDER);
GRAPH_SetUserDraw(hItem, _UserDraw);
We are drawing a Rect on the screen and the graph is drawn in the rect.
Part of the GUI_PAINT looks something like this:
GUI_SetBkColor(Custom_Color);
GUI_SetColor(Custom_TextColor);
GUI_Clear();
GUI_DrawRect(0, 0, (FB_XSIZE-1), (FB_YSIZE-1));
GUI_DrawHLine(40, 0, FB_XSIZE);
GUI_DrawHLine(190, 0, FB_XSIZE);
To my surprise, if I comment out the GUI_SetBkColor() from the WM_PAINT event, the graph is displayed with properties set by me, but the rest of the screen is still Gray, but not blurred out.
Have anybody come across such a situation? What might have caused this?