|
Did you fail to read this policy:
In accordance with this policy, you may discuss with other students the general principles required to understand this project, but the work you submit must be the result of your own team's effort.
I do not think that we qualify as being a part of your team. What of your partner? Is s/he willing to fail this assignment/class by not adhering to policy?
If you have a specific question about a piece of code, ask it. But don't ask others to do your work for you. I'm sure Dr. Barone would agree with this.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
DavidCrow wrote: If you have a specific question about a piece of code, ask it. But don't ask others to do your work for you. I'm sure Dr. Barone would agree with this.
Of course, Mr. David. I am in complete agreement with you.
Cheers,
Barone.
|
|
|
|
|
Hello Friends
I m creating a one dlu where I m trying to get handle of child window(ListBox of Dialog) that is defined in another dlu.
First I Get handle to main Dialog by using FindWindow as:
HWND GR=FindWindow(NULL,"Edit Group"); //Edit group is Dialog name
I m having one groupList having Id IDC_GROUPLIST.
Now I want to get Its handle.
I tried FindWindowEx as
FindWindowEx(GR,NULL,MAKEINTATOM(0x800),"ListBox");
But I m not getting the result .I m not sure abt last parameter.
M i doing right or suggest me some other solution to get cild Window handle?
Thanks & Regards
Yogesh
|
|
|
|
|
yogeshs wrote: FindWindowEx(GR,NULL,MAKEINTATOM(0x800),"ListBox");
You could try FindWindowEx(GR, NULL, "LISTBOX", NULL); instead.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Thanks,It is working.But can u suggest me for spinner b'coz I m having too many spinner in my Dialog but I need the handle for a specific spinner.
|
|
|
|
|
All controls have an ID that is defined by the resource editor.
You can use GetDlgCtrlId[^] on the control handle to check if it is the handle of the control that you're expecting.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I need that handle in different dll where i dont have Id.
If I have that Id then I can use GetDlgItem.(In that case there was no prob).
but I m not having in this dll.
|
|
|
|
|
I still think it will work. You should try it.
I can think of another way of doing this.
Create a hidden control with a caption just after the control that you're targeting.
By after I mean in terms of Z-Order.
Then after you get the handle to your control, you can use GetNextWindow[^] and GetWindowText[^] to check if it is the control that you're targeting.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I tried with this but it is always returning only the text of One Id.
I saw that "GetWindowText cannot retrieve the text of a control in another application." in MSDN.
What I do now?
|
|
|
|
|
Thanks Dear and all other guys also who replied me.
But I got it with this last two mwthods that u told me.
Thanks A Lot
|
|
|
|
|
yogeshs wrote: FindWindowEx(GR,NULL,MAKEINTATOM(0x800),"ListBox");
Why do you need to "find" something that's already there? (stored in CListBox::m_hWnd )
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I m not using MFC Sir ji.
|
|
|
|
|
If you don't use MFC, the idea is still the same.
You could store the handle of that control into a member variable when you create it, and use that member variable to manipulate it, or have it sent to another window that needs it. Simpler than using APIs to "find" the control and fetch its handle?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi,
This question has been posted to other forums without success (so far).
I am not a C++ coder. I usually work with VB and occasionally C#.
I have some old cde that has a problem, and can't get a 'simple' string conversion working.
This is a COM DLL used by VB6.
The function is defined as follows:
STDMETHODIMP CParser::GetAttributeValue(BSTR strName, VARIANT strPath, BSTR *pStrVal)
The problem is that strPath is incorrect, and I need to know what it is.
Currently I have the following:
return Error("Error in GetAttributeValue. The node Path specified was not found.");
This works, but I want it to give me the path.
This does not work:
return Error("Error in GetAttributeValue. The node Path specified (" + strPath + ") was not found.");
The error is:
error C2679: binary '+' : no operator defined which takes a right-hand operand of type 'struct tagVARIANT' (or there is no acceptable conversion)
I understand it is a type conversion problem, but can't seem to get the syntax correct.
Trying something as simple as this does not work:
return Error("Error in GetAttributeValue. The node Path specified (" + _bstr_t(strPath) + ") was not found.");
error C2668: 'Error' : ambiguous call to overloaded function
Trying this also does not work:
return Error("Error in GetAttributeValue. The node Path specified (" + _bstr_t(strPath.bstrVal) + ") was not found.");
error C2668: 'Error' : ambiguous call to overloaded function
Other failures:
return Error("Error in GetAttributeValue. The node Path specified (" + BSTR(strPath.bstrVal) + ") was not found.");
error C2110: cannot add two pointers
Please help. I don't know what I have to do to fix this.
Error() is defined in COMDEF.h:
static HRESULT WINAPI Error(LPCSTR lpszDesc,
const IID& iid = GUID_NULL, HRESULT hRes = 0)
{
return AtlReportError(GetObjectCLSID(), lpszDesc, iid, hRes);
}
Apparently CstringT can be used as it allows conversion between VARIANT and other TYPEs. But how do I use it? This is Visual Studio 6. CStringT isn't included with this old compiler.
Dave
|
|
|
|
|
I believe this post is in the wrong section. It should be in ATL.
Sorry. Mods, feel free to delete.
|
|
|
|
|
If anyone wants to know, I fixed it by doing the following:
return Error(LPCSTR("Error in GetAttributeValue. The node path specified (" + _bstr_t(strPath.bstrVal) + ") was not found."));
|
|
|
|
|
I have a gsm modem sim300.
When I connect it to computer and type at or ate1 in hyperterminal the result is "OK", but when I type any other prompt like at+cpin or at+cmgs the result is "error".
Can any one Help me?
|
|
|
|
|
You have already posted this question in the C# and .NET forums where it has been answered. Please read (and reread) the guidelines on posting questions.
|
|
|
|
|
Hi
I am currently working on a new project that allows users to chat to their friends, build houses, explore, and creating characters and also to upload multimedia into the 3D world so their friends can see and listen to the media at the same time.
I need someone to please help me with it, and if you are interested could you contact me here.
Thank you.
Andrew McIntyre
|
|
|
|
|
Nobody is going to write the whole code for you. You should start yourself and if you'll have problems, then ask here.
And please read How-to-get-an-answer-to-your-question[^] before posting next time.
|
|
|
|
|
This question has been asked a number of times already.
Please read How to get an answer to your question specifically the part about not expecting other people to do the work for you. Having read your biography from the link on your home page I suspect you may not have sufficient experience to consider embarking on such an ambitious project.
|
|
|
|
|
Is there an app for checking an include headers function support ie printf scanf etc
|
|
|
|
|
Please clarify your question
Величие не Бога может быть недооценена.
|
|
|
|
|
What do you need excatly?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hello,
I'm writing/maintaining an MFC app that makes extensive use of a database API that uses std::min and std::max, which is used in most of the application's translation units. Therefore, it makes sense to include the APIs convenience header (which in turn includes everything) in stdafx.h. The API requires that I #define NOMINMAX, so that the C++ std library's min and max function templates are used, rather than MS's legacy min and max macros. I have #define'd NOMINMAX in stdaxf.h . This worked fine for a long time. However, I recently installed the MFC 2008 feature pack. I must now #include afxcontrolbars.h. However, this header has inline functions that are dependent on the min and max macros which are now missing. I tried to "#include algorithm; using std::min; using std::max;" immediately before I include afxcontrolbars.h, so that std::min and std::max would be used as drop in replacements for the macros (this has worked in other areas in the past) but stdafx.cpp still doesn't build:
1>Compiling...
1>stdafx.cpp
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxtoolbar.h(166) : error C2782: 'const _Ty &std::max(const _Ty &,const _Ty &)' : template parameter '_Ty' is ambiguous
1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(3356) : see declaration of 'std::max'
1> could be 'LONG'
1> or 'int'
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxtoolbar.h(166) : error C2780: 'const _Ty &std::max(const _Ty &,const _Ty &,_Pr)' : expects 3 arguments - 2 provided
1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(3364) : see declaration of 'std::max'
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxmenubar.h(161) : error C2782: 'const _Ty &std::max(const _Ty &,const _Ty &)' : template parameter '_Ty' is ambiguous
1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(3356) : see declaration of 'std::max'
1> could be 'LONG'
1> or 'int'
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxmenubar.h(161) : error C2780: 'const _Ty &std::max(const _Ty &,const _Ty &,_Pr)' : expects 3 arguments - 2 provided
1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(3364) : see declaration of 'std::max'
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxdesktopalertwnd.h(81) : error C2782: 'const _Ty &std::max(const _Ty &,const _Ty &)' : template parameter '_Ty' is ambiguous
1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(3356) : see declaration of 'std::max'
1> could be 'UINT'
1> or 'int'
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxdesktopalertwnd.h(81) : error C2780: 'const _Ty &std::max(const _Ty &,const _Ty &,_Pr)' : expects 3 arguments - 2 provided
1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(3364) : see declaration of 'std::max'
1>Build log was saved at "file://c:\Documents and Settings\User\My Documents\Visual Studio 2005\Projects\Lustre\Lustre\Debug\BuildLog.htm"
1>Lustre - 6 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
What should I do?
Regards,
Sternocera
|
|
|
|