Click here to Skip to main content
15,917,321 members

Comments by Shiva S.S (Top 17 by date)

Shiva S.S 2-May-11 0:16am View    
Thanks Niklas,

You are absolutely right, i have to use binary mode for both reading and writing.

For this i need to add a single line before fopen_s().

_set_fmode(_O_BINARY);

After this it works very fine.Once again thank everyone helped me in this.
Shiva S.S 30-Apr-11 4:35am View    
Deleted
Thanks for your reply niklas,
Can you please suggest me, which mode will be better to hold this kind of binary data?
Shiva S.S 30-Apr-11 2:52am View    
Hi everyone,

After a bit struggle, finally i found where i went wrong.I thank everyone, who helped me in this,Special thanks to Olivier, who spent lot of time for me,i learned a lot from his answers.

Now i am able to access my controls in my Base dialog, from any of my derived class.

Problem was with this line,CBaseDialogLogicDlg objBaseDialog;

objBaseDialog.ChangeCheckStatus(2);

Here i am creating an object of my base class,and simply calling my base class member function, which updates the control.

I made two correctionsin my derived class.

1.Instead of a normal object, i've created a pointer object to my base class.

CBaseDialogLogicDlg *objBaseDialog;

2.Then i need to add the following lines in my derived class, before using my pointer object.

LPVOID lpParam;objBaseDialog = (CBaseDialogLogicDlg *)lpParam;

This lpParam is 'this' pointer of my CBaseDialogLogicDlg dialog class.

Now i can access any of my control of my base dialog from my derived class itself.

Hope i fixed the problem correctly.
Shiva S.S 11-Apr-11 9:50am View    
Thanks Olivier,
Here i am not calling OnInitDialog() anywhere in my code, but if i put a breakpoint in my derived OnInitDialog and see, control never comes inside, when will be this derived OnInitDialog get called?.
Shiva..
Shiva S.S 11-Apr-11 9:33am View    
Hi olivier,

Now i want to glarify one thing here, i tried this line in my derived OnInitDialog(),

return __super::OnInitDialog();
but it is giving assertion error(ASSERT(::IsWindow(m_hWnd))continuously, My doubt is , how this OnInitDialog() should be called, in my derived class?
Will it be called automatically like in CBaseDialog Class, or i should call?, I know that OnInitDialog will be called when 'DoModal' the dialog.
If i should 'DoModal', how it should be done, which will be the best place to do?. if this is clear, it will be much helpful for me. Please reply.
Shiva..