Click here to Skip to main content
15,896,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to backup database non remote computer? Pin
venadder12-Nov-04 5:37
venadder12-Nov-04 5:37 
GeneralRe: how to backup database non remote computer? Pin
John M. Drescher12-Nov-04 5:55
John M. Drescher12-Nov-04 5:55 
GeneralRe: how to backup database non remote computer? Pin
venadder12-Nov-04 6:24
venadder12-Nov-04 6:24 
GeneralRe: how to backup database non remote computer? Pin
John M. Drescher12-Nov-04 6:46
John M. Drescher12-Nov-04 6:46 
GeneralRe: how to backup database non remote computer? Pin
venadder12-Nov-04 7:03
venadder12-Nov-04 7:03 
GeneralRe: how to backup database non remote computer? Pin
John M. Drescher12-Nov-04 7:09
John M. Drescher12-Nov-04 7:09 
QuestionHow To Create Sys Env Var Programmatically? Pin
Spoodles12-Nov-04 4:58
Spoodles12-Nov-04 4:58 
Generalcrashes when I pass data from dialog to View, Need help! Pin
Ibana12-Nov-04 4:55
Ibana12-Nov-04 4:55 
:(Hi there!

I have MFC app (doc/view). In that app I have a dialog with a combobox from which I want to transfer a selected item back to the main View Class where I have a VTK(Visualization toolkit) window. basically Selecting an item in the combobox should affect the object that Im displaying in my main View

when I execute my application and select the "Dialog" and select a string in the combobox it crashes and points at the member in the View class that I want to change.
Below is the code where I change a variable in the View method SetScalars.

I was wondering if it had to do with that my dialog is modal so that it cant overwrite my view class members , because that seems to be the problem.
John, that line "alot of functions and members.... " are just VTK (vizualization toolkit) stuff.


[CODE]
void CStressesDialog::OnDropDownSelchange()
{

int idx = m_DropDown.GetCurSel();
if( idx < 0 ) return;
CWnd* pParent = GetParent();
CVtkSDIView* pView = (CVtkSDIView*)pParent;
pView = (CVtkSDIView*)pParent;
CString str;
m_DropDown.GetLBText( idx,str );
pView->SetScalars(str);

}

[/CODE]


This is what causes the crash somehow this->str_select = s; where str_select is an Cstring.

[CODE]

void CVtkSDIView::SetScalars(CString s)
{
this->str_select = s;

//VTK STUFF IN THIS FUNCTION..

this->filereader->SetScalarsName(str_select);
this->filereader->Update();
this->lut->SetTableRange(this->filereader->GetOutput()->GetScalarRange());
this->lut->Build();
this->band->GenerateValues(15,this->filereader->GetOutput()->GetScalarRange());
this->band->Update();
this->pMapper->SetScalarRange(this->filereader->GetOutput()->GetScalarRange());
this->pMapper->Update();
this->renWin->Render();
this->iren->Start();

}

[/CODE]



Thanks for your help!

/regards

peter
Generalunreferenced local variable Pin
yellowtulips12-Nov-04 4:30
yellowtulips12-Nov-04 4:30 
GeneralRe: unreferenced local variable Pin
Manfred Staiger12-Nov-04 4:44
Manfred Staiger12-Nov-04 4:44 
GeneralRe: unreferenced local variable Pin
Michael Dunn12-Nov-04 7:03
sitebuilderMichael Dunn12-Nov-04 7:03 
GeneralMDI Application Pin
Jnewg512-Nov-04 4:16
Jnewg512-Nov-04 4:16 
Generala step by step running Pin
goldmount12-Nov-04 3:58
goldmount12-Nov-04 3:58 
GeneralRe: a step by step running Pin
David Crow12-Nov-04 3:59
David Crow12-Nov-04 3:59 
Questionhow do u change the color of the frameof a picture control in a dialog??? Pin
namaskaaram12-Nov-04 3:03
namaskaaram12-Nov-04 3:03 
GeneralRemoving combo box from filedialog Pin
vilmer12-Nov-04 0:01
vilmer12-Nov-04 0:01 
GeneralRe: Removing combo box from filedialog Pin
David Crow12-Nov-04 3:29
David Crow12-Nov-04 3:29 
QuestionIntelliSense Gone !?!? Pin
Anonymous11-Nov-04 23:51
Anonymous11-Nov-04 23:51 
QuestionHow can several panels of a CTabCtrl share the same CComboBox ? Pin
Member 124237311-Nov-04 23:44
Member 124237311-Nov-04 23:44 
AnswerRe: How can several panels of a CTabCtrl share the same CComboBox ? Pin
BlackDice12-Nov-04 2:43
BlackDice12-Nov-04 2:43 
GeneralRe: How can several panels of a CTabCtrl share the same CComboBox ? Pin
Member 124237313-Nov-04 5:12
Member 124237313-Nov-04 5:12 
AnswerRe: How can several panels of a CTabCtrl share the same CComboBox ? Pin
David Crow12-Nov-04 3:33
David Crow12-Nov-04 3:33 
GeneralRe: How can several panels of a CTabCtrl share the same CComboBox ? Pin
Member 124237313-Nov-04 5:32
Member 124237313-Nov-04 5:32 
GeneralRe: How can several panels of a CTabCtrl share the same CComboBox ? Pin
David Crow13-Nov-04 5:52
David Crow13-Nov-04 5:52 
GeneralRe: How can several panels of a CTabCtrl share the same CComboBox ? Pin
Member 124237314-Nov-04 11:23
Member 124237314-Nov-04 11:23 

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.