本文整理汇总了C++中SmartPtr::GetState方法的典型用法代码示例。如果您正苦于以下问题:C++ SmartPtr::GetState方法的具体用法?C++ SmartPtr::GetState怎么用?C++ SmartPtr::GetState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SmartPtr
的用法示例。
在下文中一共展示了SmartPtr::GetState方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PaintWindow
void PaintWindow(HWND hWnd)
{
bool bNeedPaint = false;
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hWnd, &ps);
if( g_mediaControl == NULL ) // we know that there is nothing loaded
{
bNeedPaint = true;
}
else
{
// If we have a movie loaded, we only need to repaint
// when the graph is stopped
OAFilterState state;
if( SUCCEEDED( g_mediaControl->GetState(0, & state ) ) )
{
bNeedPaint = ( state == State_Stopped );
}
}
if ( bNeedPaint )
{
RECT rc2;
GetClientRect(hWnd, &rc2);
FillRect(hdc, &rc2, (HBRUSH)(COLOR_WINDOW+1));
}
EndPaint( hWnd, &ps );
}
示例2: while
HRESULT
CloseGraph(HWND window)
{
if( g_mediaControl != NULL )
{
OAFilterState state;
do {
g_mediaControl->Stop();
g_mediaControl->GetState(0, & state );
} while( state != State_Stopped ) ;
}
g_allocator = NULL;
g_mediaControl = NULL;
g_filter = NULL;
g_graph = NULL;
::InvalidateRect( window, NULL, true );
return S_OK;
}