Click here to Skip to main content
16,008,183 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to put my toolbar visible by default? Pin
DillerXX5-Jul-08 7:20
DillerXX5-Jul-08 7:20 
QuestionError Code 87 Pin
Saksida Bojan5-Jul-08 6:35
Saksida Bojan5-Jul-08 6:35 
AnswerRe: Error Code 87 Pin
User 24844375-Jul-08 7:32
User 24844375-Jul-08 7:32 
AnswerRe: Error Code 87 Pin
Mark Salsbery5-Jul-08 9:04
Mark Salsbery5-Jul-08 9:04 
GeneralRe: Error Code 87 Pin
Saksida Bojan5-Jul-08 21:28
Saksida Bojan5-Jul-08 21:28 
Questioncompressing audio with g711 makes lots of noise Pin
doudou-shen5-Jul-08 6:09
doudou-shen5-Jul-08 6:09 
AnswerRe: compressing audio with g711 makes lots of noise Pin
Varghese Paul M7-Jul-08 0:01
Varghese Paul M7-Jul-08 0:01 
Question"The ultimate grid" - adding new rows to a grid Pin
Sternocera5-Jul-08 5:58
Sternocera5-Jul-08 5:58 
Hello,

I'm attempting to integrate "The ultimate grid" - http://www.codeproject.com/KB/MFC/UltimateGrid.aspx[^] into my MFC application. I currently have my application working with a trivial grid, by using the sample "MyCug" class, per the ultimate grid beginner's guide: http://www.codeproject.com/KB/MFC/UltimateGrid_Start.aspx[^].

By editing MyCug's OnSetup(), I can cause the grid's initial content to change by calling various methods:
void MyCug::OnSetup()
{
   ...
   // add row headings

   cell.SetBackColor(grey);
   cell.SetTextColor(black);
   
   cell.SetText("One row");
   SetCell(-1,0,&cell);
   cell.SetText("Two row");
   SetCell(-1,1,&cell);
   cell.SetText("Three row");
   SetCell(-1,2,&cell);
}


It is not obvious to me how I can change the content after the fact, without the unnecessary complexity of using a custom datasource - external calls to my object's SetCell() method from my CView don't have any apparent effect.

It would be acceptable to me to call MyCug's methods from my View, or to customise it and pass a container to it (something like an STL container) and have it do the work itself.

How can either of these things be done? What have I missed?

Regards,
Sternocera
AnswerRe: "The ultimate grid" - adding new rows to a grid Pin
followait5-Jul-08 14:49
followait5-Jul-08 14:49 
QuestionRe: "The ultimate grid" - adding new rows to a grid Pin
Sternocera6-Jul-08 0:05
Sternocera6-Jul-08 0:05 
AnswerRe: "The ultimate grid" - adding new rows to a grid Pin
followait6-Jul-08 2:04
followait6-Jul-08 2:04 
AnswerRe: "The ultimate grid" - adding new rows to a grid Pin
Graham Shanks6-Jul-08 10:44
Graham Shanks6-Jul-08 10:44 
QuestionHow could this be? Pin
followait5-Jul-08 4:16
followait5-Jul-08 4:16 
AnswerRe: How could this be? Pin
David Crow5-Jul-08 4:48
David Crow5-Jul-08 4:48 
Answerthe thread could be finished [modified] Pin
followait5-Jul-08 13:57
followait5-Jul-08 13:57 
QuestionLarge File problem Pin
Ubik K5-Jul-08 2:45
Ubik K5-Jul-08 2:45 
QuestionRe: Large File problem Pin
David Crow5-Jul-08 4:55
David Crow5-Jul-08 4:55 
AnswerRe: Large File problem Pin
Joe Woodbury5-Jul-08 11:24
professionalJoe Woodbury5-Jul-08 11:24 
GeneralRe: Large File problem Pin
Ubik K5-Jul-08 15:44
Ubik K5-Jul-08 15:44 
GeneralRe: Large File problem Pin
David Crow5-Jul-08 16:11
David Crow5-Jul-08 16:11 
GeneralRe: Large File problem Pin
Ubik K6-Jul-08 3:10
Ubik K6-Jul-08 3:10 
Questionmodeless child dialog would not close after its parent is destroy Pin
followait5-Jul-08 2:32
followait5-Jul-08 2:32 
AnswerRe: modeless child dialog would not close after its parent is destroy Pin
User 24844375-Jul-08 8:44
User 24844375-Jul-08 8:44 
GeneralRe: modeless child dialog would not close after its parent is destroy Pin
followait5-Jul-08 13:16
followait5-Jul-08 13:16 
GeneralRe: modeless child dialog would not close after its parent is destroy Pin
User 24844376-Jul-08 0:41
User 24844376-Jul-08 0:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.