Actually your wrong, Max contracts are a % of the available cap space.
The maximum amount of money a player can sign for is contingent on the number of years that player has played and the total of the salary cap. The maximum salary of a player with 6 or fewer years of experience is either $9,000,000 or 25% of the total salary cap (2010–11: $14,511,000), whichever is greater. For a player with 7–9 years of experience, the maximum is $11,000,000 or 30% of the cap (2010–11: $17,413,200), and for a player with 10+ years of experience, the maximum is $14,000,000 or 35% of the cap (2010–2011: $20,315,400).[9]
http://en.wikipedia.org/wiki/NBA_salary_cap
http://www.nba.com/.element/mp3/2.0/sect/podcastmp3/PDF/CBA101.pdf
Dwight has only been in the league for 9 years so he will be getting 30% of the cap.