Click here to Skip to main content
15,920,828 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalerror! repeatedly calling the same MFC dialog box in vc++ Pin
shiva shankar10-Jun-04 20:59
shiva shankar10-Jun-04 20:59 
GeneralRe: error! repeatedly calling the same MFC dialog box in vc++ Pin
Johan Rosengren10-Jun-04 21:13
Johan Rosengren10-Jun-04 21:13 
GeneralRe: error! repeatedly calling the same MFC dialog box in vc++ Pin
shiva shankar10-Jun-04 22:00
shiva shankar10-Jun-04 22:00 
GeneralRe: error! repeatedly calling the same MFC dialog box in vc++ Pin
Johan Rosengren10-Jun-04 22:19
Johan Rosengren10-Jun-04 22:19 
Questionhow to set font size to a particular item in Listcontrol box Pin
Member 101812810-Jun-04 20:51
Member 101812810-Jun-04 20:51 
AnswerRe: how to set font size to a particular item in Listcontrol box Pin
Johan Rosengren10-Jun-04 21:17
Johan Rosengren10-Jun-04 21:17 
Questionhow to access form controls in another view Pin
elephantstar10-Jun-04 20:36
elephantstar10-Jun-04 20:36 
AnswerRe: how to access form controls in another view Pin
Johan Rosengren10-Jun-04 21:09
Johan Rosengren10-Jun-04 21:09 
makeVisible will try to find a child-control of CCheckList with the id IDC_CHECKMARK. Furthermore, you are creating an instance of CChecklist out of the blue - this instance has nothing to do with your other view/control.

You should not try to access controls between views, this makes it impossible to move one view to another application, and is considered Real Bad Programming. If you have two views, I assume that you have a single document holding both of them? In that case, the proper way to go about this is via the CDocument update-mechanism. You do this by calling CDocument::OnUpdateAllViews when you want to change stuff across view-boundaries, in (pseudo)code:

void CFirstView::SomeFunction()
{
  // some code making it necessary to change some control
  // in another view...

  CSomeDoc* pDoc = GetDocument();
  pDoc->UpdateAllViews( this, HINT_SOME_VALUE_YOU_DEFINE );

}


and in the recipient view, you add an update handler, so:

void CSecondView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) 
{
  if( lHint == HINT_SOME_VALUE_YOU_DEFINE )
  {
    // Do your stuff
  }
}


You should also get a basic textbook on C++, you'll have to learn the difference between a class and an instance of a class, for example. Lots of grief lies ahead if you don't know this Smile | :)
GeneralRe: how to access form controls in another view Pin
elephantstar11-Jun-04 12:49
elephantstar11-Jun-04 12:49 
GeneralRe: how to access form controls in another view Pin
Johan Rosengren14-Jun-04 8:56
Johan Rosengren14-Jun-04 8:56 
GeneralRe: how to access form controls in another view Pin
elephantstar14-Jun-04 13:01
elephantstar14-Jun-04 13:01 
GeneralRe: how to access form controls in another view Pin
Johan Rosengren14-Jun-04 20:23
Johan Rosengren14-Jun-04 20:23 
AnswerRe: how to access form controls in another view Pin
Cohen10-Jun-04 21:09
Cohen10-Jun-04 21:09 
GeneralCDialog1Dlg Class is not appeared in class view tab. Pin
Rajesh_K_Sharma10-Jun-04 19:04
Rajesh_K_Sharma10-Jun-04 19:04 
GeneralRe: CDialog1Dlg Class is not appeared in class view tab. Pin
*Dreamz10-Jun-04 19:15
*Dreamz10-Jun-04 19:15 
GeneralRe: CDialog1Dlg Class is not appeared in class view tab. Pin
ThatsAlok11-Jun-04 5:19
ThatsAlok11-Jun-04 5:19 
Generalsending a packet of data to a server Pin
Anonymous10-Jun-04 19:02
Anonymous10-Jun-04 19:02 
GeneralRe: sending a packet of data to a server Pin
bikram singh10-Jun-04 19:24
bikram singh10-Jun-04 19:24 
GeneralRe: sending a packet of data to a server Pin
Anonymous10-Jun-04 19:30
Anonymous10-Jun-04 19:30 
GeneralVC++ : Registry Pin
10-Jun-04 18:34
suss10-Jun-04 18:34 
GeneralRe: VC++ : Registry Pin
bikram singh10-Jun-04 18:52
bikram singh10-Jun-04 18:52 
GeneralRe: VC++ : Registry Pin
Member 102316912-Jun-04 16:10
Member 102316912-Jun-04 16:10 
GeneralJesus H Christ !!!!!! Pin
bikram singh13-Jun-04 1:20
bikram singh13-Jun-04 1:20 
QuestionHow to display images dynamically Pin
Neeranjan10-Jun-04 18:23
Neeranjan10-Jun-04 18:23 
AnswerRe: How to display images dynamically Pin
Johan Rosengren10-Jun-04 21:15
Johan Rosengren10-Jun-04 21:15 

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.