|
what is this pointer pointing to??
i mean is it a window or what??
|
|
|
|
|
Hello,
The this pointer is
class Menu : public CMenu
{
}
The pointer is pointing to the Menu class.
Regards,
Pritha
|
|
|
|
|
Hi all ,
i want to write a program , which can monitor a specific floder , if there was a file created in that specific floder, my program(i have to write) should get a notification.
How can i do this using VC++, or any better way to do this . please advise.
Thanks
Kanth.
|
|
|
|
|
You can use FindFirstChangeNotification() and FindNextChangeNotification() apis for monitiring directory changes. For getting file creation notification, you've to provide dwNotifyFilter as FILE_NOTIFY_CHANGE_FILE_NAME . Note that it will include renaming, creating, or deleting a file name.
Check this sample about how to use it - http://msdn.microsoft.com/en-us/library/aa365261(VS.85).aspx[^]
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thank you soo much for your time for replying me. i will go thru the link
|
|
|
|
|
Always welcome. Since i'm sick today and resting at home, I've plenty of time to help you.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Jijo raj wrote: Since i'm sick today and resting at home
Good recovery
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Hello Jijo
Get Well Soon
Pritha
|
|
|
|
|
ReadDirectoryChangesW() will be more apropriate, if u want to get the name of the file created.
|
|
|
|
|
Seems better one.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
|
#include <algorithm>
#include <vector>
#include <functional>
#include <list>
using namespace std;
typedef list<int> LIST_INT;
bool IsOdd (int i) {
return ((i%2)==1);
}
int AbsToRelPosition(LIST_INT list1, int value)
{
LIST_INT::iterator pos;
pos = find_if(list1.begin(), list1.end(),bind2nd(greater<int>(), 1));
return 0;
}
int main () {
LIST_INT m_shown_cols; //shown column list
LIST_INT m_hid_cols; //hidden column list
LIST_INT m_shown_rows; //shown rows list
LIST_INT m_hid_rows; //hidden rows list
for (int i = 0; i < 2; i++)
{
m_shown_rows.push_back(i);
}
for (int j = 0; j < 4; j++)
{
m_shown_cols.push_back(j);
}
int place = AbsToRelPosition(m_shown_cols, 1);
LIST_INT::iterator pos;
pos = find_if(m_shown_cols.begin(), m_shown_cols.end(), bind2nd( greater<int>(), 1));
}
in this piece of code i am getting UMR(using purifier) in find_if using in AbsToRelPosition function but if i am using same piece of code in main function as shown above in my code purifier is not showing UMR.Pls help me wht would be the reason.
thanking you
Deepesh
deepesh
|
|
|
|
|
how to selective loading BHO in Chtmlview environment
wqewqqeweqwrwerewrwe
modified on Tuesday, May 27, 2008 11:40 PM
|
|
|
|
|
"BHOs are not loaded by other applications that host the WebBrowser control or by windows such as HTML dialog boxes." from [Building Browser Helper Objects with Visual Studio 2005^].
BTW, why need a BHO, when you have full control over the events and contents of html document when using Chtmlview( or Webbrowser control hosted in your application), BHO are used to extend custom functionally to Internet Explorer where you don't have direct control (like hosting in your app).
|
|
|
|
|
ok thank you...
wqewqqeweqwrwerewrwe
|
|
|
|
|
hi
i have an MFC dialog based application .
when the user enter his information and click save ...save dialog appears and the process goes as normal .
my question is ..when the user modifies his info and click the save button again ..i dont want the save dialog to appear just save the modified info.
how can i do that while iam using the following function to save:
void CmyDlg::Onsave()
{
this->UpdateData();
CFile f;
char strFilter[] = { "CCC Files (*.ccc)|*.ccc|All Files (*.*)|*.*||" };
CFileDialog FileDlg(FALSE, ".ccc", NULL, 0, strFilter);
if( FileDlg.DoModal() == IDOK )
{
f.Open(FileDlg.GetFileName(), CFile::modeCreate | CFile::modeWrite);
CArchive ar(&f, CArchive::store);
ar << m_EDIT1<<m_EDIT2;
ar.Close();
}
else
return;
}
f.Close();
}
pleease..i need help in this
i tried different things but nothing works
|
|
|
|
|
lahom wrote: my question is ..when the user modifies his info and click the save button again ..i dont want the save dialog to appear just save the modified info.
how can i do that while iam using the following function to save:
Store the necessary information in CmyDlg .
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
thank u for ur fast reply.....
DavidCrow wrote: Store the necessary information in CmyDlg.
but what does this supposed to mean
did i make myself clear here or???
|
|
|
|
|
lahom wrote: but what does this supposed to mean
Take the information returned from FileDlg.GetFileName() and store it in the CmyDlg class.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
ok...
then what???
could u explain more ur idea??
thank u
|
|
|
|
|
Create member variable of string type in ur CMyDlg class. Initialize it to Empty string. Lets name it as m_strFileName. Store the FileDlg.GetFilename() in that variable when you click save.
and in Save Add condition for checking the file name is not empty.
CMyDlg::Save()
{
if(m_strFileName.IsEmpty())
{
CFileDialog FileDlg(TRUE,...);
FileDlg.DoModal()
m_strFileName = FileDlg.GetFileName();
}
... //Your Code for saving the file with name m_strFileName.
}
|
|
|
|
|
thank u very much ....it works just fine
thaaaanks...i appriciated
thank u all
|
|
|
|
|
Which one of WaitForSingleobject() and SetTimer() is better when I need to check for something in a regular interval.
Thanks & Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
They each do different things. Perhaps if you explained what the "something" is that you are checking, we could be of more help.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I want one of my function to be called every 100 ms which will do some procees.
This function will check some conditions to call or not some other small functions.
To call the function every 100 ms, which is better timer or WaitForSingleObject()?
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|