How can I set the on Mouse Over event to a button and a graphic

I wish to know how can i play a wave file when the mouse over a button and over a picture by using DirectInput. Actualy I think I know how to acquire a sound file, but my problem is don't know how to create on mouse over event. Wish anyone can help me. Sorry i'm only a beginner.

Thanks

[304 byte] By [kenneth1983] at [2007-12-23]
# 1
Look at the CustomUI sample in the DirectX Sample Browser.
DavidWeller-MSFT at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 2

Yep... I was read that example. When the mouse pointing to the button, the button will be light up, but i think that is prefix function on the addButton, because I couldn't find any code related to that event. The only think i saw is they set an OnGuiEvent CAllback before adding the button, and the event is onclick event, when you click the button, the code will do the task, something like the code below.

switch( nControlID )

{

case IDC_TOGGLEFULLSCREEN: DXUTToggleFullScreen(); break;

case IDC_TOGGLEREF: DXUTToggleREF(); break;

case IDC_CHANGEDEVICE: DXUTSetShowSettingsDialog( !DXUTGetShowSettingsDialog() ); break;

}

kenneth1983 at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...