|
chetan210183 wrote: I tried using CTLCOLOR_BTN unsuccessfully.
Button Doesn't support Changing color through WM_CTLCOLOR Message!.. you need to handle WM_DRAWITEM MESSAGE by Subclassing the Button...
look for exmple for same here http://www.codeproject.com/button
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Thanks a lot.
Helping others satisfies you...
|
|
|
|
|
Hi!
I've built MFC project with VS MFC wizzard, and have included my own source. It's working fine on my computer, but on other computer isn't, because it doesn't have reqired DLLs.
My question is, how to attach necessery DLLs to my MFC project, to run it on other comuper whitch doesn't have reqired DLLs?
Hope You got the point.
Looking forward to hearing from You.
Thanks!
|
|
|
|
|
Try statically linking the MFC library to your DLL. You can do this in Main Menu: Project - Project Properties - Configuration Settings - General - MFC usage. Change this from shared MFC DLL to statically linking the MFC library.
Best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
I tried, but now i've got build errors.
Reason? Should I add something more to my project?
|
|
|
|
|
You need to copy the required dlls to the other computer's windows directory. This is what installers are used for.
Try this installer its free and powerfull
http://www.jrsoftware.org/isinfo.php[^]
BTW which MFC dll is missing?
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Monty v2.0 wrote: You need to copy the required dlls to the other computer's windows directory. This is what installers are used for.
Yep i thought so, but how can i know all *.dll-s whitch are needed ?
missed dlls - i.e. mfc70d.dll , msvcr70d.dll
|
|
|
|
|
eMtek wrote: missed dlls - i.e. mfc70d.dll , msvcr70d.dll
you have build the exe in *debug* mode, change to *release* mode and to test simple copy the required dlls (mfc70.dll , msvcr70.dll) without the 'd', if they are not there already
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Yes, you were right.
I,m a beginner with this stuff, thus I make so stupid mistakes;)
Thanx a lot
cheers!
|
|
|
|
|
|
I think, it can be very usefull.
Thanx!
TC
|
|
|
|
|
|
how can i use it?
can u give me detail desc..
thanks in advance
JAYARAJ
|
|
|
|
|
well if you are asking about inno setup then there are plenty of tutorials on the inno website and internet.
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
you can to copy files dll in directory windows or directory application
|
|
|
|
|
Hello,
I was wondering if it is possible to implement MDI in a MFC based ActiveX control. I was able to implement SDI (using a sample from MSDN), but I faced some difficulties when implementing MDI. Any help would be highly appreciated.
Thanks in advance,
Dennis.
|
|
|
|
|
i ahve dialog and on there are picture box and i want to show popup menu when right click on picture box not on dialog but i have written a code as follows:
void CShow_ImageDlg::OnRButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CMenu popupMenu;
popupMenu.LoadMenu(IDR_MENU1);
CMenu* subMenu = popupMenu.GetSubMenu(0);
ClientToScreen(&point);
subMenu->TrackPopupMenu(0, point.x, point.y,AfxGetMainWnd(), NULL);
CDialog::OnRButtonDown(nFlags, point);
}
it showing popup dialog and also picture box but i want to show popup on only picture box
how it is possible.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
Derive a class from CStatic and handle the OnRButtonDown event
Name the picbox IDC_STATIC_PIC and attach a variable to it
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
This time you beat me to the punch.
Steve
|
|
|
|
|
Stephen Hewitt wrote: This time you beat me to the punch.
whos da man
BTW i didn't know about the shift+f10 thing
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Firstly you should use the WM_CONTEXTMENU message instead of the WM_RBUTTONDOWN message. Doing this means the SHIFT+F10 shortcut will work for example. If you want the right click to be for the picture box you should subclass it and handle the WM_CONTEXTMENU message there.
Steve
|
|
|
|
|
if you use event WM_CONTEXT_MENU in the function you can use
handle CWnd->m_hWnd with hWnd your Control
void CAnswerView::OnContextMenu(CWnd* pWnd, CPoint point)
{
if(pWnd->m_hWnd==(your m_hWnd))
{
CMenu menu;
menu.LoadMenu(IDR_MAINFRAME);
CMenu *pContextMenu=menu.GetSubMenu(0);
pContextMenu->TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON,point.x,point.y,AfxGetMainWnd());
}
}
|
|
|
|
|
i am crating picture box dynamicall through cstatic class object
suppose object is *obj
and i am trying as
if(pWnd->m_hWnd==obj->m_hWnd)
but this condition allways false
please where i am wrong.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
I wrote to your mail
It's work do you use in WM_COMTEXTMENU
-- modified at 7:34 Friday 10th March, 2006
|
|
|
|
|
iam using wm_contextmenu like as
void CShow_ImageDlg::OnContextMenu(CWnd* pWnd, CPoint point)
{
// TODO: Add your message handler code here
if(pWnd->m_hWnd==cstatic->m_hWnd)
{//where cstatic is the object of cstatic class for creating //picture box
CMenu menu;
menu.LoadMenu(IDR_MENU1);
CMenu *pContextMenu=menu.GetSubMenu(0);
pContextMenu->TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON,point.x,point.y,AfxGetMainWnd());
}
}
but it does not work if u have any idea where i am wrong please reply me
Bankey Khandelwal
Software Engineer
|
|
|
|