Spending on his wife and children is a man’s shar’i duty, but he will not be rewarded for it unless he seeks reward thereby.
It was narrated that Abu Mas’ood al-Badri (may Allah be pleased with him) said: The Prophet (peace and blessings of Allah be upon him) said: “If a Muslim spends on his family, seeking reward for that with Allah, then it will an act of charity on his part.” [Narrated by al-Bukhaari (55), Muslim (1002).]
The apparent meaning is that the reward for spending on them can only be attained by intending to draw closer to Allah, whether it is obligatory or permissible, and this implies that whoever does not intend to draw closer to Allah will not be rewarded, but he has discharged his duty in the case of obligatory spending. [Fath al-Baari (1/136)]
Ibn Hajar said:
It may be understood from this that the reward cannot be attained by doing the deed unless it is also accompanied by the intention.
spending on one’s family is obligatory, and he will be rewarded for what he gives according to his intention. There is no contradiction between its being obligatory and its being called charity, rather it is better than voluntary charity. [Fath al-Baari (9/498)]
Al-Nawawi (may Allah have mercy on him) said:
Seeking reward thereby means seeking the Countenance of Allah thereby. That does not include whatever he spends absent-mindedly (i.e., heedless of the intention and without intending to seek reward thereby). Rather this refers to the one who seeks reward. The way to seek reward is to spend it with the intention of fulfilling the duty of spending and kind treatment that has been enjoined upon him. [Sharh Muslim (7/88,89).]
It was narrated from Sa’d ibn Abi Waqqaas (may Allah be pleased with him) that the Messenger of Allah (peace and blessings of Allah be upon him) said: “You will never spend anything, seeking thereby the Countenance of Allah, but you will be rewarded for it, even what you put in your wife’s mouth.” [narrated by al-Bukhaari (56) and Muslim (1628).]
Ibn al-Haaj al-Maaliki (may Allah have mercy on him) said:
He should not neglect to give his wife a morsel or two, because the Prophet (peace and blessings of Allah be upon him) said: “even a morsel that he puts in his wife’s mouth.” He will earn reward even though there is some pleasure for him in putting a morsel in his wife’s mouth, but he should seek reward in all of that, i.e., in bringing the food and in giving it to her. [Al-Madkhal (1/224).]
Al-Haafiz Ibn Hajar (may Allah have mercy on him) said:
You will never spend anything, seeking thereby the reward of Allah, but you will be rewarded for it. The attainment of reward is dependent upon that, i.e., on seeking the Countenance of Allah. This is what matters. [Fath al-Baari (5/367)]
Source: Islam Q and A, Fatwa # 69960
[Note: Same is applicable for the mother, wife, daughter, son etc.]