282{
284
285
287
288 RECT r;
290
295
296
297
298
300 {
302 HBRUSH brush = CreateSolidBrush(0x000000);
304 DeleteObject(brush);
305 }
306 else
307 {
309 HBRUSH brush = CreateSolidBrush(0xffffff);
311 DeleteObject(brush);
312
314 brush = CreateSolidBrush(0x000000);
316 DeleteObject(brush);
317 }
318
319
320
321
322 HFONT font = CreateFont(
dynamicFontHeight*
pSettings->
scalingFactorHiDPI, 0, 0, 0, FW_NORMAL,
false,
false,
false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE,
"Segoe UI");
325
327 {
328
329
330 DrawTextWithEffects(
cachedBackground,
popupTitleTextRect,
message.title, DT_CENTER | DT_TOP | DT_NOPREFIX | DT_WORD_ELLIPSIS, 0xffffff,
false, 0,
false, 0, 0, 0);
331
332
333 int buttonBorderWidth = 2;
335 MakeGradient(
cachedBackground,
popupYesRect,
B_SOLID, 0x000000, 0,
false, 0, 0, 0, 0x008800, buttonBorderWidth);
336 DrawTextWithEffects(
cachedBackground,
popupYesRect,
"Yes", DT_CENTER | DT_VCENTER | DT_NOPREFIX | DT_SINGLELINE, 0xffffff,
false, 0,
false, 0, 0, 0);
337 MakeGradient(
cachedBackground,
popupNoRect,
B_SOLID, 0x000000, 0,
false, 0, 0, 0, 0x000088, buttonBorderWidth);
338 DrawTextWithEffects(
cachedBackground,
popupNoRect,
"No", DT_CENTER | DT_VCENTER | DT_NOPREFIX | DT_SINGLELINE, 0xffffff,
false, 0,
false, 0, 0, 0);
339
340 }
341 else
342 {
343
344 DrawTextWithEffects(
cachedBackground,
popupTitleTextRect,
message.title, DT_LEFT | DT_VCENTER | DT_NOPREFIX | DT_SINGLELINE | DT_WORD_ELLIPSIS, 0xffffff,
false, 0,
false, 0, 0, 0);
345
346 DrawTextWithEffects(
cachedBackground,
popupBodyTextRect,
message.body, DT_LEFT | DT_TOP | DT_NOPREFIX | DT_WORD_ELLIPSIS, 0x000000,
false, 0,
false, 0, 0, 0);
347 }
348
350
351
352
353
355 {
356
357 HICON popupIcon;
358 RECT iconRect;
360
365
368 DeleteObject(popupIcon);
369 }
370
371
372
373
382
383
384
385 if (bufbmp) DeleteObject(bufbmp);
386
387 POINT pt;
389 POINT ptSrc;
390 ptSrc.x = 0, ptSrc.y = 0;
391
392 BLENDFUNCTION bf;
393 bf.BlendOp = AC_SRC_OVER;
394 bf.BlendFlags = 0;
395 bf.AlphaFormat = AC_SRC_ALPHA;
396 bf.SourceConstantAlpha = (unsigned char)255;
397
400
401
402
403
404
405
406
407
408
409
410
411}
void AlphaApply(HDC hdc, RECT rect)
Definition BBApi.cpp:2449
void AlphaCorner(HDC hdc, RECT rect, int corner, int bevelStyle, int bevelPosition, int bevelWidth, int borderWidth, unsigned char minAlpha, unsigned char maxAlpha)
Definition BBApi.cpp:2431
bool IsInString(LPCSTR inputString, LPCSTR searchString)
Definition BBApi.cpp:2519
void MakeGradient(HDC hdc, RECT rect, int type, COLORREF color1, COLORREF color2, bool interlaced, int bevelStyle, int bevelPosition, int bevelWidth, COLORREF borderColor, int borderWidth)
Definition BBApi.cpp:2156
void AlphaRect(HDC hdc, RECT rect, unsigned char alpha)
Definition BBApi.cpp:2419
void DrawTextWithEffects(HDC hdc, RECT r, LPSTR text, unsigned int format, COLORREF textColor, bool outline, COLORREF outlineColor, bool shadow, COLORREF shadowColor, int shadowX, int shadowY)
Definition BBApi.cpp:3519
Settings * pSettings
Definition Blackbox.cpp:46
void DrawSatHueIcon(HDC hdc, RECT r, HICON icon, int size, int saturation, int hue)
Definition BBApi.cpp:3765
#define B_SOLID
Definition BBApi.h:80
#define CORNER_BOTTOMRIGHT
Definition BBApi.h:128
#define CORNER_BOTTOMLEFT
Definition BBApi.h:127
#define CORNER_TOPLEFT
Definition BBApi.h:125
#define CORNER_TOPRIGHT
Definition BBApi.h:126
int scalingFactorHiDPI
Definition Settings.h:327