Using a Device Control Handle outside WM_PAINT
i've created a handle in within WM_PAINT message handler..
Code:
case WM_PAINT:
{
hdc=BeginPaint(hwnd, &pntS);
.............
.............
DisplayResults(hwnd, hdc, output, rsltFont);
EndPaint(hwnd, &pntS);
}
return 0;
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...
Q. Is it possible to use hdc somewhere else?