|
check this
<br />
CWnd *pWnd=FindWindow(0,"Fonts");<br />
pWnd->PostMessage(WM_CLOSE);<br />
whitesky
|
|
|
|
|
Thankyou very much....
Such a nice and effective way you have suggested.
It worked as per my requirement..
Thanks again.
Rakesh
|
|
|
|
|
Hey but there is one issue.
If I change the settings from Control pannel
1. Not to Display the full path in title bar
2. To Display the full path in title bar
then the proposed solution doesn't work properly. I need to change the Text from
FindWindow(0,"C:\\Windows\\Fonts)
to
FindWindow(0,"Fonts")
Is there any solution for this ? Please help.
Thanks
Rakesh
|
|
|
|
|
You need to title from window for get one handle to window or CWnd now whats problem
whitesky
|
|
|
|
|
How We Add Popup to listbox Items .when we right click on any listbox item we should get a popup. i tried this but i am unable to get popups in listbox.
please tell me, urgent.
thank you.
vsn
|
|
|
|
|
I gave you a link yesterday. What is the problem with that?
See Here[^]
Oh! I misunderstood it for a tooltip
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 5:44 Saturday 1st July, 2006
|
|
|
|
|
no man i need popup to the listbox items
vsn
|
|
|
|
|
Derive a class from CListBox(CMyList)and override the OnContextMenu function.
Create a menu in the resource editor as ID_POPUP
Add items and add handlers to those menu items.
IN the OnContextMenu Add the following lines of code
CMenu* myMenu=new CMenu();
myMenu->LoadMenu( ID_POPUP );
myMenu->TrackPopupMenu( TPM_LEFTALIGN|TPM_RIGHTBUTTON,point.x,point.y,this );
When you declare the variable for CListBox change it to CMyList and add the header file (MyList.h where you declare the variable in the header file)
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 7:35 Saturday 1st July, 2006
|
|
|
|
|
i am getting an error that is setmenuinfo is not a member of menus
vsn
-- modified at 7:34 Saturday 1st July, 2006
|
|
|
|
|
ah. That was a typo mistake(Forgot to delete it). I have deleted the line in my post. You can anyhow do without it for now. For your general information menuinfo was of type MENUINFO
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
override the OnContextMenu function.?
i worte all the code u have given in Myclist::ContextMenu.
but where we notice to call this context menu.
vsn
|
|
|
|
|
You don't need to call the OnContextMenu function.
It is called by the framework when the user has clicked the right mouse button (right clicked) in the window.(from MSDN)
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Cross check that you have inherited a class from list box and then overridden the OnContextMenu function over there.Do not forget to change the type of the variable to CMyList.It works.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
overridden the OnContextMenu function over there?
|
|
|
|
|
if you have a derived CListBox you can declare OnContextMenu in this class
and see this
void CMyList::OnContextMenu(CWnd* pWnd, CPoint point)
{
HMENU hmenu,hmenuPopup;
hmenu = LoadMenu(AfxGetApp()->m_hInstance,(LPCTSTR) IDR_MENU1);
hmenuPopup = GetSubMenu(hmenu, 0);
TrackPopupMenu(hmenuPopup, TPM_LEFTALIGN | TPM_LEFTBUTTON,
point.x,point.y, 0,m_hWnd, NULL);
DestroyMenu(hmenu);
}
</code>
whitesky
|
|
|
|
|
Hi All,
I need to develop an Add In for Internet Explorer.
Can anyone help me on how I should proceed any documents in net that are suggested to read.
Thanks,
Arun.
Arun.
|
|
|
|
|
See Here[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I want to write a fax server program which can handle faxes with modem device.
Is there any one who knows about such dll or library.
I see some examples but they were in OCX format and I can not use them in VC++ , do you know a dll program for this purpose.
Regards
Mahdi
|
|
|
|
|
m_monhi wrote: I see some examples but they were in OCX format and I can not use them in VC++
why?
Ocx can be used in vc++
nave
|
|
|
|
|
I have some problems with OCX files in VC++.
thus I try to find a dll or lib for fax.
|
|
|
|
|
|
hello
my requirement is that in my my menu , i want to make one item text colorful like aming file ,edit,view and test(my item)
i want test to be written in blue .
is it possible and how i can implement it.
thanks in advance
sachin
|
|
|
|
|
U can surely make an item colorful as u want. Make the menu item u want MF_OWNERDRAW using ModifyMenu ().
Jubin Chawda
braindrain1@rediffmail.com
-----------------------------
Come online at:-
fitiyal@yahoo.com
-- modified at 2:55 Saturday 1st July, 2006
|
|
|
|
|