|
|
|
aaaan wrote: I want to copy the opened registry file
AFAIK, this is not possible. The registry is constantly accessed by the operating system, so the .dat file of the user cannot be copied, since it is open in non shared mode. What you can do is use the classes proposed by the two others who answered your thread and copy the HKEY_CURRENT_USER key recursively.
~RaGE();
|
|
|
|
|
Hi ,
I have a (Dialogbox with a button) which I open from the Menu which is
vertical shaped and docked at the left side.
I click this button on the dialogbox and AfxMessagebox is flashed which
is at the center of the dialogbox . In that way its flashing at the
left side. I call a App's DisplayMessage function in order to show this
messagebox. I though if I display this dialog from App , it may come at
the center but that is not the case.
I want this AfxMessageBox to be flashed at the center of the frame.
I read few postings here. I used following code using SetWindowsHookEx.
Sombody before said to subclass the window of AfxMessageBox in the hook
procedure . I am not sure how to do it and after that how to reposition
the window at the center of the main framme/App. So I straightaway used
SetWindowPos but not working satisfactorily.
HHOOK hookSave;
LRESULT CALLBACK hookFunc(int nCode, WPARAM wParam, LPARAM lParam)
{
if ( HCBT_CREATEWND == nCode )
{
#define pcs (((LPCBT_CREATEWND) lParam)->lpcs)
HWND hwndSave = 0;
if( WC_DIALOG == pcs->lpszClass )
{
hwndSave = (HWND) wParam;
}
if ( hwndSave )
{
// subclass_dialog_any_which_way_you_want(hwndSave);
SetWindowPos(hwndSave,HWND_TOP, 10,50,500,300,SWP_SHOWWINDOW);
//MoveWindow(hwndSave,100,500,500,300,false);
//theApp.m_pMainWnd->SubclassWindow(hwndSave);
}
#undef pcs
}
return CallNextHookEx(hookSave, nCode, wParam, lParam);
}
void CLeeApp::DisplayMessage()
{
hookSave = SetWindowsHookEx(WH_CBT, hookFunc, NULL,
::GetCurrentThreadId());
AfxMessageBox("Just for check");
UnhookWindowsHookEx(hookSave);
}
I guess this related to making AfxMessageBox as a SubClassWindow to
MainFrame which should be subclassed in the hook function (Which I dont
know how to do in the hookfunction, means hot to get the main frame
handle) and then how to get the windproc of mainframe for afxmessagebox
and then hot to get all these things to work for Afxmessagebox to
center the mainframe
Could someone help me with some guiding code postings.
""I want this to be with AfxMessageBox only. ""
It will help me a lot. Atleast gurus like CHris or Nish should help me
Thank you,
Lee
Lee
|
|
|
|
|
Why has it to be an AfxMessageBox ? Is it in _your_ application that you want to display the message box ? Do you want to display or to flash it ?
I would rather use another small dialog, or one fo the "custom" message box you can find here on CP instead of the AfxMessageBox .
~RaGE();
|
|
|
|
|
Just cam across that:
Ryan already helped you[^]
Tell us what you really need to do, and we will help you. Subclassing AfxMessageBox using hooks is to me something evil, so better not try.
~RaGE();
|
|
|
|
|
~RaGE,
Yeo, Ryan helped me out and I followed his advice by using MessageBox.
But I want to know how to achieve the same result by using AfxMessageBox on which we dont have any control. How to make it at the center of the main window instead of its own owner. This we can achieve only through subclassing.
Could some one give me specific code on it.
thanks
Lee
lee
|
|
|
|
|
~RaGE,
Yeo, Ryan helped me out and I followed his advice by using MessageBox.
But I want to know how to achieve the same result by using AfxMessageBox on which we dont have any control. How to make it at the center of the main window instead of its own owner. This we can achieve only through subclassing.
Could some one give me specific code on it.
Just want to know which will help me learn more about MFC.
thanks
Lee
lee
|
|
|
|
|
Can anyone point me to a template or reference on how to make a dialogbox as your main window?
Also, what would be issues and solutions regarding the fact that a dialog box does not have a message loop?
|
|
|
|
|
Are you using MFC ? If yes, you can simply start a project as a dialog based application.
|
|
|
|
|
ah sorry, I forgot to make that clear...what if I'm not using MFC?
|
|
|
|
|
You can Create the dialog based applicationa dn then you ca add the child dialogs on it. So you wil get a feel as you dialog is the main window.
Cheers
"Peace of mind through Technology"
|
|
|
|
|
why don't you want to use DialogBox() ?
still need help? email me - i'll send you an example...
everything is code...
|
|
|
|
|
i am using list controll with MFC-.net support.
everything is right before clicking on column seperator of the list controll when i am trying to shift columns of this list controll then
hides these scroll bar
if any body have idea about this what i have to do for shows scroll bars allways not hide any time.
please reply me .
Bankey Khandelwal
Software Engineer
|
|
|
|
|
The following link may be helpfull to u.
http://www.codeguru.com/Cpp/controls/listview/article.php/c4187
Thanks & Regards,
Ashok.
|
|
|
|
|
but i am using .NET framwork if do have any example which is developed in MFC with .NET then give me link for this
Bankey Khandelwal
Software Engineer
|
|
|
|
|
The following link may be helpfull to u.
http://www.codeguru.com/Cpp/controls/listview/article.php/c4187
Regards,
Ashok(software engineer).
|
|
|
|
|
The following link may be helpfull to u.
http://www.codeguru.com/Cpp/controls/listview/article.php/c4187
Regards,
ashok
|
|
|
|
|
but i am using .NET framwork if do have any example which is developed in MFC with .NET then give me link for this
Bankey Khandelwal
Software Engineer
|
|
|
|
|
Bankey Khandelwal wrote: .NET framwork
This has nothing to say here, IMO. What your are developping is a simple MFC app with VS2005. If not, try your luck in the C# forum.
~RaGE();
|
|
|
|
|
hi,
I set the mapmode from MM_TEXT to MM_ANISOTROPIC using setmapmode.But the MM_ANISOTROPIC does not set.How can i set this mapmode.Please help me
Sunsen
|
|
|
|
|
Hi All
As we know that 9 profiles (accounts) can be made in MSN explorer.
Now I want to know the name of last logged in user acoount of MSN explorer.
where can I found this information.
Please guide me.
Thanks
|
|
|
|
|
rajeevktripathi wrote: Now I want to know the name of last logged in user acoount of MSN explorer.where can I found this information.
Most probable place IMHO would be registry or look application DATA folder under all User profile... since i don't have MSN explorer installed in my PC.. so i am not of any help...
|
|
|
|
|
Hi,
I want to do following things
1.Create a BSTR with the above mentioned XML nodes with node values being empty - <employee><name><id>..<age>
2.Create and load XML DOM document with the BSTR string created in the previous step
3.Set <employee><name><id>..<age>
4.Update the BSTR value with the XML DOM document
I have done the first 2 steps. Can you please help me in setting the value.I am new to xml.
<br />
BSTR bstrPPWData = L"<Employee><name></name><id></id>..<age></age></employee>"; <br />
pDOMDoc.CreateInstance(__uuidof(DOMDocument30));<br />
Thanks
|
|
|
|
|