How do I set the column widths based on the size of my strings?

You can call

m_pGrid->SetColWidth(nCol, nCol, m_pGrid->Width_LPtoDP(nChars * GX_NXAVGWIDTH));

whereas nChars is the number of characters in the string GX_NXAVGWIDTH is the average width of a character.

Another possibility is to override GetColWidth().  See gridapp\browsevw.cpp for an example.