 |
|
 |
Please retrofit this code for Windows 7. The buttons do not display in Windows 7.
|
|
|
|
 |
|
 |
Hi,
It does not work in Windows 7 64 bit for me.
My changes:
1. SetWindowLong to SetWindowLongPtr
2. (DWORD)CCaptionButton::HookedWindowProc to (LONG_PTR)CCaptionButton::HookedWindowProc.
2. GWL_WNDPROC to GWLP_WNDPROC
3. (CPoint)lParam to CPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))
And it works.
Regards,
Valery.
|
|
|
|
 |
|
 |
it still doesn't work on windows7.
All the buttons disappear on my computer..
^oo^
|
|
|
|
 |
|
 |
Yes, It dose not appear on my windows 7, compile with VS2008.
|
|
|
|
 |
|
 |
The application will not be able to run on WHS. Beware!
=====================
Lars [Large] Werner
lars@werner.no
http://lars.werner.no
Have you tried the ultimate tool for filling your CD/DVDs? http://lars.werner.no/sizeme/
=====================
|
|
|
|
 |
|
 |
What do u mean doesnt work ? The demo is working fine under Windows 2003 server R2 (with the latest patches up to today). :|
|
|
|
|
 |
|
 |
Hello,
I want to know if it is possible to use this in order to put the button in all active applications.
I would be so grateful if you could send me some information about how I can do this...
Thanks in advance...
|
|
|
|
 |
|
 |
Do you have any code to support tooltips?
|
|
|
|
 |
|
 |
Hi
I am having a small problem. When I pop up another dialog (OpenFile)after closing this dialog, the buttons no longer work.
I have added a menu to your test code, and corrected as indicated in previous questions, and it works well!!! But when I use open from this menu, this new problem occurs.
Do you have any suggestions as to how to fix?
QTS!!!
|
|
|
|
 |
|
 |
I add a button in your test dlg,if use CFileDialog, same problem.
but if I just insert dialog in resource, the pop up, there is no problem.
code below:
// CFileDialog fileDlg(TRUE, NULL, NULL,OFN_HIDEREADONLY , L"All files(*.*)|*.*||", this);
// fileDlg.DoModal();
CTestDlg dlg;
dlg.DoModal();
|
|
|
|
 |
|
 |
Hello, I am trying to modify this class to be aregular button, not push nor checkbox button, but just simple regular button.
To ensure proper behaviour I need to handle MOUSELEAVE of the button or NCMOUSELEAVE of the parent window.
I placed a breakpoint at line where you catch the WM_NCMOUSELEAVE but this code is never executed (I move the mouse around, inside and outside the button and parent window).
Do you have any idea why the handling of WM_NCMOUSELEAVE does not work?
|
|
|
|
 |
|
 |
Interesting, I'm seeing this problem in C# on Windows XP. If I set the appearance of the OS to "Windows XP Style", I get the event. If I set the appearance to "Windows Classic Style", I do not get the event.
Unfortunately, I haven't found a solution to this yet!
Jen
|
|
|
|
 |
|
 |
for SetProp(hwnd, szPropName, (HANDLE)ctp)
isn't necessary ?
|
|
|
|
 |
|
 |
Hi,
I think you are right but where in this class is SetProp used?
x-bay wrote:
or SetProp(hwnd, szPropName, (HANDLE)ctp)
isn't necessary ?
best regards
Thomas
|
|
|
|
 |
|
 |
Hello again,
sorry I misunderstood your mail. I did not read the "or" right before the "SetProp". Thats why I thought I used SetProp and don't removed it.........
I made it without using of SetProp and it's working. So I think "Setprop" is not required. If I'm wrong then don't hesitate to correct me.
best regards
Thomas
|
|
|
|
 |
|
 |
SORRY ! Indeed, it's the wrong project I answered to.
|
|
|
|
 |
|
 |
Hi,
if there is only 1 button (to close the Dialog) I see a empty space between the close button and the added buttons.
Why this happens?
Tanks anyway for this cool piece of code !
Bye.
Piccinano
|
|
|
|
 |
|
 |
The area where normally click on the Button is shifted when i'm using a menu in Dialog. Is it normal?
BTW: Sorry for my bad english. I'm german.
|
|
|
|
 |
|
 |
Hi,
I've never tested the CCAptionButton with a menu. As soon as I find some time I will look at this bug! If you find a solution on your own, please let me know.
P.S.: I'm German too.
best regards
Thomas
|
|
|
|
 |
|
 |
I have changed the code in this way:
(maybe its not the best way, buts enough for me)
BOOL CCaptionButton::ButtonHitTest(CPoint point, BOOL bHover)
{
if(m_bActive && m_bEnable)
{
CPoint hitPoint;
::ScreenToClient(m_hWndCap, &point);
hitPoint.x = point.x + 4;
hitPoint.y = (point.y *(-1)) - 18; // *(-1) because the point.y has coordinates of
[...]
|
|
|
|
 |
|
 |
I find this bug too.
The problem is caused by "point.y *(-1)";
CPoint hitPoint;
::ScreenToClient(pManager->m_hWnd, &point); //Here covert the coordinate to the client But not relative to the window, so here we get y is negetive when in title bar.(Up to the client)
So I modify the code like this:
if(m_bEnable)
{
CPoint hitPoint;
::ScreenToClient(pManager->m_hWnd, &point);
hitPoint.x = point.x;
hitPoint.y = point.y + 20; //
// the client area (i.e. -12) and we need the point in the NC area (i.e. 12)
if(CWnd::FromHandle(m_hWndCap)->GetMenu()!=NULL){
hitPoint.y += 20;
}...
}
I don't think my solution is the best.
I hope there is a better way to get from "::ScreenToClient" to "::ScreenToWindow".
Thank you.
P.S. My English is also not satisfactory. I'm Chinese.
|
|
|
|
 |
|
 |
Here is a better improve.
if(m_bActive && m_bEnable)
{
CPoint hitPoint=point;
CRect rcWnd;
CWnd::FromHandle(m_hWndCap)->GetWindowRect(&rcWnd);
hitPoint.Offset(-rcWnd.TopLeft());
//Then we can use hitpoint directly
[...]
}
|
|
|
|
 |
|
|
 |
|
 |
Buttons disappear when user clicks with right button
inactive window. With left button almost the same, but buttons will appear later.
|
|
|
|
 |
|
 |
Hi,
Thank you for your message! Now I know what you mean! I'm working on it. Hopefully the next update will come soon and then this flickering/hiding will be gone.
best regards
Thomas
|
|
|
|
 |