|
What I know upcasting downcasting is related to dynamic_cast
not static_cast for this at least one virtual function must be present
never say die
|
|
|
|
|
This project is being specifically developed to facilitate easy collaboration within workgroup which provides improved and fast backup and recovery facility.
The objective of the software is to provide a platform to the people working at different locations but on a single project. This software will enable them to maintain a log file of all the files being viewed at every computer. These files along with the log file are then copied to the required destination. Hence in this way the users can keep in touch with each other’s activity and the overall progress.
The software will help in keeping track of the files visited during a day. In this way one can keep track of all the work done
The main functionality of the system is to provide the backup facility and recovery procedure for highly reliable and maintainable systems. Moreover, using the system a user can keep track of all the files that have been visited per day. Also the user can take the backup of the desired files using any portable media and provide the recovery of files in case of system/disk crash.
please tell me any solution. i am clear with the functinality. i want to know the MFC commands to go through this application. please help me and reply as soon as possible.
RabiaAslam
|
|
|
|
|
Are those project files at one location? or are they copied to all systems? In both cases, a program will run on the PC where they files are located, and it will keep reading any changes to the files in the desired directory, like new file creation, file modification (date/time changes), deletion etc, and write to a log file. Then when the time comes to backup the files, the program can read-back the log in, and tell you what files have been modified and when, so you can take backups etc.
this is this.
|
|
|
|
|
ok, third time in 24 hours ...
First, no one will give you a definitive answer to what you are asking, this look like s a HUGE project, and no single API exists for that, either MFC, win32 or other APIs.
Second, you should scope down the project to a sandbox type of environment, not keep track of ALL files on ALL computers, this is way overkill; and who cares ( In my opinion ) what files are viewed on someone else's computer, normally, only modified ( created, modified, renamed, deleted ) files are logged and be candidate to be transfered to other systems; only work on a specific folder, or a project type sandbox ( for example a VS project )
Third, you will need to implement a kind of Peer-2-Peer system, that will replicate data across different systems.
Have a look at what the groove system is doing ( www.groove.net ).
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
You can use system wide hooks and trap the messages of the opening a file. You can know the user name using simple APIs. But I am afraid no one will help in a detail what u are requesting.
For recovering data procedure, understand the windows file system probably and implement ur own algoirthms for retreiving lost pointers.
You can look abt hooks on the following link:-
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/hooks.asp
Best Regards,
|
|
|
|
|
hi,
i did one application VC++/MFC with graphical methods
when i execute the application . Its start running ,but after sometime
it throw an error message
"The instruction at "0x6c3b7f98" referenced memory at "0x00000048". The memory could not be "read".
Click on OK to terminate the program
Click on CANCEL to debug the program
what's the reason reply ASAP
Thanks
Maharaja
send reply
|
|
|
|
|
pls post the code snippet and zero in the problem in the code snippet
never say die
|
|
|
|
|
Mr Maharaja
U r probably facing some memory problem
might be u have an pointer to some object
which is not initialised or is tried to
change .
I.E
char* temp="VIKAS_GOOD_PROGRAMER";
*temp='v';
This will cause similer error .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
vikas is right. To add more, u wud allocating some memory on the heap but not deallocating the memory. Make sure to use delete for every new. I hope u get the point !
|
|
|
|
|
When I click close button of CPrintPreview the application crashes. Before explaining what I have done, I find it noteworthy to mention that when application was launched from VC 6.0, no crash of application watsoever occured. But after migrating to VC.NET, I am encoutering this problem.
and let me focus what I have done:
I have derived a class from CPreviewPrint and call OnPreviewClose to close the print preview.
Since the class is derived from CPrintPreview it has a pointer names m_pPreviousView. Now plz just focus on the coming line. The problem starts after this. At this stage this->m_pPreviousView->m_pPreviewState is not NULL. But when I cast it CPreviousView and say store in pPrevView, I get pPrevView->m_pPreviewState NULL.
void MyPrintPreview::OnPreviewClose()
{
SetFocus();
/*
some code ... this->m_pPreviousView->m_pPreviewState is NOT NULL
*/
CPreviewView* pPreviewView = STATIC_DOWNCAST(CPreviewView, this);
/*
pPreviewView->m_pPreviousView->m_pPreviewState is NULL
some code and call OnEndPrintPreview
*/
}
Any help on it will be highly appreciated.
Best Regards,
|
|
|
|
|
hi
i want call OnTimer(UINT nIDEvent) in same class by using
SetTimer(4444,5000,NULL);
but i am unable to call ,it didn't go in OnTimer() body
can anyone help me.
thanks in advance
sachin
|
|
|
|
|
cancerion wrote: but i am unable to call
There is no need to call OnTimer. It's called everytime a WM_TIMER event is fired.
Did you add a message map entry for OnTimer. That is
ON_WM_TIMER()
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
hi ,
i have tried this there is no change in situation , while i have one application uaing this function , i have followed that ,still i m unable to do that
|
|
|
|
|
How is OnTimer declared
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
afx_msg void OnTimer(UINT nIDEvent);
|
|
|
|
|
This how I do...
BEGIN_MESSAGE_MAP(.......)
ON_WM_TIMER()
END_MESSAGE_MAP()
afx_msg void OnTimer(UINT nIDEvent);
SetTimer(timerID, delay, callback);
//rest of the code
void MyClassName::OnTimer(UINT nIDEvent)
{
.....
}
well it will work if it done like this...
Change the delay to 1000... So that you can check faster
Try again
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
thanks,
i think ,i have made a mistake in my main program . in which it's not working .i also made a program separately and it was working .so now i will make changes again in my main program
thanks once again
|
|
|
|
|
cancerion wrote: .i also made a program separately and it was working .so now i will make changes again in my main program
Is your timer program have his own window!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Some one plz help i m not been able to call Dll made in VB through VC++ MFC
Mind it not by using OleView
Achin Jain
|
|
|
|
|
Hi
Does anyone know how to use the UnRegisterClass function in a dll .I create a window in a dll. But when i try to unregister the class in WM_Destroy, the function is giving error code 1412.But when i try to unregister the class before return of winmain it is giving error that class does not exists.
Thanks
|
|
|
|
|
If you search the "UnregisterClass" in VS, you can find the following in the Remark.
<---
Before calling this function, an application must destroy all windows created with the specified class.
All window classes that an application registers are unregistered when it terminates.
-->
If you have tried to unregister the class within the WM_DESTROY msg handler of the window instance, it should be failed.
|
|
|
|
|
Thanks I got your point . So where can i call this function . I tried calling in DLL_PROCESS_DETACH it is giving error code 1411. can you please help me in this regard
|
|
|
|
|
Hello ,
I am new to VC++,MFC.
Please suggest to me , Which design patterns are used in
MFC .
Plz , Give Urgent reply
Bye
Praveen.C
Praveen Kumar
|
|
|
|
|
Can you elaborate..............
VamsiDhar.MBC
SoftwareEngineer
|
|
|
|
|
I am Vc++ Professional , (c++,vc++,MFC)
In Interviews they are asking about Design Patterns.
I am not knowledge about design patterns about vc++.
But In Java,J2EE I know about MVC architecture.
Plz Send Urgent reply.
Bye
Praveen,
Praveen.
|
|
|
|