Rev 2 | Rev 14 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2 | Rev 11 | ||
|---|---|---|---|
| Line 649... | Line 649... | ||
| 649 | // helper function for debug log file initialization |
649 | // helper function for debug log file initialization |
| 650 | 650 | ||
| 651 | FILE *fp; |
651 | FILE *fp; |
| 652 | 652 | ||
| 653 | // build the log file full qualified path name |
653 | // build the log file full qualified path name |
| 654 | swprintf_s (logfile_pathname, WCHAR_SIZEOF (logfile_pathname), L"%s |
654 | swprintf_s (logfile_pathname, WCHAR_SIZEOF (logfile_pathname), L"%s/%s", app_path, logfile_name); |
| 655 | 655 | ||
| 656 | // open it and erase it |
656 | // open it and erase it |
| 657 | _wfopen_s (&fp, logfile_pathname, L"wb"); |
657 | _wfopen_s (&fp, logfile_pathname, L"wb"); |
| 658 | if (fp != NULL) |
658 | if (fp != NULL) |
| 659 | { |
659 | { |
| Line 804... | Line 804... | ||
| 804 | // error code not found |
804 | // error code not found |
| 805 | return (L"Unknown error."); |
805 | return (L"Unknown error."); |
| 806 | } |
806 | } |
| 807 | 807 | ||
| 808 | 808 | ||
| - | 809 | HICON W32LoadIcon (const wchar_t *fmt, ...) |
|
| - | 810 | { |
|
| - | 811 | // this function loads an icon from a file into an icon handle. |
|
| - | 812 | ||
| - | 813 | static wchar_t icofile_pathname[MAX_PATH]; |
|
| - | 814 | va_list argptr; |
|
| - | 815 | ||
| - | 816 | // concatenate all the arguments in one string |
|
| - | 817 | va_start (argptr, fmt); |
|
| - | 818 | wvsprintf (icofile_pathname, fmt, argptr); |
|
| - | 819 | va_end (argptr); |
|
| - | 820 | ||
| - | 821 | // load the icon from file and return the resulting handle |
|
| - | 822 | return ((HICON) LoadImage (NULL, icofile_pathname, IMAGE_ICON, 0, 0, LR_LOADFROMFILE)); |
|
| - | 823 | } |
|
| - | 824 | ||
| - | 825 | ||
| - | 826 | HBITMAP W32LoadImage (const wchar_t *fmt, ...) |
|
| - | 827 | { |
|
| - | 828 | // this function loads an image from a file into a bitmap handle. |
|
| - | 829 | ||
| - | 830 | static wchar_t imgfile_pathname[MAX_PATH]; |
|
| - | 831 | va_list argptr; |
|
| - | 832 | ||
| - | 833 | // concatenate all the arguments in one string |
|
| - | 834 | va_start (argptr, fmt); |
|
| - | 835 | wvsprintf (imgfile_pathname, fmt, argptr); |
|
| - | 836 | va_end (argptr); |
|
| - | 837 | ||
| - | 838 | // load the image from file and return the resulting handle |
|
| - | 839 | return ((HBITMAP) LoadImage (NULL, imgfile_pathname, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE)); |
|
| - | 840 | } |
|