Shaw himself ran for the CCF in the 1945 Canadian federal election and 1949 Canadian federal election federal elections and in a federal byelection in 1948 , and for the NDP in the 1974 Canadian federal election federal election , but was never elected to the House of Commons of Canada .