|
Programs running in windows are resident unless you close it.
I think the term resident came from DOS operating system where we can execute one program at a time.
Hooking is a stuff related to it. check codeproject or MSDN for articles.
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
Under Windows XP, an application that is 'resident' is called a service. This[^] is a very good introductory article.
Software Zen: delete this;
|
|
|
|
|
im making my own class to add to projects i have everything working but i need to know how to get the handle of the dialog in my class.
i would perfer for it to get the handle automaticly where if someone adds my class to there project they wont have to do anything and it wil get the handle but ill use whatever i have to to make it work.
what i need is the CRect of the dialog.
-- modified at 10:35 Tuesday 4th July, 2006
|
|
|
|
|
GetSafeHwnd().
Don't get what you mean by your second sentence.
GetClientRect()/GetWindowRect().
|
|
|
|
|
It would be great if you organized your request in sentences.
What you wrote is really hard to understand.
But well...
To get a handle of a Dialog, you can use the method GetSafeHWnd(), or the member m_hWnd.
If you can't use that, you can try looking for your window through FindWindow()
|
|
|
|
|
hi
i'v got 2 individual project but in same subject.now i wanna create an interface for them and use both of them in my new project.unfortunately i realised that one of them use MFC in static library and the other in "project setting" sets: not using MFC.(both of my project coded in win32).now how should i act?
i wonder if i sb could help me
thanks
ps:when i change the setting(both of them) i got error.
|
|
|
|
|
|
actually, when i change the setting from "use MFC in static library" to :not use MFC" i got this error:
Proiect_Client - Win32 Debug--------------------
Linking...
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/Proiect_Client.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
and for anouther project when i change to "use mfc":i got this error:
lient.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
client.obj : error LNK2001: unresolved external symbol __imp__InvalidateRect@12
MainWnd.obj : error LNK2001: unresolved external symbol __imp__InvalidateRect@12
ColorMode.obj : error LNK2001: unresolved external symbol __imp__SendMessageA@16
Compression.obj : error LNK2001: unresolved external symbol __imp__SendMessageA@16
GridSpacing.obj : error LNK2001: unresolved external symbol __imp__SendMessageA@16
ColorMode.obj : error LNK2001: unresolved external symbol __imp__GetDlgItem@8
Compression.obj : error LNK2001: unresolved external symbol __imp__GetDlgItem@8
GridSpacing.obj : error LNK2001: unresolved external symbol __imp__GetDlgItem@8
ServerIP.obj : error LNK2001: unresolved external symbol __imp__GetDlgItem@8
ColorMode.obj : error LNK2001: unresolved external symbol __imp__EndDialog@8
Compression.obj : error LNK2001: unresolved external symbol __imp__EndDialog@8
GridSpacing.obj : error LNK2001: unresolved external symbol __imp__EndDialog@8
ServerIP.obj : error LNK2001: unresolved external symbol __imp__EndDialog@8
GridSpacing.obj : error LNK2001: unresolved external symbol __imp__SetWindowTextA@8
ServerIP.obj : error LNK2001: unresolved external symbol __imp__SetWindowTextA@8
GridSpacing.obj : error LNK2001: unresolved external symbol __imp__GetWindowTextA@12
ServerIP.obj : error LNK2001: unresolved external symbol __imp__GetWindowTextA@12
MainWnd.obj : error LNK2001: unresolved external symbol __imp__EnableMenuItem@12
MainWnd.obj : error LNK2001: unresolved external symbol __imp__GetMenu@4
.............
-- modified at 12:49 Tuesday 4th July, 2006
|
|
|
|
|
Hi all,
I need to open ascii files in a project and i do that like this;
CString str;
CFileDialog fd(TRUE, NULL, str, OFN_FILEMUSTEXIST | OFN_HIDEREADONLY);
if (fd.DoModal() == IDOK)
{
str = fd.GetPathName();
UpdateData(false);
[...]
}
I'd like to know:
1) how to modify the dialog caption (default is "Open File")
2) what's the meaning of UpdateData(False)
3) what should i do to save a file instead of loading it.
Thanx in advance,
Desmo16.
|
|
|
|
|
Chaning the text of the file dialog is simple.
try this code
CFileDialog dlg(true);<br />
dlg.m_pOFN->lpstrTitle = "Save as new title";<br />
dlg.DoModal();
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
You can use also GetOpenFileName and for save GetSaveFileName
see MSDN for UpdateData
In MSDN:
<code>
"CWnd::UpdateData
This method initializes data in a dialog box, or retrieves and validates dialog data."
whitesky
|
|
|
|
|
WhiteSky wrote: see MSDN for UpdateData
In MSDN:
"CWnd::UpdateData
This method initializes data in a dialog box, or retrieves and validates dialog data."
how we could set the data?
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
I think his question is independent from main question
whitesky
|
|
|
|
|
|
Desmo16 wrote: 3) what should i do to save a file instead of loading it.
use
CFileDialog fd(FALSE, NULL, str, OFN_FILEMUSTEXIST | OFN_HIDEREADONLY);
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
Hi people
I belive I have seen a WIN32 funtion that you can use to know the type of a Handle.
I need to know if a handle references a file, a file map or another thing.
Does anybody knows how I can do that? I tried at msdn.com but I can't find anything
Thanks in advance
|
|
|
|
|
|
hi
i want to make a button in mfc so that when i click on it
all open windows are minimized plz tell me the example for this
Ashish Dogra
MCA
Noida
|
|
|
|
|
I am not going to write any code for the same.
you just google for it.
steps.
1. Enumerate Windows (top level windows)
2. On enumeration, you will get handle of each window. decide, it's a top level window or not.
3. Call ShowWindow(hWnd,SW_MINIMIZE);
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
plz tell me
i have made an sdi application now i want that wheni run this application the menu on it in which i add an item show so that when i click on show it open again same window as mainframe
but in sdi how i can gofrom menu to window
Ashish Dogra
MCA
Noida
|
|
|
|
|
|
|
I'm creating DOMDocument in the following way:
CoCreateInstance(CLSID_DOMDocument40, NULL, CLSCTX_ALL, IID_IXMLDOMDocument2, (LPVOID*)&m_pXmlDoc)
This works well when the code is compiled as usual console application. But when the code runs as windows service CoCreateInstance fails with E_OUTOFMEMORY error.
This only happens on some machines...
Thank you,
Andriy
|
|
|
|
|
I have CDialog with several edit box controls on it. On closing the dialog, how to find which edit box has the focus?
thanks.
|
|
|
|
|
use from GetFocus()
whitesky
|
|
|
|