|
Reposting you question won't help. What is the problem with the things we suggested previously ?
|
|
|
|
|
Hi.
I've been using the crtdbg functions for a while to find memory leaks, and it works great when I use the following preprocessor statements.
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__ )
#define new DEBUG_NEW
#endif
As you'll know, this way the crtdbg functions show the correct file and line where the memory of the leak was reserved, using the "new" operator.
The problem is that, if I want to use the "new(std::nothrow)" in my programs, I need to include the "new" library, and that creates a conflict with the "new" redefinition, causing the "nothrow" to be an undeclared identifier. Of course, if I comment the #define new DEBUG_NEW macro, the program compiles and runs great, but all the leaks are referenced to crtdbg.h file.
Anyone has a solution for this?
Thanks in advance.
-- modified at 9:38 Tuesday 11th April, 2006
|
|
|
|
|
|
Create MFC project in the appwizard select SDI option.
Better get a good book on MFC and learn first before straightaway posting here.
Bye
Row
|
|
|
|
|
Well, MFC will generate for you the source code for a SDI application.
Could you be more specific in your post, please? I'm tring to help you.
|
|
|
|
|
Hello,
I am a CAD/CAM engg. i want to know that how the 2D and 3D geomtry made using MFC.
|
|
|
|
|
|
What do you want to know exactly ? Do you want to know how to render 2D and 3D objects with MFC ? This is not feasible directly (at least for the 3D rendering). You'll have to use some external library (like OpenGL or DirectX for example, or even existing ActiveX controls that can do the job for you).
|
|
|
|
|
Hi Cedric Moonen
very good
|
|
|
|
|
Hi you may find a complete FREE cad package here : http:\\www.opencascade.org
Regards
Jerome
|
|
|
|
|
hai to all
i would like to know how can we select a particular directory by using the CFileDialog . And display the selected directory in a static text or edit box.
|
|
|
|
|
BOOL CCreateDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_Enter_Location = "C:\\DS\\Index\\";
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
|
|
|
|
|
Hi parichaybp,
Can you be more specific
|
|
|
|
|
Have a look at SHBrowseForFolder() instead. It's specifically designed for allowing the user to choose folders rather than files. CFileDialog designed for choosing files, not folders.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi keerthikaaa,
maybe it is some helpful to you
CFileDialog m_dlg(1);
m_dlg.DoModal();
GetDlgItem(IDC_EDIT1)->SetWindowText(m_dlg.GetPathName());
-- modified at 2:35 Tuesday 11th April, 2006
BROWSEINFO bi;
TCHAR m_DisplayName[MAX_PATH];
m_DisplayName[0]='\0';
memset(&bi, 0x00, sizeof(bi));
bi.hwndOwner = this->m_hWnd;
bi.pszDisplayName = m_DisplayName;
bi.ulFlags = BIF_EDITBOX;
LPITEMIDLIST pidl = SHBrowseForFolder(&bi);
if (pidl)
SHGetPathFromIDList(pidl, m_DisplayName);
GetDlgItem(IDC_EDIT1)->SetWindowText(m_DisplayName);
|
|
|
|
|
hai whitesky
thanks for ur help
i got it
|
|
|
|
|
I recomend you to use Davide Calabro's CFileDialogST[^] - very good for folder selection!
|
|
|
|
|
hai to all
i have written the code like this for getting a directory selcted
and display the path of the selected directory.
i was able to select the directory but it is not opening the directory. And the path is not displayed in the edit box which i have specified.
here it is:
static char BASED_CODE szFilter[] = "Directory Files (*.dir) | *.dir ||";
//create the file open dialog
CFileDialog m_ldFile(TRUE, ".dir",m_sResults,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, szFilter);
//Show the file open dialog and capture result
if(m_ldFile.DoModal()==IDOK)
{
m_sResults=m_ldFile.GetFolderPath();
//Update the Dialog
UpdateData(FALSE);
}
so anyone of u help to get out of this.
|
|
|
|
|
keerthikaaa wrote: static char BASED_CODE szFilter[] = "Directory Files (*.dir) | *.dir ||"
Have you got a special file type that has a ".dir" extension? File-system directories don't end in ".dir" normally. By specifying this filter, you'll only allow files that end in ".dir" to be shown in the list control.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Is there any way to read the outlook pst files using VC++...Any API?
nave
|
|
|
|
|
|
Thanks in advance,
Sarvan AL
|
|
|
|
|
|
If you mean the close button in the title bar, there is no close button object.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Your question doesn't seem too clear.
But as I figure this out you want the close button on the dialog
So you can use the OnClose event and then do all the functioning over there
Vision is Always important and so is your ATTITUDE.
Wishes.
Anshuman Dandekar
-- modified at 2:36 Tuesday 11th April, 2006
|
|
|
|