Click here to Skip to main content
15,912,069 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: GetProcAddress() question.... Pin
Mark Salsbery20-Feb-09 8:29
Mark Salsbery20-Feb-09 8:29 
GeneralRe: GetProcAddress() question.... Pin
led mike20-Feb-09 8:31
led mike20-Feb-09 8:31 
GeneralRe: GetProcAddress() question.... Pin
Mark Salsbery20-Feb-09 8:36
Mark Salsbery20-Feb-09 8:36 
GeneralRe: GetProcAddress() question.... Pin
led mike20-Feb-09 8:43
led mike20-Feb-09 8:43 
GeneralRe: GetProcAddress() question.... Pin
CPallini20-Feb-09 23:55
mveCPallini20-Feb-09 23:55 
GeneralRe: GetProcAddress() question.... Pin
Rajesh R Subramanian21-Feb-09 21:15
professionalRajesh R Subramanian21-Feb-09 21:15 
AnswerRe: GetProcAddress() question.... Pin
«_Superman_»20-Feb-09 15:47
professional«_Superman_»20-Feb-09 15:47 
QuestionSDI ,Terrible. Pin
grassrootkit20-Feb-09 3:29
grassrootkit20-Feb-09 3:29 
I think I'll end up my entire life trying to make a nodepad application. The wizard generated code & functionalities are totally misleading. wtf :Mad | :mad: Today should be my last attempt for this doc/view bullshit. Somebody please help.

Let me explain what are the things I've done.
1. Created a new SDI application.
2. Derived the view from CEditView. Found & replaced all CView with CEditView.
3. In the document class, added a CString member m_csText also a getter method to get this string.
4. Modified CMyDocument::Serialize() as ,
void CSDITest4Doc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		ar.Write(m_csText,m_csText.GetLength());
		//AfxMessageBox(L"\nHi writing");
		// TODO: add storing code here
	}
	else
	{
          ar.Read(...read into m_csText...);
	  AfxMessageBox(m_csText);
	  UpdateAllViews(0);
        }
}


5. In the View, added this code for OnUpdate:
void CSDITest4View::OnUpdate(CEditView* /*pSender*/, LPARAM /*lHint*/, CObject* /*pHint*/)
{
	CSDITest4Doc* pDoc = this->GetDocument();
	CString cs = pDoc->getText();
	CEdit& cText = GetEditCtrl();
	cText.SetWindowTextW(cs);

}


As I read in every damn place, they say to "make use" of the standard code, without overriding anything or any modification on save file, open file etc.

Now my questions.
1. Why it doesn't show the string in the Edit window?The OnUpdate in view doesn't get called.
2. Why the next time I try to open the same file, it doesn't get into the ::Serialize read function? If I open some other document, it goes there. Otherwise, I need to close the app and open again. Why so?
3. Why it doesn't save anything?
4. From where the ::Serialize function is actually getting called? I want to see the internal MFC code.
5. If I want to debug, set through a "Open file" operation, what should I do? After it shows the File open dialog, it doesn't stop anywhere.
AnswerRe: SDI ,Terrible. Pin
Iain Clarke, Warrior Programmer20-Feb-09 3:49
Iain Clarke, Warrior Programmer20-Feb-09 3:49 
GeneralRe: SDI ,Terrible. Pin
grassrootkit20-Feb-09 4:43
grassrootkit20-Feb-09 4:43 
AnswerRe: SDI ,Terrible. Pin
led mike20-Feb-09 4:22
led mike20-Feb-09 4:22 
GeneralRe: SDI ,Terrible. Pin
grassrootkit20-Feb-09 4:41
grassrootkit20-Feb-09 4:41 
GeneralRe: SDI ,Terrible. Pin
David Crow20-Feb-09 5:13
David Crow20-Feb-09 5:13 
GeneralRe: SDI ,Terrible. Pin
led mike20-Feb-09 5:46
led mike20-Feb-09 5:46 
GeneralRe: SDI ,Terrible. Pin
grassrootkit20-Feb-09 18:52
grassrootkit20-Feb-09 18:52 
QuestionRe: SDI ,Terrible. Pin
David Crow20-Feb-09 5:13
David Crow20-Feb-09 5:13 
AnswerRe: SDI ,Terrible. Pin
grassrootkit20-Feb-09 5:26
grassrootkit20-Feb-09 5:26 
AnswerRe: SDI ,Terrible. Pin
grassrootkit20-Feb-09 5:28
grassrootkit20-Feb-09 5:28 
GeneralRe: SDI ,Terrible. Pin
David Crow20-Feb-09 5:33
David Crow20-Feb-09 5:33 
GeneralRe: SDI ,Terrible. Pin
grassrootkit20-Feb-09 18:47
grassrootkit20-Feb-09 18:47 
GeneralRe: SDI ,Terrible. Pin
grassrootkit20-Feb-09 19:03
grassrootkit20-Feb-09 19:03 
GeneralRe: SDI ,Terrible. Pin
David Crow21-Feb-09 14:04
David Crow21-Feb-09 14:04 
QuestionC CODE HELP!!! Pin
lincoding20-Feb-09 3:23
lincoding20-Feb-09 3:23 
AnswerRe: C CODE HELP!!! (PROPERLY FORMATTED!!!!!) Pin
Iain Clarke, Warrior Programmer20-Feb-09 4:00
Iain Clarke, Warrior Programmer20-Feb-09 4:00 
GeneralRe: C CODE HELP!!! (PROPERLY FORMATTED!!!!!) Pin
lincoding20-Feb-09 4:51
lincoding20-Feb-09 4:51 

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.