mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:36:11 +00:00
fixed some warnings
svn path=/trunk/; revision=25206
This commit is contained in:
parent
14847ebfcf
commit
deecf156b8
21 changed files with 90 additions and 90 deletions
|
@ -63,7 +63,7 @@ void UpdateMenu(HWND, HMENU);
|
||||||
BOOL InsertListViewItems();
|
BOOL InsertListViewItems();
|
||||||
void PositionHeader();
|
void PositionHeader();
|
||||||
|
|
||||||
void CreateButtons();
|
void CreateButtons(HINSTANCE hInstance, HWND hwndParent);
|
||||||
void ListByClass();
|
void ListByClass();
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
@ -654,7 +654,7 @@ void InsertIntoListView(int typ, LPTSTR name, LPTSTR intern_name)
|
||||||
item.iSubItem = 0;
|
item.iSubItem = 0;
|
||||||
item.state = 0;
|
item.state = 0;
|
||||||
//item.statemask = 0;
|
//item.statemask = 0;
|
||||||
item.pszText=malloc(10);
|
item.pszText = (char*) malloc(10);
|
||||||
if (typ>=1)
|
if (typ>=1)
|
||||||
{
|
{
|
||||||
sprintf(temp,"%i",typ);
|
sprintf(temp,"%i",typ);
|
||||||
|
|
|
@ -14,7 +14,7 @@ AboutDialogProc(HWND hDlg,
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
|
|
||||||
hIcon = LoadImage(hInstance,
|
hIcon = (HICON) LoadImage(hInstance,
|
||||||
MAKEINTRESOURCE(IDI_IMAGESOFTICON),
|
MAKEINTRESOURCE(IDI_IMAGESOFTICON),
|
||||||
IMAGE_ICON,
|
IMAGE_ICON,
|
||||||
16,
|
16,
|
||||||
|
|
|
@ -120,7 +120,7 @@ Bri_OnInitDialog(PIMAGEADJUST pImgAdj,
|
||||||
HWND hDlg,
|
HWND hDlg,
|
||||||
LPARAM lParam)
|
LPARAM lParam)
|
||||||
{
|
{
|
||||||
pImgAdj = HeapAlloc(ProcessHeap,
|
pImgAdj = (IMAGEADJUST*) HeapAlloc(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
sizeof(IMAGEADJUST));
|
sizeof(IMAGEADJUST));
|
||||||
if (!pImgAdj)
|
if (!pImgAdj)
|
||||||
|
@ -137,7 +137,7 @@ Bri_OnInitDialog(PIMAGEADJUST pImgAdj,
|
||||||
&pImgAdj->ImageRect);
|
&pImgAdj->ImageRect);
|
||||||
|
|
||||||
/* Make a static copy of the main image */
|
/* Make a static copy of the main image */
|
||||||
pImgAdj->hBitmap = CopyImage(pImgAdj->Info->ImageEditors->hBitmap,
|
pImgAdj->hBitmap = (HBITMAP) CopyImage(pImgAdj->Info->ImageEditors->hBitmap,
|
||||||
IMAGE_BITMAP,
|
IMAGE_BITMAP,
|
||||||
pImgAdj->ImageRect.right,
|
pImgAdj->ImageRect.right,
|
||||||
pImgAdj->ImageRect.bottom,
|
pImgAdj->ImageRect.bottom,
|
||||||
|
@ -146,7 +146,7 @@ Bri_OnInitDialog(PIMAGEADJUST pImgAdj,
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
/* Make a copy which will be updated */
|
/* Make a copy which will be updated */
|
||||||
pImgAdj->hPreviewBitmap = CopyImage(pImgAdj->Info->ImageEditors->hBitmap,
|
pImgAdj->hPreviewBitmap = (HBITMAP) CopyImage(pImgAdj->Info->ImageEditors->hBitmap,
|
||||||
IMAGE_BITMAP,
|
IMAGE_BITMAP,
|
||||||
pImgAdj->ImageRect.right,
|
pImgAdj->ImageRect.right,
|
||||||
pImgAdj->ImageRect.bottom,
|
pImgAdj->ImageRect.bottom,
|
||||||
|
|
|
@ -121,7 +121,7 @@ Cont_OnInitDialog(PIMAGEADJUST pImgAdj,
|
||||||
HWND hDlg,
|
HWND hDlg,
|
||||||
LPARAM lParam)
|
LPARAM lParam)
|
||||||
{
|
{
|
||||||
pImgAdj = HeapAlloc(ProcessHeap,
|
pImgAdj = (IMAGEADJUST*) HeapAlloc(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
sizeof(IMAGEADJUST));
|
sizeof(IMAGEADJUST));
|
||||||
if (!pImgAdj)
|
if (!pImgAdj)
|
||||||
|
@ -138,7 +138,7 @@ Cont_OnInitDialog(PIMAGEADJUST pImgAdj,
|
||||||
&pImgAdj->ImageRect);
|
&pImgAdj->ImageRect);
|
||||||
|
|
||||||
/* Make a static copy of the main image */
|
/* Make a static copy of the main image */
|
||||||
pImgAdj->hBitmap = CopyImage(pImgAdj->Info->ImageEditors->hBitmap,
|
pImgAdj->hBitmap = (HBITMAP) CopyImage(pImgAdj->Info->ImageEditors->hBitmap,
|
||||||
IMAGE_BITMAP,
|
IMAGE_BITMAP,
|
||||||
pImgAdj->ImageRect.right,
|
pImgAdj->ImageRect.right,
|
||||||
pImgAdj->ImageRect.bottom,
|
pImgAdj->ImageRect.bottom,
|
||||||
|
@ -147,7 +147,7 @@ Cont_OnInitDialog(PIMAGEADJUST pImgAdj,
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
/* Make a copy which will be updated */
|
/* Make a copy which will be updated */
|
||||||
pImgAdj->hPreviewBitmap = CopyImage(pImgAdj->Info->ImageEditors->hBitmap,
|
pImgAdj->hPreviewBitmap = (HBITMAP) CopyImage(pImgAdj->Info->ImageEditors->hBitmap,
|
||||||
IMAGE_BITMAP,
|
IMAGE_BITMAP,
|
||||||
pImgAdj->ImageRect.right,
|
pImgAdj->ImageRect.right,
|
||||||
pImgAdj->ImageRect.bottom,
|
pImgAdj->ImageRect.bottom,
|
||||||
|
|
|
@ -88,8 +88,8 @@ FlatComboProc(HWND hwnd,
|
||||||
pt[2].x = pt[1].x - 2;
|
pt[2].x = pt[1].x - 2;
|
||||||
pt[2].y = pt[1].y + 2;
|
pt[2].y = pt[1].y + 2;
|
||||||
|
|
||||||
oldPen = SelectObject(hdc, GetStockPen(WHITE_PEN));
|
oldPen = (HPEN) SelectObject(hdc, GetStockPen(WHITE_PEN));
|
||||||
oldBrush = SelectObject(hdc, GetStockBrush(WHITE_BRUSH));
|
oldBrush = (HBRUSH) SelectObject(hdc, GetStockBrush(WHITE_BRUSH));
|
||||||
Polygon(hdc, pt, 3);
|
Polygon(hdc, pt, 3);
|
||||||
|
|
||||||
SelectObject(hdc, oldPen);
|
SelectObject(hdc, oldPen);
|
||||||
|
@ -112,7 +112,7 @@ FlatComboProc(HWND hwnd,
|
||||||
pt[2].x = pt[1].x - 2;
|
pt[2].x = pt[1].x - 2;
|
||||||
pt[2].y = pt[1].y + 2;
|
pt[2].y = pt[1].y + 2;
|
||||||
|
|
||||||
oldBrush = SelectObject(hdc, GetStockBrush(BLACK_BRUSH));
|
oldBrush = (HBRUSH) SelectObject(hdc, GetStockBrush(BLACK_BRUSH));
|
||||||
Polygon(hdc, pt, 3);
|
Polygon(hdc, pt, 3);
|
||||||
|
|
||||||
SelectObject(hdc, oldBrush);
|
SelectObject(hdc, oldBrush);
|
||||||
|
|
|
@ -185,7 +185,7 @@ FloatToolbarCreateColorsGui(PMAIN_WND_INFO Info)
|
||||||
WS_CHILD | WS_VISIBLE | CBS_DROPDOWN,
|
WS_CHILD | WS_VISIBLE | CBS_DROPDOWN,
|
||||||
2,
|
2,
|
||||||
2,
|
2,
|
||||||
rect.right * 0.65,
|
(int) (rect.right * 0.65),
|
||||||
rect.bottom - 2,
|
rect.bottom - 2,
|
||||||
Info->fltColors->hSelf,
|
Info->fltColors->hSelf,
|
||||||
NULL,
|
NULL,
|
||||||
|
|
|
@ -88,7 +88,7 @@ FillFontSizeComboList(HWND hwndCombo)
|
||||||
INT cursize = 12;
|
INT cursize = 12;
|
||||||
INT i, count, nearest = 0;
|
INT i, count, nearest = 0;
|
||||||
|
|
||||||
HFONT hFont = GetStockObject(DEFAULT_GUI_FONT);
|
HFONT hFont = (HFONT) GetStockObject(DEFAULT_GUI_FONT);
|
||||||
|
|
||||||
SendMessage(hwndCombo,
|
SendMessage(hwndCombo,
|
||||||
WM_SETFONT,
|
WM_SETFONT,
|
||||||
|
@ -146,7 +146,7 @@ FillFontStyleComboList(HWND hwndCombo)
|
||||||
LOGFONT lf;
|
LOGFONT lf;
|
||||||
|
|
||||||
/* FIXME: draw each font in its own style */
|
/* FIXME: draw each font in its own style */
|
||||||
HFONT hFont = GetStockObject(DEFAULT_GUI_FONT);
|
HFONT hFont = (HFONT) GetStockObject(DEFAULT_GUI_FONT);
|
||||||
SendMessage(hwndCombo,
|
SendMessage(hwndCombo,
|
||||||
WM_SETFONT,
|
WM_SETFONT,
|
||||||
(WPARAM)hFont,
|
(WPARAM)hFont,
|
||||||
|
|
|
@ -129,8 +129,8 @@ userlist(int argc, char **argv)
|
||||||
int iErr;
|
int iErr;
|
||||||
|
|
||||||
|
|
||||||
if ((nargv = malloc((argc+1) * sizeof(char *))) == NULL ||
|
if ((nargv = (char**) malloc((argc+1) * sizeof(char *))) == NULL ||
|
||||||
(used = calloc(argc, sizeof(int))) == NULL)
|
(used = (int*) calloc(argc, sizeof(int))) == NULL)
|
||||||
err(1, NULL);
|
err(1, NULL);
|
||||||
|
|
||||||
/* Pull out all network requests into nargv. */
|
/* Pull out all network requests into nargv. */
|
||||||
|
|
|
@ -378,7 +378,7 @@ static LRESULT WINAPI NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam,
|
||||||
case WM_DROPFILES:
|
case WM_DROPFILES:
|
||||||
{
|
{
|
||||||
WCHAR szFileName[MAX_PATH];
|
WCHAR szFileName[MAX_PATH];
|
||||||
HANDLE hDrop = (HANDLE) wParam;
|
HDROP hDrop = (HDROP) wParam;
|
||||||
|
|
||||||
DragQueryFile(hDrop, 0, szFileName, SIZEOF(szFileName));
|
DragQueryFile(hDrop, 0, szFileName, SIZEOF(szFileName));
|
||||||
DragFinish(hDrop);
|
DragFinish(hDrop);
|
||||||
|
@ -530,7 +530,7 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
|
||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
HACCEL hAccel;
|
HACCEL hAccel;
|
||||||
WNDCLASSEX class;
|
WNDCLASSEX wndclass;
|
||||||
static const WCHAR className[] = {'N','P','C','l','a','s','s',0};
|
static const WCHAR className[] = {'N','P','C','l','a','s','s',0};
|
||||||
static const WCHAR winName[] = {'N','o','t','e','p','a','d',0};
|
static const WCHAR winName[] = {'N','o','t','e','p','a','d',0};
|
||||||
|
|
||||||
|
@ -543,19 +543,19 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
|
||||||
Globals.hInstance = hInstance;
|
Globals.hInstance = hInstance;
|
||||||
LoadSettings();
|
LoadSettings();
|
||||||
|
|
||||||
ZeroMemory(&class, sizeof(class));
|
ZeroMemory(&wndclass, sizeof(wndclass));
|
||||||
class.cbSize = sizeof(class);
|
wndclass.cbSize = sizeof(wndclass);
|
||||||
class.lpfnWndProc = NOTEPAD_WndProc;
|
wndclass.lpfnWndProc = NOTEPAD_WndProc;
|
||||||
class.hInstance = Globals.hInstance;
|
wndclass.hInstance = Globals.hInstance;
|
||||||
class.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_NPICON));
|
wndclass.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_NPICON));
|
||||||
class.hCursor = LoadCursor(0, IDC_ARROW);
|
wndclass.hCursor = LoadCursor(0, IDC_ARROW);
|
||||||
class.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
|
wndclass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
|
||||||
class.lpszMenuName = MAKEINTRESOURCE(MAIN_MENU);
|
wndclass.lpszMenuName = MAKEINTRESOURCE(MAIN_MENU);
|
||||||
class.lpszClassName = className;
|
wndclass.lpszClassName = className;
|
||||||
class.hIconSm = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_NPICON),
|
wndclass.hIconSm = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_NPICON),
|
||||||
IMAGE_ICON, 16, 16, 0);
|
IMAGE_ICON, 16, 16, 0);
|
||||||
|
|
||||||
if (!RegisterClassEx(&class)) return FALSE;
|
if (!RegisterClassEx(&wndclass)) return FALSE;
|
||||||
|
|
||||||
/* Setup windows */
|
/* Setup windows */
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
HANDLE hInstance;
|
HINSTANCE hInstance;
|
||||||
HWND hMainWnd;
|
HWND hMainWnd;
|
||||||
HWND hFindReplaceDlg;
|
HWND hFindReplaceDlg;
|
||||||
HWND hEdit;
|
HWND hEdit;
|
||||||
|
|
|
@ -245,12 +245,12 @@ int main( int argc, char **argv )
|
||||||
WCHAR **argvW;
|
WCHAR **argvW;
|
||||||
int i, j, Ret = 1;
|
int i, j, Ret = 1;
|
||||||
|
|
||||||
if ((argvW = malloc(argc * sizeof(WCHAR*))))
|
if ((argvW = (WCHAR**) malloc(argc * sizeof(WCHAR*))))
|
||||||
{
|
{
|
||||||
/* convert the arguments */
|
/* convert the arguments */
|
||||||
for (i = 0, j = 0; i < argc; i++)
|
for (i = 0, j = 0; i < argc; i++)
|
||||||
{
|
{
|
||||||
if (!(argvW[i] = malloc((strlen(argv[i]) + 1) * sizeof(WCHAR))))
|
if (!(argvW[i] = (WCHAR*) malloc((strlen(argv[i]) + 1) * sizeof(WCHAR))))
|
||||||
{
|
{
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
|
|
||||||
hIcon = LoadImage(hInstance,
|
hIcon = (HICON) LoadImage(hInstance,
|
||||||
MAKEINTRESOURCE(IDI_SM_ICON),
|
MAKEINTRESOURCE(IDI_SM_ICON),
|
||||||
IMAGE_ICON,
|
IMAGE_ICON,
|
||||||
16,
|
16,
|
||||||
|
|
|
@ -92,7 +92,7 @@ GetDataFromDialog(PCREATE_DATA Data)
|
||||||
iLen = GetWindowTextLength(hwnd);
|
iLen = GetWindowTextLength(hwnd);
|
||||||
if (iLen != 0)
|
if (iLen != 0)
|
||||||
{
|
{
|
||||||
Data->ServiceName = HeapAlloc(ProcessHeap,
|
Data->ServiceName = (TCHAR*) HeapAlloc(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(iLen+1) * sizeof(TCHAR));
|
(iLen+1) * sizeof(TCHAR));
|
||||||
if (Data->ServiceName != NULL)
|
if (Data->ServiceName != NULL)
|
||||||
|
@ -122,7 +122,7 @@ GetDataFromDialog(PCREATE_DATA Data)
|
||||||
iLen = GetWindowTextLength(hwnd);
|
iLen = GetWindowTextLength(hwnd);
|
||||||
if (iLen != 0)
|
if (iLen != 0)
|
||||||
{
|
{
|
||||||
Data->DisplayName = HeapAlloc(ProcessHeap,
|
Data->DisplayName = (TCHAR*) HeapAlloc(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(iLen+1) * sizeof(TCHAR));
|
(iLen+1) * sizeof(TCHAR));
|
||||||
if (Data->DisplayName != NULL)
|
if (Data->DisplayName != NULL)
|
||||||
|
@ -152,7 +152,7 @@ GetDataFromDialog(PCREATE_DATA Data)
|
||||||
iLen = GetWindowTextLength(hwnd);
|
iLen = GetWindowTextLength(hwnd);
|
||||||
if (iLen != 0)
|
if (iLen != 0)
|
||||||
{
|
{
|
||||||
Data->BinPath = HeapAlloc(ProcessHeap,
|
Data->BinPath = (TCHAR*) HeapAlloc(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(iLen+1) * sizeof(TCHAR));
|
(iLen+1) * sizeof(TCHAR));
|
||||||
if (Data->BinPath != NULL)
|
if (Data->BinPath != NULL)
|
||||||
|
@ -182,7 +182,7 @@ GetDataFromDialog(PCREATE_DATA Data)
|
||||||
iLen = GetWindowTextLength(hwnd);
|
iLen = GetWindowTextLength(hwnd);
|
||||||
if (iLen != 0)
|
if (iLen != 0)
|
||||||
{
|
{
|
||||||
Data->Description = HeapAlloc(ProcessHeap,
|
Data->Description = (TCHAR*) HeapAlloc(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(iLen+1) * sizeof(TCHAR));
|
(iLen+1) * sizeof(TCHAR));
|
||||||
if (Data->Description != NULL)
|
if (Data->Description != NULL)
|
||||||
|
@ -203,7 +203,7 @@ GetDataFromDialog(PCREATE_DATA Data)
|
||||||
iLen = GetWindowTextLength(hwnd);
|
iLen = GetWindowTextLength(hwnd);
|
||||||
if (iLen != 0)
|
if (iLen != 0)
|
||||||
{
|
{
|
||||||
Data->Options = HeapAlloc(ProcessHeap,
|
Data->Options = (TCHAR*) HeapAlloc(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(iLen+1) * sizeof(TCHAR));
|
(iLen+1) * sizeof(TCHAR));
|
||||||
if (Data->Options != NULL)
|
if (Data->Options != NULL)
|
||||||
|
@ -263,7 +263,7 @@ CreateHelpDialogProc(HWND hDlg,
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
hIcon = LoadImage(hInstance,
|
hIcon = (HICON) LoadImage(hInstance,
|
||||||
MAKEINTRESOURCE(IDI_SM_ICON),
|
MAKEINTRESOURCE(IDI_SM_ICON),
|
||||||
IMAGE_ICON,
|
IMAGE_ICON,
|
||||||
16,
|
16,
|
||||||
|
@ -318,7 +318,7 @@ CreateDialogProc(HWND hDlg,
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
hIcon = LoadImage(hInstance,
|
hIcon = (HICON) LoadImage(hInstance,
|
||||||
MAKEINTRESOURCE(IDI_SM_ICON),
|
MAKEINTRESOURCE(IDI_SM_ICON),
|
||||||
IMAGE_ICON,
|
IMAGE_ICON,
|
||||||
16,
|
16,
|
||||||
|
@ -340,7 +340,7 @@ CreateDialogProc(HWND hDlg,
|
||||||
{
|
{
|
||||||
PCREATE_DATA Data;
|
PCREATE_DATA Data;
|
||||||
|
|
||||||
Data = HeapAlloc(ProcessHeap,
|
Data = (PCREATE_DATA) HeapAlloc(ProcessHeap,
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
sizeof(CREATE_DATA));
|
sizeof(CREATE_DATA));
|
||||||
if (Data != NULL)
|
if (Data != NULL)
|
||||||
|
|
|
@ -71,7 +71,7 @@ DeleteDialogProc(HWND hDlg,
|
||||||
{
|
{
|
||||||
Info = (PMAIN_WND_INFO)lParam;
|
Info = (PMAIN_WND_INFO)lParam;
|
||||||
|
|
||||||
hIcon = LoadImage(hInstance,
|
hIcon = (HICON) LoadImage(hInstance,
|
||||||
MAKEINTRESOURCE(IDI_SM_ICON),
|
MAKEINTRESOURCE(IDI_SM_ICON),
|
||||||
IMAGE_ICON,
|
IMAGE_ICON,
|
||||||
16,
|
16,
|
||||||
|
|
|
@ -523,7 +523,7 @@ MainWndCommand(PMAIN_WND_INFO Info,
|
||||||
{
|
{
|
||||||
PPROP_DLG_INFO PropSheet;
|
PPROP_DLG_INFO PropSheet;
|
||||||
|
|
||||||
PropSheet = HeapAlloc(ProcessHeap,
|
PropSheet = (PROP_DLG_INFO*) HeapAlloc(ProcessHeap,
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
sizeof(PROP_DLG_INFO));
|
sizeof(PROP_DLG_INFO));
|
||||||
if (PropSheet != NULL)
|
if (PropSheet != NULL)
|
||||||
|
@ -998,7 +998,7 @@ CreateMainWindow(LPCTSTR lpCaption,
|
||||||
PMAIN_WND_INFO Info;
|
PMAIN_WND_INFO Info;
|
||||||
HWND hMainWnd = NULL;
|
HWND hMainWnd = NULL;
|
||||||
|
|
||||||
Info = HeapAlloc(ProcessHeap,
|
Info = (MAIN_WND_INFO*) HeapAlloc(ProcessHeap,
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
sizeof(MAIN_WND_INFO));
|
sizeof(MAIN_WND_INFO));
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ LengthOfStrResource(IN HINSTANCE hInst,
|
||||||
/* Find the string table block */
|
/* Find the string table block */
|
||||||
if ((hrSrc = FindResourceW(hInst, lpName, (LPWSTR)RT_STRING)) &&
|
if ((hrSrc = FindResourceW(hInst, lpName, (LPWSTR)RT_STRING)) &&
|
||||||
(hRes = LoadResource(hInst, hrSrc)) &&
|
(hRes = LoadResource(hInst, hrSrc)) &&
|
||||||
(lpStr = LockResource(hRes)))
|
(lpStr = (WCHAR*) LockResource(hRes)))
|
||||||
{
|
{
|
||||||
UINT x;
|
UINT x;
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ LoadAndFormatString(IN HINSTANCE hInstance,
|
||||||
uID) > 0)
|
uID) > 0)
|
||||||
{
|
{
|
||||||
va_start(lArgs, lpTarget);
|
va_start(lArgs, lpTarget);
|
||||||
/* let's use FormatMessage to format it because it has the ability to allocate
|
/* let's use Format to format it because it has the ability to allocate
|
||||||
memory automatically */
|
memory automatically */
|
||||||
Ret = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING,
|
Ret = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING,
|
||||||
lpFormat,
|
lpFormat,
|
||||||
|
@ -203,7 +203,7 @@ VOID GetError(VOID)
|
||||||
0,
|
0,
|
||||||
NULL );
|
NULL );
|
||||||
|
|
||||||
MessageBox(NULL, lpMsgBuf, _T("Error!"), MB_OK | MB_ICONERROR);
|
MessageBox(NULL, (LPCTSTR) lpMsgBuf, _T("Error!"), MB_OK | MB_ICONERROR);
|
||||||
|
|
||||||
LocalFree(lpMsgBuf);
|
LocalFree(lpMsgBuf);
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ InitImageList(UINT StartResource,
|
||||||
/* Add all icons to the image list */
|
/* Add all icons to the image list */
|
||||||
for (i = StartResource; i <= EndResource; i++)
|
for (i = StartResource; i <= EndResource; i++)
|
||||||
{
|
{
|
||||||
hBitmap = LoadImage(hInstance,
|
hBitmap = (HBITMAP) LoadImage(hInstance,
|
||||||
MAKEINTRESOURCE(i),
|
MAKEINTRESOURCE(i),
|
||||||
IMAGE_BITMAP,
|
IMAGE_BITMAP,
|
||||||
Width,
|
Width,
|
||||||
|
|
|
@ -68,7 +68,7 @@ ClearMixerCache(PSND_MIXER Mixer)
|
||||||
PSND_MIXER
|
PSND_MIXER
|
||||||
SndMixerCreate(HWND hWndNotification)
|
SndMixerCreate(HWND hWndNotification)
|
||||||
{
|
{
|
||||||
PSND_MIXER Mixer = HeapAlloc(GetProcessHeap(),
|
PSND_MIXER Mixer = (PSND_MIXER) HeapAlloc(GetProcessHeap(),
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
sizeof(SND_MIXER));
|
sizeof(SND_MIXER));
|
||||||
if (Mixer != NULL)
|
if (Mixer != NULL)
|
||||||
|
@ -115,7 +115,7 @@ SndMixerQueryControls(PSND_MIXER Mixer,
|
||||||
{
|
{
|
||||||
if (LineInfo->cControls > 0)
|
if (LineInfo->cControls > 0)
|
||||||
{
|
{
|
||||||
*Controls = HeapAlloc(GetProcessHeap(),
|
*Controls = (MIXERCONTROL*) HeapAlloc(GetProcessHeap(),
|
||||||
0,
|
0,
|
||||||
LineInfo->cControls * sizeof(MIXERCONTROL));
|
LineInfo->cControls * sizeof(MIXERCONTROL));
|
||||||
if (*Controls != NULL)
|
if (*Controls != NULL)
|
||||||
|
@ -128,7 +128,7 @@ SndMixerQueryControls(PSND_MIXER Mixer,
|
||||||
LineControls.dwLineID = LineInfo->dwLineID;
|
LineControls.dwLineID = LineInfo->dwLineID;
|
||||||
LineControls.cControls = LineInfo->cControls;
|
LineControls.cControls = LineInfo->cControls;
|
||||||
LineControls.cbmxctrl = sizeof(MIXERCONTROL);
|
LineControls.cbmxctrl = sizeof(MIXERCONTROL);
|
||||||
LineControls.pamxctrl = (PVOID)(*Controls);
|
LineControls.pamxctrl = (MIXERCONTROL*)(*Controls);
|
||||||
|
|
||||||
Result = mixerGetLineControls((HMIXEROBJ)Mixer->hmx,
|
Result = mixerGetLineControls((HMIXEROBJ)Mixer->hmx,
|
||||||
&LineControls,
|
&LineControls,
|
||||||
|
@ -206,7 +206,7 @@ SndMixerQueryConnections(PSND_MIXER Mixer,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con = HeapAlloc(GetProcessHeap(),
|
Con = (SND_MIXER_CONNECTION*) HeapAlloc(GetProcessHeap(),
|
||||||
0,
|
0,
|
||||||
sizeof(SND_MIXER_CONNECTION));
|
sizeof(SND_MIXER_CONNECTION));
|
||||||
if (Con != NULL)
|
if (Con != NULL)
|
||||||
|
@ -245,7 +245,7 @@ SndMixerQueryDestinations(PSND_MIXER Mixer)
|
||||||
{
|
{
|
||||||
PSND_MIXER_DESTINATION Line;
|
PSND_MIXER_DESTINATION Line;
|
||||||
|
|
||||||
Line = HeapAlloc(GetProcessHeap(),
|
Line = (SND_MIXER_DESTINATION*) HeapAlloc(GetProcessHeap(),
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
sizeof(SND_MIXER_DESTINATION));
|
sizeof(SND_MIXER_DESTINATION));
|
||||||
if (Line != NULL)
|
if (Line != NULL)
|
||||||
|
|
|
@ -36,7 +36,7 @@ InitEditWnd(PEDIT_WND_INFO Info)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
hfDefault = GetStockObject(DEFAULT_GUI_FONT);
|
hfDefault = (HFONT) GetStockObject(DEFAULT_GUI_FONT);
|
||||||
SendMessage(Info->hEdit,
|
SendMessage(Info->hEdit,
|
||||||
WM_SETFONT,
|
WM_SETFONT,
|
||||||
(WPARAM)hfDefault,
|
(WPARAM)hfDefault,
|
||||||
|
@ -135,7 +135,7 @@ CreateEditWindow(struct _MAIN_WND_INFO *MainWnd,
|
||||||
PEDIT_WND_INFO Info;
|
PEDIT_WND_INFO Info;
|
||||||
HWND hWndEditor;
|
HWND hWndEditor;
|
||||||
|
|
||||||
Info = HeapAlloc(ProcessHeap,
|
Info = (EDIT_WND_INFO*) HeapAlloc(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
sizeof(EDIT_WND_INFO));
|
sizeof(EDIT_WND_INFO));
|
||||||
if (Info != NULL)
|
if (Info != NULL)
|
||||||
|
|
|
@ -578,7 +578,7 @@ CreateMainWindow(LPCTSTR lpCaption,
|
||||||
PMAIN_WND_INFO Info;
|
PMAIN_WND_INFO Info;
|
||||||
HWND hMainWnd = NULL;
|
HWND hMainWnd = NULL;
|
||||||
|
|
||||||
Info = HeapAlloc(ProcessHeap,
|
Info = (MAIN_WND_INFO*) HeapAlloc(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
sizeof(MAIN_WND_INFO));
|
sizeof(MAIN_WND_INFO));
|
||||||
if (Info != NULL)
|
if (Info != NULL)
|
||||||
|
|
|
@ -19,7 +19,7 @@ LengthOfStrResource(IN HINSTANCE hInst,
|
||||||
/* Find the string table block */
|
/* Find the string table block */
|
||||||
if ((hrSrc = FindResourceW(hInst, lpName, (LPWSTR)RT_STRING)) &&
|
if ((hrSrc = FindResourceW(hInst, lpName, (LPWSTR)RT_STRING)) &&
|
||||||
(hRes = LoadResource(hInst, hrSrc)) &&
|
(hRes = LoadResource(hInst, hrSrc)) &&
|
||||||
(lpStr = LockResource(hRes)))
|
(lpStr = (WCHAR*) LockResource(hRes)))
|
||||||
{
|
{
|
||||||
UINT x;
|
UINT x;
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ VOID GetError(DWORD err)
|
||||||
0,
|
0,
|
||||||
NULL );
|
NULL );
|
||||||
|
|
||||||
MessageBox(NULL, lpMsgBuf, _T("Error!"), MB_OK | MB_ICONERROR);
|
MessageBox(NULL, (LPCTSTR) lpMsgBuf, _T("Error!"), MB_OK | MB_ICONERROR);
|
||||||
|
|
||||||
LocalFree(lpMsgBuf);
|
LocalFree(lpMsgBuf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ _tWinMain(HINSTANCE hThisInstance,
|
||||||
}
|
}
|
||||||
|
|
||||||
len = _tcslen(lpAppName) + _tcslen(lpVersion);
|
len = _tcslen(lpAppName) + _tcslen(lpVersion);
|
||||||
lpTitle = HeapAlloc(ProcessHeap,
|
lpTitle = (TCHAR*) HeapAlloc(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(len + 2) * sizeof(TCHAR));
|
(len + 2) * sizeof(TCHAR));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue