Hi, I have a requirement. 1) Create a 4 GB data file in Hard disk by writing 2 MB at time. ( Don't worry, that I can manage :)) 2) It should be stored in continous locations( clusters ) in hard disk. Is their any method to ensure that? Regards, VCSharp
VCSharp007
Posts
-
Ensuring the continuous physical allocation(storage) of a file in Hard disk -
Strange behavior of AfxGetMainWnd()!!!Hi, I am facing a problem related to window handle. I have loaded two different OCXs in different instances of the same container application(OLE Server). In OnCreate() method of second OCX control I am calling the AfxGetMainWnd()function. It is called after calling the base class function of OnCreate() method. Now trying to run both instances simultaneously. The problem is sometimes AfxGetMainWnd()function returns the pointer to a window of first OCX control which is loaded in the first container instance just before. Why it happens? Thankx in advance. Regards, SUnil
-
AfxGetMainWnd() returns the window of another application!!!!Hi, I am facing a problem related to window handle. I have loaded two different OCXs in different instances of the same container application(OLE Server). In OnCreate() method of second OCX control I am calling the AfxGetMainWnd()function. It is called after calling the base class function of OnCreate() method. Now trying to run both instances simultaneously. The problem is sometimes AfxGetMainWnd()function returns the pointer to a window of first OCX control which is loaded in the first container instance just before. Why it happens? Thankx in advance. Regards, SUnil
-
Hooking/Getting notfied the display of common error message dialogsHi all, Is there any method to hooking/getting notified the common error message dialogs ("Application error", "Microsoft Visual C++ Runtime Library", Window error reporting dialog etc) from any applications. Thanx in advance
-
Any method to getting notified on the Starting or Exiting of a particular process.Thanks for the reply Hamid. This articles describes about the development of a Processor Monitoring Application by Implementing a Kernel-mode driver, using the kernel mode driver API PsSetCreateProcessNotifyRoutine(). But I can't use this since I have to implement the Process monitoring in my MFC dialog baesd application.
-
Any method to getting notified on the Starting or Exiting of a particular process.Hi All, I know the process name. I want to getting notified on the starting/Exiting of that particular process in my program. Is there any method for this other than repeatedly enumerating all the running processes and checking for that particular process. Thanx in advance.
-
How to forward delare CArray class ?Thanks Nibu. But I have to use CArray varibale not pointer!!!!
-
How to forward delare CArray class ?Hi All, I have a requirement to add a CArray member varibale in my class without including afxtempl.h in my class header file. Is there any method to forward delare CArray class? Thankx in advance.
-
Random Link errorHi, When I try to build the workspace of my MFC DLL application it shows a link error as follows. "LINK : error : Internal error during EmitMap ExceptionCode = C0000005 ExceptionFlags = 00000000 ExceptionAddress = 0043FA39 NumberParameters = 00000002 ExceptionInformation[ 0] = 00000000 ExceptionInformation[ 1] = 000000F1 CONTEXT: Eax = 007C80ED Esp = 0012F7C0 Ebx = 000000ED Ebp = 0012F8DC Ecx = 0056D670 Esi = 007C80ED Edx = 000000ED Edi = 007C80ED Eip = 0043FA39 EFlags = 00010206 SegCs = 0000001B SegDs = 00000023 SegSs = 00000023 SegEs = 00000023 SegFs = 0000003B SegGs = 00000000 Dr0 = 0012F7C0 Dr3 = 000000ED Dr1 = 0012F8DC Dr6 = 0056D670 Dr2 = 00000000 Dr7 = 00000000 Error executing link.exe. Tool execution canceled by user." When I build once again, it will be OK. Anyone know what is happening? Thanx in advance.
-
How can I use MFC DLL in an WIN 32 Application?Hi, WIN 32 application crashes while calling a MFC DLL export function, which creates a dialog box using CDialogBox::Create(). What will be the reason? One more doubt..How can I add MFC support to a WIN 32 Aplication? Thankx In Advance...
-
Using CString in WIN32 Application.How can we use CString in WIN32 Application ?? Thanx in advance.
-
Number of Threads in a simple Windows Application.HI, How many threads will be there in a normal WIN 32/MFC application? My understanding is there will be 2 threads. Thread 1: Thread start from WinMain() and continously checking for messages and dispatches them to windows procedure. Thread 2: Windows Procedure thread. Am I right?
-
Show subitems of an item in listboxThink about using a collection class for storing the data(CMap will be better choice).. Put the item in list1 as "Key" and the items corresponding to it in List2 as "value"(use CStringArray here).
-
Need MFC Combo Box Help [modified]Just add a handler to CBN_SELCHANGE message and put your code there..
-
How to capture keyboard events ?You have to filter very "WM_KEYDOWN" message and check whether "CTRL + S" is happend. For that you can override "PreTranslateMessage(pMsg)" . Plz see the code snippet you have to add in "PreTranslateMessage(pMsg)". if ( WM_KEYDOWN == pMsg->message && pMsg->wParam == 0x53 /* 'S' */) { if ( ( ::GetKeyState ( VK_LCONTROL ) & KF_UP ) || ( ::GetKeyState ( VK_RCONTROL ) & KF_UP ) ) { // Ctrl + s pressed. Write ur code here. } } return CDialog::PreTranslateMessage(pMsg);
-
unresolved external symbol _wWinMain@16Why you set 'entry point for UNICODE project' in a non-unicode project ?? We need not explicitly set any entry point sympol for Non-Unicode projects. Or If u intend make ur project UNICODE supportable then plz add 'UNICODE,_UNICODE' in c/c++ Tab->Preproccessor
-
Problem with release build.Hi all, I had created customised tree control class derived from CTreeCtrl . I had written a handler to WM_RBUTTONDOWN message in that class. The problem is in release mode this handler nerver get executed but in debug mode it works fine. What may be the problem? Thanx in advance.
-
How to update the selected item path in ComboBoxSorry. I don't get ur need clearly. if the selected tree control item not in ur combo box, You want to add it in the combo and select that one?? or map to any other item??
-
How to update the selected item path in ComboBoxHere it is. CString csTreeItem = m_ObjTree.GetItemText(m_ObjTree.GetSelectedItem()); CString csComboItem; for( int nInd =0; nInd < m_ObjCombo.GetCount(); nInd++ ) { ObjCombo.GetLBText(nInd, csComboItem); if( 0 == csComboItem.compare(csTreeItem )) { ObjCombo.SetCurSel(nInd ); break; } }
-
Keeping smart pointers in a dynamic array.So, any other solution? How to adapt STL collections for keeping smart pointers.