Loads the animation bitmaps for the button given Format: nameX where X is the frame #
| 431 | // Loads the animation bitmaps for the button given |
| 432 | // Format: nameX where X is the frame # |
| 433 | bool CBitmapButtonEx::AnimLoad(UINT nID, CWnd *parent) { |
| 434 | CString res_name, title; |
| 435 | int j; |
| 436 | |
| 437 | if (parent == NULL) |
| 438 | return FALSE; |
| 439 | |
| 440 | parent->GetDlgItemText(nID, title); |
| 441 | |
| 442 | OutputDebugString("title ="); |
| 443 | OutputDebugString(title); |
| 444 | OutputDebugString("\n"); |
| 445 | |
| 446 | // Allocate bitmap objects |
| 447 | if (m_NumAnimFrames == 0) |
| 448 | return FALSE; |
| 449 | m_AnimBitmaps = new CBitmap[m_NumAnimFrames]; |
| 450 | if (m_AnimBitmaps == NULL) |
| 451 | return FALSE; |
| 452 | |
| 453 | // Load in the bitmaps |
| 454 | for (j = 0; j < m_NumAnimFrames; j++) { |
| 455 | res_name.Format("%s%d", title, j); |
| 456 | GetBitmapAndPalette(res_name, &m_AnimBitmaps[j], NULL); |
| 457 | } |
| 458 | |
| 459 | return (TRUE); |
| 460 | } |
| 461 | |
| 462 | // Lights/un-Lights the button |
| 463 | void CBitmapButtonEx::Light(bool bLight) { m_MouseOverBtn = (bLight) ? TRUE : FALSE; } |
nothing calls this directly
no test coverage detected