I was wondering how I can get the graphics card model/brand from code particularly from DirectX 9.0c (from within C++ code).
Take a look at Chapter 2. Direct3D from my book The Direct3D Graphics Pipeline. See section 2.12, Identifying a Particular Device.