|
You can do like this
CMainFrame::OnUpdateYourFunction(CCmdUI *pCmdUI)<br />
{<br />
if(A)<br />
pCmdUI->Enable(TRUE);<br />
else<br />
pCmdUI->Enable(FALSE);<br />
}
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Hello everyone,
I usually link with .lib file and when program executes, it will look for .dll file to load real function implementations.
I heard that it is possible to link with .lib file and the program can run without .dll file (.dll file needs not be generated and not needed at all during program execution). Is that correct? If it is, could anyone introduce some online tutorials about this topic?
thanks in advance,
George
|
|
|
|
|
There are two types of Linking 1.Static 2.Dynamic
George_George wrote: heard that it is possible to link with .lib file and the program can run without .dll file (.dll file needs not be generated and not needed at all during program execution). Is that correct? If it is, could anyone introduce some online tutorials about this topic?
Check this article for more info,
http://www.codeproject.com/dll/XDllPt4.asp[^]
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Hi All,
Can we get index from of a child item from its parent? i.e
I have Parent1 and it has sub items Child1,Child2,Child3,Child4,Child5,
example I want to get child3's index. it is at location 2 (0 based) from it parent.
It is possible through iterating and comparing.
Is there any other way to accomplish this?
SaRath
|
|
|
|
|
SaRath C wrote: Can we get index from of a child item from its parent? i.e
I have Parent1 and it has sub items Child1,Child2,Child3,Child4,Child5,
example I want to get child3's index. it is at location 2 (0 based) from it parent.
You can use GetChildItem or GetItem . GetChildItem has sample code with it in MSDN.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Nibu,
its returning, HTREEITEM actually I want the index of the child from parent item
SaRath
|
|
|
|
|
you can use from return handle for your work
like this
m_TreeCtrl.GetNextItem(return handle, TVGN_NEXT);
whitesky
|
|
|
|
|
Sarath
Can you modify this post of yours...
This one[^]
It's causing problems in the next page. Please edit and see if you are missing an HTML tag or not.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Try this (haven't tested it, might need to replace CTreeViewCtrl with CTreeCtrl if using MFC):
int GetChildIndex(CTreeViewCtrl* pTree, HTREEITEM hParent, HTREEITEM hFindChild)<br />
{<br />
HTREEITEM hChild = pTree->GetChildItem(hParent);<br />
<br />
int index = 0;<br />
<br />
while (hChild && hChild != hFindChild)<br />
{<br />
hChild = pTree->GetNextSiblingItem(hChild);<br />
index++;<br />
}<br />
<br />
if (hChild)<br />
return index;<br />
else<br />
retun -1;<br />
}<br />
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Hello everyone.
How to transfer file(data) from Linux to Windows?
Do you have any idea, please help to me.
Thank you
|
|
|
|
|
For this you will have to mount a partition of windows on to linux . Mount the partition in linux and copy data in the same manner as you do from any other storage device like FDD etc.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
put a freebie ftp server on Windows and use ftp client/script fron the linux box ?
Typesoft Ftp (google for it) is pretty basic, but ok
'g'
|
|
|
|
|
write a mail to any of your account with the file attached and recieve the mail at windows system.
Just kidding
You start ftp server at Linux and use windows as a client to transfer file.
Or setup samba server on Linux.
Regards
Anil
-- modified at 3:36 Thursday 25th May, 2006
|
|
|
|
|
Hello everybody I am very sorry to post this type of questions on this forum but
believe me its only your help that will clarify all my doubts.
After reading some articles on the forum
I concluded life-cycle of a typical MFC program as below in sequence.
1. WinMainCRTStartup
2. WinMain
3. AfxWinMain
4. AfxWinInit
5. InitApplication
6. InitInstance
Global RUN function is embeded in theApp (Global Object of my Application) which
handels all the default windows messages.
If I am wrong please correct me or give me a link where I can find more info about this.
Anger Is Only One Letter Short Of Danger
|
|
|
|
|
Scorpio wrote: Hello everybody I am very sorry to post this type of questions on this forum but
believe me its only your help that will clarify all my doubts.
After reading some articles on the forum
I concluded life-cycle of a typical MFC program as below in sequence.
1. WinMainCRTStartup
2. WinMain
3. AfxWinMain
4. AfxWinInit
5. InitApplication
6. InitInstance
Global RUN function is embeded in theApp (Global Object of my Application) which
handels all the default windows messages.
If I am wrong please correct me or give me a link where I can find more info about this.
This article by Nishant Sivakumar[^] should help you.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
|
Hi Guys,
Can anyone tell me howto tell, when you move a vertical slider control up or down, whether the thumb is goin up or down.
Thanks in advance.
Tony.
|
|
|
|
|
void MySliderTest::OnCustomDrawMySlider(NMHDR* pNMHDR, LRESULT* pResult) <br />
{<br />
if(i<m_sliding.GetPos())<br />
{<br />
i=m_sliding.GetPos();<br />
CString str;<br />
str.Format("%d",i);<br />
m_str.SetWindowText (str);<br />
}<br />
else<br />
{<br />
<br />
i=m_sliding.GetPos();<br />
CString str;<br />
str.Format("%d",i);<br />
m_str.SetWindowText (str);<br />
}<br />
*pResult = 0;<br />
}
***where i is a global variable m_str is a control variable for a label, m_sliding is a control variable for the slider.
NOTE: I have initialized the value of i in the initDialog class of my test application. You can also do it in the same way.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ thank you for your quick response.
Maybe I just don't see it but what exactly tells you from this code what direction the slider is moving?
|
|
|
|
|
i just didn't get what you want to say?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
<br />
void MySliderTest::OnCustomDrawMySlider(NMHDR* pNMHDR, LRESULT* pResult)<br />
{<br />
if(i<br />
{<br />
i=m_sliding.GetPos();<br />
CString str;<br />
str.Format("%d",i);<br />
m_str.SetWindowText (str);<br />
}<br />
else<br />
{<br />
<br />
i=m_sliding.GetPos();<br />
CString str;<br />
str.Format("%d",i);<br />
m_str.SetWindowText (str);<br />
}<br />
*pResult = 0;<br />
}<br />
<br />
void MySliderTest::OnReleasedcaptureMySlider(NMHDR* pNMHDR, LRESULT* pResult) <br />
{<br />
if(i<m_sliding.GetPos())<br />
{<br />
AfxMessageBox ("Down");<br />
i=m_sliding.GetPos();<br />
}<br />
else<br />
{<br />
AfxMessageBox ("Up");<br />
i=m_sliding.GetPos();<br />
}<br />
*pResult = 0;<br />
}<br />
<try removing="" the="" lines="" that="" i="" just="" striked="">
and add the slider release function>
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 3:58 Thursday 25th May, 2006
|
|
|
|
|
Aha! That's great thank you!
|
|
|
|
|
Anytime Dear. Need not mention . It's ok
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hope I understood your question Here[^]
whitesky
|
|
|
|
|
hi,
Whether C++ templates and generic programmings concepts are same?.
Any differences
thanks
Vivek.s
You only have to do a very few things right in your life so long as you don't do too many things wrong.
Vivek.S
|
|
|
|