本文整理汇总了C++中RefreshWindow函数的典型用法代码示例。如果您正苦于以下问题:C++ RefreshWindow函数的具体用法?C++ RefreshWindow怎么用?C++ RefreshWindow使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RefreshWindow函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: zwTZCMRPTD_RefreshSelComponents
zOPER_EXPORT zSHORT OPERATION
zwTZCMRPTD_RefreshSelComponents( zVIEW vSubtask )
{
zVIEW vTZCMLPLO;
zVIEW vTZCMRPTO;
zVIEW vCompList;
zVIEW vTZCMRPTO_New;
zCHAR szName[ 33 ];
zCHAR szERR_Msg[ 254 ];
SetNameForView( vSubtask,"TZCM_ChkInWindow", vSubtask, zLEVEL_TASK );
GetViewByName( &vTZCMRPTO, "TZCMRPTO", vSubtask, zLEVEL_TASK );
if ( SetCursorFirstSelectedEntity( vTZCMRPTO, "ReportLine",
"" ) < zCURSOR_SET )
{
zstrcpy( szERR_Msg, "No Component selected to Refresh." );
MessageSend( vSubtask, "CM00241", "Configuration Management",
szERR_Msg, zMSGQ_OBJECT_CONSTRAINT_WARNING, zBEEP );
return( 0 );
}
if ( zwTZCMLPLD_OptionRefreshFromRepo( vSubtask, &vTZCMLPLO,
szName, zRefreshUserDefined ) < 0 )
{
return( -1 );
}
GetViewByName( &vTZCMRPTO_New, "TZCMRPTO_New", vSubtask, zLEVEL_TASK );
// if component refreshed?
if ( CompareAttributeToInteger( vTZCMRPTO_New, "CPLR",
"ComponentRefreshed", 1 ) == 0 )
{
zstrcpy( szERR_Msg, "Project '" );
GetStringFromAttribute( &szERR_Msg[ zstrlen( szERR_Msg ) ], vTZCMLPLO,
"LPLR", "Name" );
zstrcat( szERR_Msg, "' has been successfully refreshed \nfrom CPLR '" );
zstrcat( szERR_Msg, szName );
zstrcat( szERR_Msg, "'." );
MessageSend( vSubtask, "CM00279", "Configuration Management",
szERR_Msg,
zMSGQ_OBJECT_CONSTRAINT_INFORMATION, zBEEP );
}
if ( GetViewByName( &vTZCMRPTO, "TZCMRPTO", vSubtask, zLEVEL_TASK ) > 0 )
DropObjectInstance( vTZCMRPTO );
// Build new Refresh List
if ( zwTZCMLPLD_RefreshUserDefined( vSubtask ) < 1 )
return( -1 );
RefreshWindow( vSubtask );
if ( GetViewByName( &vCompList, "CompList", vSubtask, zLEVEL_TASK ) >= 0 )
RefreshWindow( vCompList );
return( 0 );
} // zwTZCMRPTD_RefreshSelComponents
示例2: arc
// This function draws a circular arc, centered at (x,y) with the given radius.
// The arc travels from angle stangle to angle endangle. The angles are given
// in degrees in standard mathematical notation, with 0 degrees along the
// vector (1,0) and travelling counterclockwise.
// POSTCONDITION: The arccoords variable (arcinfo) for the current window
// is set with data resulting from this call.
// The current position is not modified.
//
void arc( int x, int y, int stangle, int endangle, int radius )
{
HDC hDC;
WindowData* pWndData = BGI__GetWindowDataPtr( );
// Convert coordinates to those expected by GDI Arc
int left, top, right, bottom;
int xstart, ystart, xend, yend;
// Convert center coordinates to box coordinates
CenterToBox( x, y, radius, radius, &left, &top, &right, &bottom );
// Convert given arc specifications to pixel start and end points.
ArcEndPoints( x, y, radius, radius, stangle, endangle, &xstart, &ystart, &xend, ¥d );
// Draw to the current active page
hDC = BGI__GetWinbgiDC( );
Arc( hDC, left, top, right, bottom, xstart, ystart, xend, yend );
BGI__ReleaseWinbgiDC( );
// The update rectangle does not contain the right or bottom edge. Thus
// add 1 so the entire region is included.
RECT rect = { left, top, right+1, bottom+1 };
RefreshWindow( &rect );
// Set the arccoords structure to relevant data.
pWndData->arcInfo.x = x;
pWndData->arcInfo.y = y;
pWndData->arcInfo.xstart = xstart;
pWndData->arcInfo.ystart = ystart;
pWndData->arcInfo.xend = xend;
pWndData->arcInfo.yend = yend;
}
示例3: bar
// This function draws a 2D bar.
//
void bar( int left, int top, int right, int bottom )
{
HDC hDC;
WindowData* pWndData = BGI__GetWindowDataPtr( );
HBRUSH hBrush;
int color;
hDC = BGI__GetWinbgiDC( );
// Is it okay to use the currently selected brush to paint with?
hBrush = (HBRUSH)GetCurrentObject( hDC, OBJ_BRUSH );
// Set the text color for the fill pattern
// Convert from BGI color to RGB color
color = converttorgb( pWndData->fillInfo.color );
SetTextColor( hDC, color );
RECT r = {left, top, right, bottom};
FillRect( hDC, &r, hBrush );
// Reset the text color to the drawing color
color = converttorgb( pWndData->drawColor );
SetTextColor( hDC, color );
BGI__ReleaseWinbgiDC( );
// The update rectangle does not contain the right or bottom edge. Thus
// add 1 so the entire region is included.
RECT rect = { left, top, right+1, bottom+1 };
RefreshWindow( &rect );
}
示例4: min
BOOL TextView::BackDelete()
{
ULONG selstart = min(m_nSelectionStart, m_nSelectionEnd);
ULONG selend = max(m_nSelectionStart, m_nSelectionEnd);
// if there's a selection then delete it
if(selstart != selend)
{
m_pTextDoc->erase_text(selstart, selend-selstart);
m_nCursorOffset = selstart;
m_pTextDoc->m_seq.breakopt();
}
// otherwise do a back-delete
else if(m_nCursorOffset > 0)
{
//m_nCursorOffset--;
ULONG oldpos = m_nCursorOffset;
MoveCharPrev();
//m_pTextDoc->erase_text(m_nCursorOffset, 1);
m_pTextDoc->erase_text(m_nCursorOffset, oldpos - m_nCursorOffset);
}
m_nSelectionStart = m_nCursorOffset;
m_nSelectionEnd = m_nCursorOffset;
ResetLineCache();
RefreshWindow();
Smeg(FALSE);
return TRUE;
}
示例5: RefreshWindow
void Manager::RefreshAll(void)
{
if (!m_windows.empty())
{
RefreshWindow(m_windows.front());
}
}
示例6: rectangle
// This function draws a rectangle border in the current line style, thickness, and color
//
void rectangle( int left, int top, int right, int bottom )
{
HDC hDC;
WindowData* pWndData = BGI__GetWindowDataPtr( );
POINT endpoints[5]; // Endpoints of the line
endpoints[0].x = left; // Upper left
endpoints[0].y = top;
endpoints[1].x = right; // Upper right
endpoints[1].y = top;
endpoints[2].x = right; // Lower right
endpoints[2].y = bottom;
endpoints[3].x = left; // Lower left
endpoints[3].y = bottom;
endpoints[4].x = left; // Upper left to complete rectangle
endpoints[4].y = top;
hDC = BGI__GetWinbgiDC( );
Polyline( hDC, endpoints, 5 );
BGI__ReleaseWinbgiDC( );
// The update rectangle does not contain the right or bottom edge. Thus
// add 1 so the entire region is included.
RECT rect = { left, top, right+1, bottom+1 };
RefreshWindow( &rect );
}
示例7: sector
// This function draws an elliptical pie slice centered at (x,y) with major
// and minor radii given by xradius and yradius. It is filled with the
// current fill pattern and color and outlined with the current line color.
// The pie slice travels from angle stangle to angle endangle. The angles are
// given in degrees in standard mathematical notation, with 0 degrees along
// the vector (1,0) and travelling counterclockwise.
//
void sector( int x, int y, int stangle, int endangle, int xradius, int yradius )
{
HDC hDC;
WindowData* pWndData = BGI__GetWindowDataPtr( );
// Convert coordinates to those expected by GDI Pie
int left, top, right, bottom;
int xstart, ystart, xend, yend;
int color;
// Convert center coordinates to box coordinates
CenterToBox( x, y, xradius, yradius, &left, &top, &right, &bottom );
// Convert given arc specifications to pixel start and end points.
ArcEndPoints( x, y, xradius, yradius, stangle, endangle, &xstart, &ystart, &xend, ¥d );
// Set the text color for the fill pattern
// Convert from BGI color to RGB color
color = converttorgb( pWndData->fillInfo.color );
hDC = BGI__GetWinbgiDC( );
SetTextColor( hDC, color );
Pie( hDC, left, top, right, bottom, xstart, ystart, xend, yend );
// Reset the text color to the drawing color
color = converttorgb( pWndData->drawColor );
SetTextColor( hDC, color );
BGI__ReleaseWinbgiDC( );
// The update rectangle does not contain the right or bottom edge. Thus
// add 1 so the entire region is included.
RECT rect = { left, top, right+1, bottom+1 };
RefreshWindow( &rect );
}
示例8: fillellipse
// This function draws and ellipse centered at (x,y) with major and minor axes
// xradius and yradius. It fills the ellipse with the current fill color and
// fill pattern.
//
void fillellipse( int x, int y, int xradius, int yradius )
{
HDC hDC;
WindowData* pWndData = BGI__GetWindowDataPtr( );
// Convert coordinates to those expected by GDI Ellipse
int left, top, right, bottom;
int color;
// Convert center coordinates to box coordinates
CenterToBox( x, y, xradius, yradius, &left, &top, &right, &bottom );
// Set the text color for the fill pattern
// Convert from BGI color to RGB color
hDC = BGI__GetWinbgiDC( );
color = converttorgb( pWndData->fillInfo.color );
SetTextColor( hDC, color );
Ellipse( hDC, left, top, right, bottom );
// Reset the text color to the drawing color
color = converttorgb( pWndData->drawColor );
SetTextColor( hDC, color );
BGI__ReleaseWinbgiDC( );
// The update rectangle does not contain the right or bottom edge. Thus
// add 1 so the entire region is included.
RECT rect = { left, top, right+1, bottom+1 };
RefreshWindow( &rect );
}
示例9: DisableEditing
void CUWPsWindow::CreateSubWindows(HWND hWnd)
{
cuwpTree.CreateThis(hWnd, 5, 5, 175, 100, false, CuwpTree);
checkUsed.CreateThis(hWnd, 185, 5, 100, 20, false, "Is Used", CheckUsed);
checkUsed.DisableThis();
healthPercent.CreateThis(hWnd, 190, 40, 65, 20, "Life (%): ", 0);
manaPercent.CreateThis(hWnd, 190, 65, 65, 20, "Mana (%): ", 0);
shieldPercent.CreateThis(hWnd, 190, 90, 65, 20, "Shield (%): ", 0);
resourceAmount.CreateThis(hWnd, 190, 115, 65, 20, "Resources: ", 0);
hangerAmount.CreateThis(hWnd, 190, 140, 65, 20, "Hanger: ", 0);
editHitpointPercent.CreateThis(hWnd, 260, 38, 80, 20, false, EditHitpoints);
editManaPercent.CreateThis(hWnd, 260, 63, 80, 20, false, EditMana);
editShieldPercent.CreateThis(hWnd, 260, 88, 80, 20, false, EditShields);
editResources.CreateThis(hWnd, 260, 113, 80, 20, false, EditResources);
editHanger.CreateThis(hWnd, 260, 138, 80, 20, false, EditHanger);
checkInvincible.CreateThis(hWnd, 190, 170, 100, 20, false, "Invincible", CheckInvincible);
checkBurrowed.CreateThis(hWnd, 190, 190, 100, 20, false, "Burrowed", CheckBurrowed);
checkLifted.CreateThis(hWnd, 190, 210, 100, 20, false, "Lifted", CheckLifted);
checkHallucinated.CreateThis(hWnd, 190, 230, 100, 20, false, "Hallucinated", CheckHallucinated);
checkCloaked.CreateThis(hWnd, 190, 250, 100, 20, false, "Cloaked", CheckCloaked);
DisableEditing();
RefreshWindow(true);
}
示例10: BOOKNODE
BOOKNODE * HexView::AddBookmark(BOOKMARK * bookm)
{
BOOKNODE * bnew = new BOOKNODE();//bookm);
BOOKNODE * bptr;
// find the best place to insert into
for(bptr = m_BookHead->next; bptr != m_BookTail; bptr = bptr->next)
{
if(bookm->offset < bptr->bookmark.offset)
{
break;
}
}
bnew->prev = bptr->prev;
bnew->next = bptr;
bptr->prev->next = bnew;
bptr->prev = bnew;
bnew->bookmark = *bookm;
bnew->bookmark.pszText = bookm->pszText ? _tcsdup(bookm->pszText) : 0;//TEXT("");
bnew->bookmark.pszTitle = bookm->pszTitle ? _tcsdup(bookm->pszTitle) : 0;//TEXT("");
RefreshWindow();
return (BOOKNODE *)bnew;
}
示例11: UpdateData
void CCompressionOptionsPage::OnGetTime()
{
if (!Enc_Info.b_selectrange)
{
UpdateData(TRUE);
Enc_Info.b_gettimefromvob = m_bGetTime;
if (m_bGetTime)
{
m_lFrames = Enc_Info.l_frames;
m_lSeconds = (long) (m_lFrames / Enc_Info.f_framerate);
}
m_hour = m_lSeconds / 3600;
m_min = (-m_hour * 3600 + m_lSeconds) / 60;
m_sec = (-m_hour * 3600 - m_min * 60 + m_lSeconds);
RefreshWindow();
if (Enc_Info.b_enter_filesize == 1)
{
Calc();
}
else
{
CalcFileSize();
}
}
}
示例12: RefreshWindow
void CMainDlg::OnMouseHookMouseMove(UINT nFlags, CPoint point)
{
// TODO : figure out while cursor is not changing
// Change cursor
::SetCursor(m_hSelectCursor);
// Check selecting flag
if(m_bSelecting)
{
// Get window under mouse
HWND hFound = ::WindowFromPoint(point);
if(m_hHilightWnd != hFound)
{
HWND hOld = m_hHilightWnd;
m_hHilightWnd = hFound;
// Undraw old
if((hOld) && (::IsWindow(hOld)))
RefreshWindow(hOld);
// Draw new
HighlightWindow(m_hHilightWnd);
}
}
// Check drawing flag
if(m_bDrawing)
{
// Draw
DrawFocusRect(point);
// Save current point
m_ptLast = point;
}
}
示例13: clearviewport
// This function clears the current viewport (with the background color) and
// moves the current point to (0,0 (relative to the viewport)
//
void clearviewport( )
{
HDC hDC;
WindowData* pWndData = BGI__GetWindowDataPtr( );
int color;
RECT rect;
HBRUSH hBrush;
// Convert from BGI color to RGB color
color = converttorgb( pWndData->bgColor );
rect.left = 0;
rect.top = 0;
rect.right = pWndData->viewportInfo.right - pWndData->viewportInfo.left;
rect.bottom = pWndData->viewportInfo.bottom - pWndData->viewportInfo.top;
// Fill hDC with background color
hDC = BGI__GetWinbgiDC( );
hBrush = CreateSolidBrush( color );
FillRect( hDC, &rect, hBrush );
DeleteObject( hBrush );
BGI__ReleaseWinbgiDC( );
moveto( 0, 0 );
RefreshWindow( NULL );
}
示例14: zwTZCMRPTD_RefreshAllComponents
zOPER_EXPORT zSHORT OPERATION
zwTZCMRPTD_RefreshAllComponents( zVIEW vSubtask )
{
zVIEW vTZCMLPLO;
zVIEW vTZCMRPTO;
zVIEW vCompList;
zCHAR szName[ 33 ];
zCHAR szERR_Msg[ 254 ];
if ( GetViewByName( &vTZCMRPTO, "TZCMRPTO", vSubtask, zLEVEL_TASK ) > 0 )
DropObjectInstance( vTZCMRPTO );
if ( zwTZCMLPLD_OptionRefreshFromRepo( vSubtask, &vTZCMLPLO,
szName, zRefreshLPLR ) < 0 )
{
return( -1 );
}
zstrcpy( szERR_Msg, "Project '" );
GetStringFromAttribute( &szERR_Msg[ zstrlen( szERR_Msg ) ], vTZCMLPLO,
"LPLR", "Name" );
zstrcat( szERR_Msg, "' has been successfully refreshed." );
MessageSend( vSubtask, "CM00279", "Configuration Management",
szERR_Msg,
zMSGQ_OBJECT_CONSTRAINT_INFORMATION, zBEEP );
if ( GetViewByName( &vCompList, "CompList", vSubtask, zLEVEL_TASK ) >= 0 )
RefreshWindow( vCompList );
return( 0 );
} // zwTZCMRPTD_RefreshAllComponents
示例15: switch
LRESULT TrigPlayersWindow::WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch ( msg )
{
case WM_SHOWWINDOW:
if ( wParam == FALSE )
OnLeave();
else if ( wParam == TRUE )
RefreshWindow(trigIndex);
return ClassWindow::WndProc(hWnd, msg, wParam, lParam);
break;
case WM_LBUTTONDOWN:
SetFocus(getHandle());
return ClassWindow::WndProc(hWnd, msg, wParam, lParam);
break;
case WM_CLOSE:
OnLeave();
return ClassWindow::WndProc(hWnd, msg, wParam, lParam);
break;
default:
return ClassWindow::WndProc(hWnd, msg, wParam, lParam);
}
return 0;
}