i've created a handle in within WM_PAINT message handler..
But now the function DisplayResults() need to be called somewhere else, say within WM_COMMAND: when a button is pressed... The problem is it needs the hdc created in WM_PAINT to be able to repaint the results after changes...Code:case WM_PAINT: { hdc=BeginPaint(hwnd, &pntS); ............. ............. DisplayResults(hwnd, hdc, output, rsltFont); EndPaint(hwnd, &pntS); } return 0;
Q. Is it possible to use hdc somewhere else?