|
You can't (legally) use Detours in a commercial product - I don't even think you can use it in a free product (again, legally). I haven’t read the license in a while but from memory it’s quite restrictive – I think you can use it for “research” purposes. Also it doesn't work properly on Win95/98/ME (but who cares?!?).
I'd be surprised if you couldn't use subclassing to change the colour of the scrollbars.
Steve
|
|
|
|
|
Stephen Hewitt wrote: I'd be surprised if you couldn't use subclassing to change the colour of the scrollbars.
But we cannot take the handle of the default scrollbars. It is only a drawing, not a window, right? Further more the system paints it directly, in many cases( like thumb positioning, etc. ). So we cannot use the OnPaint also. That is why the detours is used.
- NS -
|
|
|
|
|
Hi,
Is it possible to set the color to a button in a dialog based application?
I tried using CTLCOLOR_BTN unsuccessfully.
The code which i tried is given below..
HBRUSH CMyDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if (CTLCOLOR_BTN == nCtlColor)
// It worked when i used CTLCOLOR_DLG to change the color of the DialogBox
{
hbr = ::GetSysColorBrush(1);
}
return hbr;
}
Thanks in Adavance..
Chetan.
Helping others satisfies you...
|
|
|
|
|
I think you want to change color from button you need to
derived from CButton and use WM_DRAWITEM
But for best way you can go examples in CodeProject and
you find your answer
|
|
|
|
|
Thanks a lot for your suggestion.
Helping others satisfies you...
|
|
|
|
|
You will get a good knowledge about button costumization from http://www.codeproject.com/useritems/HyperButtonEx.asp
- NS -
|
|
|
|
|
|
The documentation states that WM_CTLCOLORBTN (which you're handling indirectly via the MFC plumbing when you handle the WM_CTLCOLOR message) only works you owner drawn controls - Which basically makes it useless as then you have to draw it yourself. You’re not doing anything wrong; this technique simply doesn’t work.
Steve
|
|
|
|
|
simplest way is to Inherit a CButton then darw it on WM_PAINT or OnPaint(...), very easy.
A nice tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
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.
|
|
|
|