在c ++中使用win32 api创建应用栏? [英] Create app bar using win32 api in c++??
问题描述
有没有人知道如何使用win32 api创建应用栏。实际上我创建了应用栏窗口并使用EnumWIndows()我可以获取 所有打开的窗口及其句柄的
列表但我不知道如何访问所有打开的窗口的图标和我如何在应用栏窗口上推送他们的图标,如Windows任务栏?
Does any one know how to create app bar using win32 api .Actually I have created app bar window and using EnumWIndows() i am able fetch the list of all open windows and their handles but i don't know how can i access the icon of all open windows and how can i push their icons on app bar windows like windows task bar ?
请帮帮我!!!
推荐答案
我正在尝试这样,但是SendMessage
给出
我的错误代码87。
I am trying like this, but
SendMessage
gives me error code 87.
HWND button = CreateWindow(TEXT("button"), TEXT("Button"),
WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON,
80, 10, 100, 50,
hWnd, NULL, NULL, NULL);
HICON hIcon= reinterpret_cast<HICON>(::SendMessageW(whWnd, WM_GETICON, ICON_SMALL, 0));
SendMessage(button, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
where
whWnd 是一个打开的窗口句柄。
这篇关于在c ++中使用win32 api创建应用栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!