I was wondering how I can get the graphics card model/brand from code particularly from DirectX 9.0c (from within C++ code).
The easiest way in DirectX is through IDirect3D9::GetAdapterIdentifier.
Just create a D3DADAPTER_IDENTIFIER9 object, pass a pointer to it to GetAdapterIdentifier. DirectX fills out the graphics card description as a string in the Description field. It also includes information on which display device the card is, and what driver version you have.
You get something like this: