PBM_SETMARQUEE不适用于垂直过程栏

PBM_SETMARQUEE is not working for vertical processbars?

本文关键字:垂直 过程 适用于 不适用 SETMARQUEE PBM      更新时间:2023-10-16

我已经在搜索和测试这个问题了,但我仍然无法让PBM_SETMARQUEE用于垂直过程栏的工作。它总是向我展示一个完全绿色的过程栏,但没有从底部到顶部移动绿色的"矩形"。某种程度上,如果我删除了pbs_vertical样式,那么我将获得一个水平进程栏,带有移动的绿色"从左到右"的矩形"矩形"。因此,PBM_SETMARQUEE适用于水平processbar,但不能用于垂直。对于ProcessBar,PBM_SETMARQUEE突然起作用O_O!?这是代码所需的部分(使用C 和Winapi):

//includes especially for the processbar
#include <CommCtrl.h>  
#include <Uxtheme.h>
#pragma comment( lib, "comctl32.lib")
#pragma comment( lib, "UxTheme.lib")
#pragma comment(linker,""/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"")
//code how i creat the processbar
INITCOMMONCONTROLSEX initCtrlEx;
initCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX);
initCtrlEx.dwICC = ICC_PROGRESS_CLASS;
if (InitCommonControlsEx(&initCtrlEx)){     
    hProcessBar = CreateWindowExA(
        NULL,
        PROGRESS_CLASSA,
        "",
        WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | PBS_VERTICAL,                                         
        10, 10,
        20, 250,
        hParent,
        (HMENU)id,
        hProgrammInstance,
        NULL
        );
}
//SetWindowTheme(hProcessBar, L"", L""); If i use this code then the  PBM_SETMARQUEE for vertical processbar works.. but cause i want the windowTheme style its not a good solution for me
DWORD style = GetWindowLongPtrA(hProcessBar, GWL_STYLE);
SetWindowLongPtrA(hProcessBar, GWL_STYLE, style | PBS_MARQUEE); //enable needed style for the  PBM_SETMARQUEE message. (i also tested it doing it directly in CreateWindowExA())
SendMessageA(hProcessBar, PBM_SETMARQUEE, TRUE, (LPARAM)30);//enable marquee mode

无话可说。微软没有实施垂直主题的字幕进度栏。大概他们觉得对他们没有需求。