 |
|
 |
When I use nonmodal window and try to get out, the application crash down ...
|
|
|
|
 |
|
 |
Hi,
nice class. Very handy.
I have some pages that would require H and V scrollbars. How can I add this capability? Thanks
Mat
|
|
|
|
 |
|
 |
Could someone send it to me? Think you!! mail:361136998@qq.com
|
|
|
|
 |
|
 |
Any pointers as to how to include a CDialog derived class?
|
|
|
|
 |
|
 |
In this code, it supports to attach any CWnd on CSettingsDialog.
But I need to attach CFormView on MDI child Frame. Please help me.
Nhiem
|
|
|
|
 |
|
 |
where is the newest source?
could someone send it to me?
|
|
|
|
 |
|
 |
Hi!
How to access variable members of the pages after the user clicks OK?
It seems that when the user clicks OK, all the pages are destroyed, so the following code crashes:
CSettingsDialog dlg;
int nRet;
dlg.AddPage(NULL, _T("General"), 0);
CMyPage1* pPage1=(CMyPage1*) dlg.AddPage(RUNTIME_CLASS(CMyPage1), _T("Page 1"), IDD_MYPAGE1, _T("Page 1");
nRet = dlg.DoModal();
if (nRet==IDOK)
{
AfxMessageBox pPage1->MyVar);
}
Does anyone can help me?
Thks in advance!
Appstmd
http://www.appstmd.com
|
|
|
|
 |
|
 |
Hi Appstmd,
I have the same problem. You are right! After you klick OK Button all pages are destroyed!!! I don't know why the author of this bad class don't answer your question. I think you must go into the code solve this problem yourself.
Because this behavior the class isn't usable. In other respects is a nice work.
Regards,
Axel
|
|
|
|
 |
|
 |
Hi!
Yes, indeed you must go into the code and make sure that after clicking OK or Cancel the pages won't be destroyed.
This behaviour should be added in the destructor of the class, not when you hit OK or Cancel.
Best regards,
Christian.
I am in love with VC++
|
|
|
|
 |
|
 |
There are a a lot of memory leaks - it looks like the dialogs are not being deleted properly. I am using multiple instances of the same dialog, and using dialogs instead of property pages - does this affect it?
|
|
|
|
 |
|
 |
the following code dose work in my project,please try it
BOOL CSettingsDialog::DestroyPages() { for (int i=0; i<m_pInfo.GetSize(); i++) { PAGE_INFO *pInfo = (PAGE_INFO *)m_pInfo.GetAt(i); if (pInfo && pInfo->pWnd) { if (::IsWindow(pInfo->pWnd->m_hWnd)) { pInfo->pWnd->DestroyWindow(); if (!(pInfo->bViewClass)) { delete(pInfo->pWnd); pInfo->pWnd=NULL; } } else { delete(pInfo->pWnd); pInfo->pWnd=NULL; } } delete pInfo;//delete pInfo=NULL; } m_pInfo.RemoveAll(); return(true); }
|
|
|
|
 |
|
 |
Hi everybody, here is a small fix to be sure that
once the parent dialog is create, the DDX mecanism
and standard behavior of CPropertyPage and CPropertyPageEx
is called
void CSettingsDialog::ShowPage(const PAGE_INFO *pInfo, UINT nShow /* = SW_SHOW */)
.............
if( pInfo->pWnd->IsKindOf( RUNTIME_CLASS(CView) ) )
((CView*)pInfo->pWnd)->OnInitialUpdate();
else
{
((CPropertyPageEx*)pInfo->pWnd)->OnSetActive();
}
}
same when closing
Programming is not an end in itself but only a means to an end
|
|
|
|
 |
|
 |
I saw on the homepage that there is a version 1.3.
But the links on the homepage don't work. Does anyone have the
code for 1.3??
Maybe someone could email it to me?
Thanks
|
|
|
|
 |
|
 |
has someone send you teh newest source?
|
|
|
|
 |
|
 |
As the links for new versions are broken, I used current version posted in this page. I have detected that memory leaks are generated because of some problems freeing memory.
To avoid it, this is the code for DestroyPages() method:
BOOL CSettingsDialog::DestroyPages()
{
for (int i=0; ipWnd)
{
if (::IsWindow(pInfo->pWnd->m_hWnd))
pInfo->pWnd->DestroyWindow(); // Destroy the windows
if (!(pInfo->bViewClass))
{
delete(pInfo->pWnd); // Delete the C++ object
pInfo->pWnd = NULL;
}
}
}
return(true);
}
And when the window is modeless, you have to override DestroyWindow with this code in it:
BOOL CSettingsDialog::DestroyWindow()
{
DestroyPages();
return CDialog::DestroyWindow();
}
Hope this helps
Regards,
Jaime
|
|
|
|
 |
|
 |
I checked your website and these links are broken:
http://yellowine.netfirms.com/SettingsDlg/SettingsDlg_src.zip
http://yellowine.netfirms.com/SettingsDlg/SettingsDlg_demo.zip
The files on codeproject seem to be v1.0
Please let me know.
Thanks.
|
|
|
|
 |
|
 |
Seems there is even a v1.3, but the website is pretty f***ed up: links and forum do not work.
Please, upload the new version.
|
|
|
|
 |
|
 |
Hi !
I tried to use CSettingsDlg class with Property Pages. It is displaying properly. But the problem is: the controls on dialog are not listening.
For example, On a dialog box, I have an Edit box and Radio Button. On cliking Apply button, UpdateData method of the dialog is not being called. In the same way, I am not able to catch the event BN_CLICKED in case of Radio Button.
In other words, I don't have any control over Controls.
Can anybody throw light over it.
Thanks,
Amit Manocha
|
|
|
|
 |
|
 |
I have used the class CHtmlView to make a web browser but when I run applet that use javax.swing, my web browser doesn't work, it doens't accept swing...
How to make my web browser accept swing ?
Thx a lot,
Sky
|
|
|
|
 |
|
 |
For goodness sake, it seems you've done a good job here, but then blown it by failing to post your updates to this site. The zip files on your free-hosted site do not download reliably, so we can't get at the corrected version of your software.
I know its good fun having your own little website, but you're using codeproject.com to get exposure for your coding effort, why not use it to distribute the software?
Yours,
An annoyed user who will now use someone else's options dialog for his super high profile commercial application that would have had your name in its credits!
|
|
|
|
 |
|
 |
I've got a copy of the March code. If you want it, message me.
|
|
|
|
 |
|
 |
Have you got version 1.3? I was not able to download it. Obviously in 1.3 there are some memory problems fixed...
I have a version of SettingsDlg.cpp/SettingsDlg.h with creation date 03/07/02 and i'm getting some memory leaks.
If you have got a newer version please mail it to me.
thanks in advance...
Michael
|
|
|
|
 |
|
 |
Because the project use the message:WM_SETTEXT,There is compile error in Visual Studio.Net.
|
|
|
|
 |
|
 |
Change the return type of CPrefsStatic::OnSetText from BOOL to LRESULT, then it will compile in VC7.
|
|
|
|
 |
|
 |
what's wrong with ur web site?
|
|
|
|
 |