HTMLWindowEvents::onresize Event

Fires when the size of the object is about to change.

Syntax

void onresize(      VOID);

Return Value

No return value.

Event DISPID

DISPID_HTMLWINDOWEVENTS_ONRESIZE

The DISPID for this event is defined in mshtmdid.h. Use this value to identify the event handler when implementing IDispatch::Invoke.

Event Information

BubblesNo
CancelsNo
To invoke Change the height or width of the object.
Default action No default action.

Event Object Properties

The IHTMLEventObj interface contains additional information about the current event. When the onresize event is fired, you can use the IHTMLWindow2::event property to retrieve an IHTMLEventObj interface. To obtain an alternate interface pointer such as IHTMLEventObj2 or IHTMLEventObj3, call QueryInterface on the object.

Available Properties

IHTMLEventObj::altKey Retrieves a value that indicates the state of the ALT key.
IHTMLEventObj2::altKey Retrieves a value that indicates the state of the ALT key.
IHTMLEventObj3::altLeft Retrieves a value that indicates the state of the left ALT key.
IHTMLEventObj::clientX Retrieves the x-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
IHTMLEventObj2::clientX Sets or retrieves the x-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
IHTMLEventObj::clientY Retrieves the y-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
IHTMLEventObj2::clientY Sets or retrieves the y-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
IHTMLEventObj::ctrlKey Retrieves the state of the CTRL key.
IHTMLEventObj2::ctrlKey Sets or retrieves the state of the CTRL key.
IHTMLEventObj3::ctrlLeft Sets or retrieves the state of the left CTRL key.
IHTMLEventObj::offsetX Retrieves the x-coordinate of the mouse pointer's position relative to the object firing the event.
IHTMLEventObj2::offsetX Sets or retrieves the x-coordinate of the mouse pointer's position relative to the object firing the event.
IHTMLEventObj::offsetY Retrieves the y-coordinate of the mouse pointer's position relative to the object firing the event.
IHTMLEventObj2::offsetY Sets or retrieves the y-coordinate of the mouse pointer's position relative to the object firing the event.
IHTMLEventObj::returnValue Sets or retrieves the return value from the event.
IHTMLEventObj::screenX Retrieves the x-coordinate of the mouse pointer's position relative to the user's screen.
IHTMLEventObj2::screenX Sets or retrieves the x-coordinate of the mouse pointer's position relative to the user's screen.
IHTMLEventObj::screenY Retrieves the y-coordinate of the mouse pointer's position relative to the user's screen.
IHTMLEventObj2::screenY Sets or retrieves the y-coordinate of the mouse pointer's position relative to the user's screen.
IHTMLEventObj::shiftKey Retrieves the state of the SHIFT key.
IHTMLEventObj2::shiftKey Retrieves the state of the SHIFT key.
IHTMLEventObj3::shiftLeft Retrieves the state of the left SHIFT key.
IHTMLEventObj::srcElement Retrieves the object that fired the event.
IHTMLEventObj2::srcElement Sets or retrieves the object that fired the event.
IHTMLEventObj::type Retrieves the event name from the event object.
IHTMLEventObj2::type Sets or retrieves the event name from the event object.
IHTMLEventObj::x Retrieves the x-coordinate (in pixels) of the mouse pointer's offset from the closest relatively positioned parent element of the element that fired the event.
IHTMLEventObj2::x Sets or retrieves the x-coordinate (in pixels) of the mouse pointer's offset from the closest relatively positioned parent element of the element that fired the event.
IHTMLEventObj::y Retrieves the y-coordinate (in pixels) of the mouse pointer's offset from the closest relatively positioned parent element of the element that fired the event.
IHTMLEventObj2::y Sets or retrieves the y-coordinate (in pixels) of the mouse pointer's offset from the closest relatively positioned parent element of the element that fired the event.

Remarks

The HTMLWindowEvents::onresize event fires for block and inline objects with layout, even if document or CSS (cascading style sheets) property values are changed. Objects have layout when measurements such as the height and width attributes are set, or when the position of the object is set. Intrinsic objects, such as button, and windowed objects, such as window and iframe, fire as expected. This event does not fire for files with embedded controls.

Resizing HTML applications also fires the HTMLWindowEvents::onresize event.

Tags :


Page view tracker