the grossed up dividend gets added to your other taxbale income. total tax bill is worked out, then franking credits minused off there. any left over franking credits will come to you as a refund from the ATO.
with respect to the capital return, it will come off your cost base and you need never pay any tax on that money if you do not sell the shares....