Fix for sample in plugins r=peterl sr=attinasi patch by kens@activestate.com bug 77234

git-svn-id: svn://10.0.0.236/trunk@95091 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterlubczynski%netscape.com
2001-05-16 02:27:18 +00:00
parent 71658277df
commit a0cabe4f1a
2 changed files with 14 additions and 6 deletions

View File

@@ -1148,9 +1148,13 @@ SimplePluginInstance::PluginWindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPAR
if(paintStruct.fErase)
FillRect(hdc, &paintStruct.rcPaint,
(HBRUSH) GetStockObject(WHITE_BRUSH));
if(inst->fText)
TextOut(hdc, 0, 0, inst->fText, strlen(inst->fText));
if(inst->fText) {
RECT rcWnd;
GetWindowRect(hWnd, &rcWnd);
SetTextAlign(hdc, TA_CENTER);
TextOut(hdc, (rcWnd.right-rcWnd.left)/2, (rcWnd.bottom-rcWnd.top)/2, inst->fText, strlen(inst->fText));
}
EndPaint( hWnd, &paintStruct );
break;

View File

@@ -1148,9 +1148,13 @@ SimplePluginInstance::PluginWindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPAR
if(paintStruct.fErase)
FillRect(hdc, &paintStruct.rcPaint,
(HBRUSH) GetStockObject(WHITE_BRUSH));
if(inst->fText)
TextOut(hdc, 0, 0, inst->fText, strlen(inst->fText));
if(inst->fText) {
RECT rcWnd;
GetWindowRect(hWnd, &rcWnd);
SetTextAlign(hdc, TA_CENTER);
TextOut(hdc, (rcWnd.right-rcWnd.left)/2, (rcWnd.bottom-rcWnd.top)/2, inst->fText, strlen(inst->fText));
}
EndPaint( hWnd, &paintStruct );
break;