|
Run the project (debug build) in the debugger. When the ASSERT fires select the option which breaks into the debugger then display the stack trace window. Copy the contents from this window and post it.
Steve
|
|
|
|
|
Thx's for help
Can you help me for this error.When i set the properties[code]Use Multi-Byte Character Set[/code] then i am geting error like this [code]mt.exe : general error c101008a: Failed to save the updated manifest to the file ".\Debug\HWDetect.exe.embed.manifest". The parameter is incorrect.[/code].
But when i set the proreties[code]Use Unicode Character Set[/code] then it is working fine. But i want to set MultiByte so plz help me..
|
|
|
|
|
Look at line 330 of wincore.cpp. That will tell you what condition is being asserted. You may also need to look at the statements that got you to line 330 of wincore.cpp.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi,
I have opened an mfc application and when i go to its resource view and try to open any dialog box i get the following error.
"This file has been modified outside of the source editor.Do you want to reloead it?"
It has two options YES or NO. Even if i press YES or NO the message keeps on getting displayed and finally I have to close the application and reopen it.
Can anyone tell me whats the problem.
Thanks in advance.
Dhiraj Kumar Saini
|
|
|
|
|
Dhiraj kumar Saini wrote: and reopen it.
Everything works in order when you open the application for the next time.
Probably your source/resource file is getting modified time and again by some external application. VS detects this and asks you if you really want to reload it. Don't have any idea from your query about the type of application you are working on, but this may be one of the cause.
Another cause could be VS has gone corrupt...The chances are few though
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi,
I am working on an mfc application which is providing online support to customer. It is getting connected to a server and is areal time application.
Thanks.
Dhiraj Kumar Saini
|
|
|
|
|
you need are full rebuild of your app. The resources were going bad.
This is a feature of VS not a bug.
Greetings from Germany
|
|
|
|
|
hi,
Can you elaborate it.
Thanx
|
|
|
|
|
Dhiraj kumar Saini wrote: Can you elaborate it.
Click the Rebuild All button.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi all,
In my application for browse directory if i select any directory than i want all files are selected from this directory.
But here is one problem if i select any directory than it select only those file those are persent on the selected directory path.it not select files those are present inside the folder of folder on the selected directory path.
Please help me for this.
Any help or suggestions are appriciated.
If possible please explain with example.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Don't know if there exists an API to directly achieve this. You can use FindFirstFile alongwith PathIsDirectory (if it is a directory get all the file names from it) and implement a recursive solution to get all the files from the parent as well as the child directories.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Except FindFirstFile you can use of DlgDirList for get files and folders.
|
|
|
|
|
The DlgDirList function replaces the contents of a list box with the names of the subdirectories and files in a specified directory. so if the user does not have a list box at his disposal, this API won't be useful.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
This function will return the directory contents in a vector of strings.
std::vector< std::wstring > GetDirectoryList( const std::wstring &strDirectory )
{
std::vector< std::wstring > contents;
WIN32_FIND_DATA data;
HANDLE hFind = FindFirstFile( (strDirectory + L"\\*").c_str() , &data);
if ( hFind != INVALID_HANDLE_VALUE ) {
do {
contents.push_back( data.cFileName );
} while ( FindNextFile( hFind , &data ) != 0 );
FindClose( hFind );
}
return contents;
}
|
|
|
|
|
// send initial update to all views (and other controls) in the frame
SendMessageToDescendants(WM_INITIALUPDATE, 0, 0, TRUE, TRUE);
SendMessageToDescendants
the Handler of WM_INITIALUPDATE takes a very long time since ther a huge data to update. and this frizes the application UI.
Looking for a good idea to make UI active while it updates. pls advice
|
|
|
|
|
make the WM_INITIALUPDATE without the data and seperate the "huge data update" in another thread, which if ready updates the windows
"Wait for data loading..." with sandclock
Greetings from Germany
|
|
|
|
|
If you have to do ANY lengthy processing in response
to a Window message, then you need to start the processing in a
separate thread and return immediately from the message handler.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi..
I have create an MFC application which should have one button to load a file from the disk.
When i click the button it should display the open file dailog, can anyone help me, plz provide me some sample code..
thanks and regards
vinayskvs
|
|
|
|
|
this may help you
void CyourDlg::OnOpenBtn()
{
this->UpdateData();
CFile f;
char strFilter[] = { "BCR Files (*.bcr)|*.bcr|All Files (*.*)|*.*||" };
CFileDialog FileDlg(TRUE, ".bcr", NULL, 0, strFilter);
if( FileDlg.DoModal() == IDOK )
{
if( f.Open(FileDlg.GetFileName(), CFile::modeRead) == FALSE )
return;
CArchive ar(&f, CArchive::load);
ar >> m_Make >> m_Model >> m_Year >> m_Mileage >> m_Owner;
ar.Close();
}
else
return;
f.Close();
this->UpdateData(FALSE);
}
|
|
|
|
|
vinaykskvs wrote: When i click the button it should display the open file dailog, can anyone help me, plz provide me some sample code..
A code snippet which does this...
void CDialoTestDlg::OnButton1()
{
CFileDialog Fd( TRUE );
if( Fd.DoModal() == IDOK )
{
MessageBox( Fd.GetPathName() );
}
else
{
MessageBox( _T( "You didn't select a file" ));
}
}
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
|
Hamid. wrote: A good article for you.
While the article itself may be good, it serves no purpose to the OP.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
But why his answer is CFileDailog and this article is more than his answer(Why 2 votes=1)?
|
|
|
|
|
Hi all,
I am geting problem, when i am using GetSafeHwnd()API,
its gives error like this:
fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
error showing in line no 24:
afx.h headr file
Please any body sugest me how to reslove this.
Thanks inadvance
-Gangadhar
|
|
|
|
|