📄 bubblewindow.c
字号:
HWND createBubbleWindow(HINSTANCE hInstance, LPTSTR title, LPTSTR clss, int x, int y, int width, int height)
{
// Create the window
HWND hBubble = CreateWindowEx( WS_EX_TOOLWINDOW|WS_EX_TOPMOST,clss,title,WS_CLIPSIBLINGS,x,y,
width+2,height,NULL,NULL,hInstance,0 );
HDC hDC = GetDC( hBubble );
// Fill with a purple background
HBRUSH hBrush = CreateSolidBrush( RGB(255,0,255) );
HBRUSH hOldBr = (HBRUSH)SelectObject( hDC,hBrush );
Rectangle( hDC,0,0,width+2,height );
SelectObject( hDC,hOldBr );
DeleteObject( hBrush );
// Create the main part of the window
hBrush = CreateSolidBrush( RGB(0,0,0) );
hOldBr = (HBRUSH)SelectObject( hDC,hBrush);
RoundRect( hDC,1,11,width-2,height-11,6,6 );
SelectObject( hDC,hOldBr );
DeleteObject( hBrush );
// Create the arrow
Rectangle( hDC,width-22,0,width-17,11 );
Rectangle( hDC,width
// Leftmost pos is width - 17
// Create the region
ReleaseDC( hBubble,hDC );
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -