Home
   Home  |  Preliminary Docs  |  Design Diagrams  |  Reference  |  Development Docs  |  Download  |  Source Code  |  Final Reports  |
ISolpackGame::DropFragment Method

If possible, drops the cards from the specified fragment onto the specified pile.

Syntax:

HRESULT DropFragment(
   ISolpackFragment *pFrag,
   ISolpackPile *pPileDest,
   VARIANT_BOOL *pbValid
);

Parameters:

pFrag
A pointer to the ISolpackFragment interface of the fragment containing the card(s) being dragged.
pPileDest
A pointer to the ISolpackPile interface of the pile onto which the user has dropped the fragment.
pbValid
The address of a VARIANT_BOOL variable that receives whether the cards were dropped.

Return Value:

Returns S_OK if successful, or an error value otherwise.

Remarks:

Examine the contents of the destination pile and the fragment to determine if the cards can be dropped on the pile. If so, use the fragment's ISolpackFragment::MoveToPile method to move the cards, and set *pbValid to VARIANT_TRUE. Otherwise, set *pbValid to VARIANT_FALSE.

When the user releases the mouse button, Solpack calls the DropFragment method with the pile that the mouse cursor is directly over, if any. If this drop is not valid, it will continue to call DropFragment for all other piles that any part of the fragment is positioned over, until the drop is valid or there are no more piles.

  February 24, 2002 jmhoersc@mtu.edu