|
Hello
I've received a reply saying that the function is probably false.
Actually, if you replace
CreateThread( NULL, 0, CallJScriptLater, &m_HtmlCtrl, 0, NULL);
with
CallJScriptLater( &m_HtmlCtrl );
It just works perfectly back again!
So, calling JavaScript from a seperate thread is impossible
Can anyone help me about this issue?
Thank you
S. Ali Tokmen
http://ali.tokmen.com
-- modified at 16:10 Thursday 25th May, 2006
|
|
|
|
|
Hi,
I have to disable the menu.
For Example:my menu is like this..
File Insert Panel Help
like this..I have to choose two different functions in a dialog.If i choose A,the Panel menu should enable..If i choose B then pane lenu shuld get disabled.
Wat can i do for this.
|
|
|
|
|
you need to change menu?
whitesky
|
|
|
|
|
Anu_Bala wrote: I have to disable the menu.
For Example:my menu is like this..
File Insert Panel Help
like this..I have to choose two different functions in a dialog.If i choose A,the Panel menu should enable..If i choose B then pane lenu shuld get disabled.
Wat can i do for this.
You have to add an ON_UPDATE_COMMAND_UI handler for these menus and update these menus based on flags that holds the state for these menu items.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
as nibu said, u can do ths in ON_UPDATE_COMMAND_UI function.
First get the menu bar using GetMenuBar() function.
then select the Sub menu using the required index.
Disable menu item by EnableMenuItem function by setting MF_GRAYED and MF_DISABLED flags.
hope this helps.
SaRath
|
|
|
|
|
SaRath C wrote: EnableMenuItem function by setting MF_GRAYED and MF_DISABLED flags.
This won't work here. It will get overridden in the ON_UPDATE_COMMAND_UI handler. MFC does it in a different way.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
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?
|
|
|
|