I was not able to find where to place those lines. But, I found a working solution, it is probably not the best but it works :
I changed the OnBackButtonPressed function to call the keyBackClicked function of the current scene (CCLayer child of CCScene). Since I only use single layer in my scene, it works for me. But I think you can make it work even if you have multiple layers.
void CCFrameworkView::OnBackButtonPressed(Object\^ sender, BackPressedEventArgs\^ args)
/* CCLog(“Came into OnBackButtonPressed”);
char buf ;
// bool ff = CCApplication::sharedApplication.onBackButton;
// args~~>Handled = ff;
} else args~~>Handled=true;