There's a function of the Joystick class called "GetTrigger".
So, the code that you would want to use would be something like the following, where m_Stick is the name of the Joystick object that you want to check.
Code:
if (m_Stick->GetTrigger()) {
...
}
I hope this helps.