Skip to content

Latest commit

 

History

History
84 lines (49 loc) · 2.63 KB

cbasecontrolwindow-put-top.md

File metadata and controls

84 lines (49 loc) · 2.63 KB
description ms.assetid title ms.topic ms.date topic_type api_name api_type api_location ms.custom
The put\_Top method sets the top window coordinate.
cd39807f-363d-4b5b-8279-9dfb992dca10
CBaseControlWindow.put_Top method (Ctlutil.h)
reference
4/26/2023
APIRef
kbSyntax
CBaseControlWindow.put_Top
COM
Strmbase.lib
Strmbase.dll
Strmbasd.lib
Strmbasd.dll
UpdateFrequency5

CBaseControlWindow.put_Top method

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The put_Top method sets the top window coordinate.

Syntax

HRESULT put_Top(
   long Top
);

Parameters

Top

New top coordinate, in pixels.

Return value

Returns an HRESULT value.

Remarks

The window has a position on the desktop. This is expressed in pixels by four coordinates (left, top, right, and bottom). Interfaces that are automated by OLE typically express this position through left, top, width, and height; this is the convention used in DirectShow. All coordinates are expressed in pixels, and changing any coordinate will update the window immediately.

Setting the left or top coordinates moves the window left or up, respectively; these coordinates have no effect on the width and height of the window. Likewise, setting the width and height does not affect the left and top coordinates.

Requirements

Requirement Value
Header
Ctlutil.h (include Streams.h)
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CBaseControlWindow Class