============================================================================= Style_StrGetAlpha()
| 2564 | // Style_StrGetAlpha() |
| 2565 | // |
| 2566 | BOOL Style_StrGetAlpha ( LPCWSTR lpszStyle, int *i ) |
| 2567 | { |
| 2568 | WCHAR tch[256]; |
| 2569 | WCHAR *p; |
| 2570 | int iValue; |
| 2571 | int itok; |
| 2572 | if ( p = StrStrI ( lpszStyle, L"alpha:" ) ) { |
| 2573 | lstrcpy ( tch, p + CSTRLEN ( L"alpha:" ) ); |
| 2574 | if ( p = StrChr ( tch, L';' ) ) { |
| 2575 | *p = L'\0'; |
| 2576 | } |
| 2577 | TrimString ( tch ); |
| 2578 | itok = swscanf ( tch, L"%i", &iValue ); |
| 2579 | if ( itok == 1 ) { |
| 2580 | *i = min ( max ( SC_ALPHA_TRANSPARENT, iValue ), SC_ALPHA_OPAQUE ); |
| 2581 | return TRUE; |
| 2582 | } |
| 2583 | } |
| 2584 | return FALSE; |
| 2585 | } |
| 2586 | |
| 2587 | |
| 2588 | //============================================================================= |
no test coverage detected