|
I may be interested. Can you post the link to the site?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Currently I do not have an informational website up and running. Though I have registered a project account with SourceForge it doesn't have much for indepth details. However, the XML library has complete documentation including overviews and examples.
|
|
|
|
|
Stuart Konen wrote:
the XML library has complete documentation including overviews and examples.
That nice, Your XML Library have complete documentation, but I would love to check it for Speed and Size , before using in my projects
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Suppose I have an MDI project.
The wizard automatically placed my document object implementation file with:
IMPLEMENT_DYNCREATE(CCatchbugDoc, CDocument)
If I wish to have my document object to have multiple inheritance (CDocument and another non-CObject object, which is created by hand), do I need to add any new stuff under
IMPLEMENT_DYNCREATE macro?
Thanks
|
|
|
|
|
IMPLEMENT_DYNCREATE does not work with multiple inheritance.
John
|
|
|
|
|
yccheok wrote:
If I wish to have my document object to have multiple inheritance (CDocument and another non-CObject object, which is created by hand), do I need to add any new stuff under
IMPLEMENT_DYNCREATE macro?
No, it isn't neither needed nor possible. MFC's macros and functions that deal with runtime type are designed with single inheritance in mind. However, you can make use of multiple inheritance as long as you:
- Observe the usual cautions regarding multiple inheritance in general (i.e.: take care of multiple use of the same base class, etc.), and
- Declare what MFC expects as the
first base class (i.e.: CDocument in this case), so that things like pCatchbugDoc->IsKindOf(RUNTIME_CLASS(CDocument)) and CDocument* pDoc = (CDocument*) pCatchbugDoc keep working.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hi everybody!
I want Create and develop a windows service in Visual Studio.Net( Visual C++ )
and I want use the MFC instructions in this.
if is it possible please help me!
Tell me what shulde I do?
Please answer to me immediately!
|
|
|
|
|
BiNam wrote:
Please answer to me immediately!
I hope you don't mind my delay, Sir. My humble apologies for not answering faster, as you demanded and surely deserve.
BiNam wrote:
I want Create and develop a windows service in Visual Studio.Net( Visual C++ )
and I want use the MFC instructions in this.
First, you should check What MFC Cannot Do for You[^], and in particular the part where it specifically says:
Microsoft does not support using MFC to build Windows services
--
"slow" jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hello Jose Lamas Rios!
Thanks a lot for your useful help!
How one program requests from a service?
Please explain to me completely.
Thank you!
|
|
|
|
|
Generally you are supposed to figure stuff out for yourself and ask here for help on specific issues. Not "How do I write a xxx type of program?".
Go away and do some studying. Work out the basics and then come back and ask details. There are plenty of excellent examples of writing services here on CP.
HTH.
|
|
|
|
|
Jose Lamas Rios wrote:
My humble apologies for not answering faster, as you demanded and surely deserve.
Jose Lamas Rios wrote:
Microsoft does not support using MFC to build Windows services
Yeap, But Mr. Naughter this article support MFC in Window Service too:-
http://www.codeproject.com/system/cntservice.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
|
Thanks Ravi for your help
But if you can,give me a sample code for create a Windows Service in MFC
|
|
|
|
|
Is the sample in the article not sufficient?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hello,
I have this code!
HWND hwndTextBox = NULL;
hwndTextBox = GetDlgItem(hwndDlg,IDC_EDIT1);
if(CDesktop::None != (CDesktop::ShowStatus)iIndex)
{
if(GetWindowText(hwndTextBox,text,MAX))
bSuccess=g_objDesktop.SetDesktopWallpaper (text,CDesktop::ShowStatus)iIndex);
}
But now I want to use it in a dialog (MFC) and I dont now how to get the text as a char enter in the EDIT1
as it supose to do. Is there anyone that can help me?
|
|
|
|
|
Hi Larsson :
I could not understand your meaning .But if you want to get the char when you click a certain key of keyboard ,you can use the message map to hook the key down message.
The example is in the following :
// you should ooverride the "PreTranslateMessage"
BOOL CMyClientDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
switch(pMsg->message)
{
case WM_KEYDOWN :
switch(pMsg->wParam)
{
case 'A': //add code here to get the char A break;
case 'B': //add code here to get the char B break;
case 'B': //add code here to get the char C break;
}
break;
case WM_KEYUP:
switch(pMsg->wParam)
{
case 'A': //add code here to get the char A break;
case 'B': //add code here to get the char B break;
case 'B': //add code here to get the char C break;
} }
break;
}
return CDialog::PreTranslateMessage(pMsg);
}
AntonlioX
|
|
|
|
|
how do you display the set password dialog for a given user via the command line or C++?
(control userpasswords, control userpasswords2 - doesn't go to a specific user)
|
|
|
|
|
I need to automatically add my snapin to compmgmt.msc using C++.
|
|
|
|
|
Using DirectShow I can display the property page, but I don't know how to actually change the values shown in program code.
|
|
|
|
|
For the standard video properties such as brightness,
contrast, saturation, etc you need to obtain a pointer
to the IAMVideoProcAmp interface ( Here[^] )
on your video capture filter and use the Set() / Get()
methods exposed on it.
e.g. (without error checking or clean-up)
Given a valid pointer to your IBaseFilter video capture
filter, m_pVideoCapture;
HRESULT hr;
IAMVideoProcAmp *m_pIVideoProcAmp;
hr = m_pVideoCapture->QueryInterface(IID_IAMVideoProcAmp, (void **)&m_pIVideoProcAmp);
m_pIVideoProcAmp->Set(VideoProcAmp_Brightness, m_nBrightnessValue, 0l);
"VideoProcAmp_Brightness" is one of the properties in the
VideoProcAmpProperty Enumeration :
( here[^] )
You will also need to use the GetRange() method
on the IAMVideoProcAmp interface to find the valid
range of values for each property.
Steve T
|
|
|
|
|
how do you tell if fast user switching is enabled in C++ code?
|
|
|
|
|
What do you want to do?
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
During program installation I need to choose the install type depending on if the user is using the classic Gina interface or the fast user switching welcome screen for login.
|
|
|
|
|
This is a dynamic setting though. For example I could install your program, then join a domain on my Windows XP Pro machine. So you may want to detect at runtime if it is enabled when your gina is loaded.
LogonUI[^]
One way to tell would just be to find out if LogonUI is running or when it is run. LogonUI is the application that displays the full screen logon dialog, winlogon I believe should still be displaying the old dialog in Windows XP Pro when FUS is disabled.
The other thing to check is to make sure that Terminal Services/FUS Service is running, of course TS can be running even when FUS is disabled. So if you don't care about that part and are more worried about the graphical look then logonui is probably what you would want to check.
You may want to verify this but in any case I would suggest a dynamic check since the state of using FUS or not can change.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
This article[^] on the MSDN talks about the conditions under which fast user switching is available. It sounds like you could detect those conditions, and then assume that fast user switching is enabled.
If your application needs to know that users have changed, it's a lot simpler. Use WTSRegisterSessionNotification [^] to cause a window in your application to receive a message when the user has changed sessions.
Software Zen: delete this;
|
|
|
|