PBM_SETMARQUEE不适用于垂直过程栏
PBM_SETMARQUEE is not working for vertical processbars?
我已经在搜索和测试这个问题了,但我仍然无法让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
无话可说。微软没有实施垂直主题的字幕进度栏。大概他们觉得对他们没有需求。
相关文章:
- 递归函数计算序列中的平方和(并输出过程)
- 是否删除在对象构造过程中创建的对象
- QScrollArea:由垂直滚动条引起的水平滚动条
- 垂直方向的 Gtk3+ 旋转按钮 (c/c++)
- 如何在鼠标挂钩过程中检测拖动
- 此测试()中发生了什么意外过程?为什么总是覆盖 ch[0 1 2..]?
- clang 插件:在编译过程中修改 AST
- 如何使变量从 x 到 y,然后从 y 返回到 x 并始终重复该过程
- 在C++中调用 MS SQL 存储过程
- 按钮悬停在 QT 中垂直布局的选项卡小部件中不起作用
- 阻塞信号会导致升压过程不起作用
- Adafruit 羽毛RFM69HCW在使用过程中会冻结,需要硬重置
- 使用提升过程获取 shell 命令的标准输出
- 附加到 gdb 会中断并且不会继续该过程
- 如何创建始终在线的过程?
- OnVScroll : 从 CSpinButtonCtrl 或垂直滚动条调用?
- 使用 Qt 测量过程的实际运行时间
- 如何在窗口过程方法中检测击键?
- 线程过程中的线程同步问题
- PBM_SETMARQUEE不适用于垂直过程栏