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

Initiates a drag operation, adding cards to the specified fragment.

Syntax:

HRESULT SetupFragment(
   ISolpackPile *pPileSrc,
   ISolpackCard *pCardSrc,
   ISolpackFragment *pFrag
);

Parameters:

pPileSrc
A pointer to the ISolpackPile interface of the pile from which the user is dragging.
pCardSrc
A pointer to the ISolpackCard interface of the specific card that the user wants to drag.
pFrag
A pointer to the ISolpackFragment interface of the fragment to hold cards to drag.

Return Value:

Returns S_OK if successful, or an error value otherwise.

Remarks:

This method is called to determine, based on where the user wants to drag, what cards are to be dragged. In some cases, the individual card the user selects should be the only one dragged; in other cases, cards must be dragged as a unit. Within this method, call the fragment's ISolpackFragment::AddToFragment method to add cards that are to be dragged.

If a card's ISolpackCard::CanDrag property is set to false, this method will not be called and no drag is possible.

  February 24, 2002 jmhoersc@mtu.edu