Remove unneeded NULL casts.

This commit is contained in:
Francois Gouget 2004-12-22 15:13:20 +00:00 committed by Alexandre Julliard
parent 9db0e072b1
commit ee0344a4a2
42 changed files with 49 additions and 49 deletions

View File

@ -682,7 +682,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicBandImpl (LPCGUID lpcGUID, LPVOID* ppobj,
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBandImpl));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->UnknownVtbl = &DirectMusicBand_Unknown_Vtbl;

View File

@ -582,7 +582,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicBandTrack (LPCGUID lpcGUID, LPVOID *ppobj
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBandTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicBandTrack_Unknown_Vtbl;

View File

@ -522,7 +522,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicChordMapImpl (LPCGUID lpcGUID, LPVOID* pp
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicChordMapImpl));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->UnknownVtbl = &DirectMusicChordMap_Unknown_Vtbl;

View File

@ -265,7 +265,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicChordMapTrack (LPCGUID lpcGUID, LPVOID *p
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicChordMapTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicChordMapTrack_Unknown_Vtbl;

View File

@ -263,7 +263,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSignPostTrack (LPCGUID lpcGUID, LPVOID *p
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSignPostTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicSignPostTrack_Unknown_Vtbl;

View File

@ -631,7 +631,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicAudioPathImpl (LPCGUID lpcGUID, LPVOID* p
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicAudioPathImpl));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->UnknownVtbl = &DirectMusicAudioPath_Unknown_Vtbl;

View File

@ -596,7 +596,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicGraphImpl (LPCGUID lpcGUID, LPVOID* ppobj
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicGraphImpl));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->UnknownVtbl = &DirectMusicGraph_Unknown_Vtbl;

View File

@ -259,7 +259,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicLyricsTrack (LPCGUID lpcGUID, LPVOID *ppo
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicLyricsTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicLyricsTrack_Unknown_Vtbl;

View File

@ -259,7 +259,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicMarkerTrack (LPCGUID lpcGUID, LPVOID *ppo
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicMarkerTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicMarkerTrack_Unknown_Vtbl;

View File

@ -259,7 +259,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicParamControlTrack (LPCGUID lpcGUID, LPVOI
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicParamControlTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicParamControlTrack_Unknown_Vtbl;

View File

@ -87,7 +87,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicPatternTrackImpl (LPCGUID lpcGUID, LPVOID
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPatternTrackImpl));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->lpVtbl = &DirectMusicPatternTrack_Vtbl;

View File

@ -1283,7 +1283,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentImpl (LPCGUID lpcGUID, LPVOID* ppo
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSegment8Impl));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->UnknownVtbl = &DirectMusicSegment8_Unknown_Vtbl;

View File

@ -116,7 +116,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID, LPVOID
obj = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSegmentState8Impl));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->lpVtbl = &DirectMusicSegmentState8_Vtbl;

View File

@ -506,7 +506,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSegTriggerTrack (LPCGUID lpcGUID, LPVOID
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSegTriggerTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicSegTriggerTrack_Unknown_Vtbl;

View File

@ -259,7 +259,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSeqTrack (LPCGUID lpcGUID, LPVOID *ppobj,
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSeqTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicSeqTrack_Unknown_Vtbl;

View File

@ -259,7 +259,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSysExTrack (LPCGUID lpcGUID, LPVOID *ppob
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSysExTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicSysExTrack_Unknown_Vtbl;

View File

@ -393,7 +393,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicTempoTrack (LPCGUID lpcGUID, LPVOID *ppob
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicTempoTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicTempoTrack_Unknown_Vtbl;

View File

@ -264,7 +264,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicTimeSigTrack (LPCGUID lpcGUID, LPVOID *pp
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicTimeSigTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicTimeSigTrack_Unknown_Vtbl;

View File

@ -115,7 +115,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicobjImpl (LPCGUID lpcGUID, LPVOID *ppobj,
obj = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicTool8Impl));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->lpVtbl = &DirectMusicTool8_Vtbl;

View File

@ -265,7 +265,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicWaveTrack (LPCGUID lpcGUID, LPVOID *ppobj
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicWaveTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicWaveTrack_Unknown_Vtbl;

View File

@ -886,7 +886,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicContainerImpl (LPCGUID lpcGUID, LPVOID* p
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicContainerImpl));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->ContainerVtbl = &DirectMusicContainer_Container_Vtbl;

View File

@ -286,7 +286,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderFileStream (LPVOID* ppobj) {
TRACE("(%p)\n", ppobj);
obj = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(IDirectMusicLoaderFileStream));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->StreamVtbl = &DirectMusicLoaderFileStream_Stream_Vtbl;
@ -552,7 +552,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderResourceStream (LPVOID* ppobj) {
TRACE("(%p)\n", ppobj);
obj = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(IDirectMusicLoaderResourceStream));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->StreamVtbl = &DirectMusicLoaderResourceStream_Stream_Vtbl;
@ -810,7 +810,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderGenericStream (LPVOID* ppobj) {
TRACE("(%p)\n", ppobj);
obj = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(IDirectMusicLoaderGenericStream));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->StreamVtbl = &DirectMusicLoaderGenericStream_Stream_Vtbl;

View File

@ -259,7 +259,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicScriptTrack (LPCGUID lpcGUID, LPVOID *ppo
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicScriptTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicScriptTrack_Unknown_Vtbl;

View File

@ -259,7 +259,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicAuditionTrack (LPCGUID lpcGUID, LPVOID *p
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicAuditionTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicAuditionTrack_Unknown_Vtbl;

View File

@ -387,7 +387,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicChordTrack (LPCGUID lpcGUID, LPVOID *ppob
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicChordTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicChordTrack_Unknown_Vtbl;

View File

@ -321,7 +321,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicCommandTrack (LPCGUID lpcGUID, LPVOID *pp
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicCommandTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicCommandTrack_Unknown_Vtbl;

View File

@ -265,7 +265,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicMotifTrack (LPCGUID lpcGUID, LPVOID *ppob
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicMotifTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicMotifTrack_Unknown_Vtbl;

View File

@ -262,7 +262,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicMuteTrack (LPCGUID lpcGUID, LPVOID *ppobj
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicMuteTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicMuteTrack_Unknown_Vtbl;

View File

@ -1041,7 +1041,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicStyleImpl (LPCGUID lpcGUID, LPVOID* ppobj
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicStyle8Impl));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->UnknownVtbl = &DirectMusicStyle8_Unknown_Vtbl;

View File

@ -432,7 +432,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicStyleTrack (LPCGUID lpcGUID, LPVOID *ppob
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicStyleTrack));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
track->UnknownVtbl = &DirectMusicStyleTrack_Unknown_Vtbl;

View File

@ -155,7 +155,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicBufferImpl (LPCGUID lpcGUID, LPVOID* ppob
dmbuff = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBufferImpl));
if (NULL == dmbuff) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
dmbuff->lpVtbl = &DirectMusicBuffer_Vtbl;

View File

@ -742,7 +742,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicCollectionImpl (LPCGUID lpcGUID, LPVOID*
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicCollectionImpl));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->UnknownVtbl = &DirectMusicCollection_Unknown_Vtbl;

View File

@ -72,7 +72,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicDownloadImpl (LPCGUID lpcGUID, LPVOID* pp
dmdl = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicDownloadImpl));
if (NULL == dmdl) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
dmdl->lpVtbl = &DirectMusicDownload_Vtbl;

View File

@ -67,7 +67,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicDownloadedInstrumentImpl (LPCGUID lpcGUID
dmdlinst = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicDownloadedInstrumentImpl));
if (NULL == dmdlinst) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
dmdlinst->lpVtbl = &DirectMusicDownloadedInstrument_Vtbl;

View File

@ -118,7 +118,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicInstrumentImpl (LPCGUID lpcGUID, LPVOID*
dminst = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicInstrumentImpl));
if (NULL == dminst) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
dminst->UnknownVtbl = &DirectMusicInstrument_Unknown_Vtbl;

View File

@ -715,7 +715,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicWaveImpl (LPCGUID lpcGUID, LPVOID* ppobj,
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicWaveImpl));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->UnknownVtbl = &DirectMusicWave_Unknown_Vtbl;

View File

@ -438,7 +438,7 @@ HIC MSVIDEO_OpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode,
whic->driverId = (DWORD)MSVIDEO_SendMessage(whic, DRV_OPEN, 0, (DWORD)&icopen);
/* FIXME: What should we put here? */
whic->hdrv = (HDRVR)0;
whic->hdrv = NULL;
if (whic->driverId == 0)
{

View File

@ -1936,7 +1936,7 @@ HMENU WINAPI SHGetMenuFromID(HMENU hMenu, UINT uID)
mi.fMask = MIIM_SUBMENU;
if (!GetMenuItemInfoA(hMenu, uID, 0, &mi))
return (HMENU)NULL;
return NULL;
return mi.hSubMenu;
}
@ -2418,8 +2418,8 @@ HWND WINAPI SHCreateWorkerWindowA(LONG wndProc, HWND hWndParent, DWORD dwExStyle
wc.cbClsExtra = 0;
wc.cbWndExtra = 4;
wc.hInstance = shlwapi_hInstance;
wc.hIcon = (HICON)0;
wc.hCursor = LoadCursorA((HINSTANCE)0, (LPSTR)IDC_ARROW);
wc.hIcon = NULL;
wc.hCursor = LoadCursorA(NULL, (LPSTR)IDC_ARROW);
wc.hbrBackground = (HBRUSH)COLOR_BTNSHADOW;
wc.lpszMenuName = NULL;
wc.lpszClassName = szClass;
@ -2705,8 +2705,8 @@ HWND WINAPI SHCreateWorkerWindowW(LONG wndProc, HWND hWndParent, DWORD dwExStyle
wc.cbClsExtra = 0;
wc.cbWndExtra = 4;
wc.hInstance = shlwapi_hInstance;
wc.hIcon = (HICON)0;
wc.hCursor = LoadCursorA((HINSTANCE)0, (LPSTR)IDC_ARROW);
wc.hIcon = NULL;
wc.hCursor = LoadCursorA(NULL, (LPSTR)IDC_ARROW);
wc.hbrBackground = (HBRUSH)COLOR_BTNSHADOW;
wc.lpszMenuName = NULL;
wc.lpszClassName = szClass;

View File

@ -703,7 +703,7 @@ HMMIO WINAPI mmioOpenW(LPWSTR szFileName, MMIOINFO* lpmmioinfo,
{
INT len = WideCharToMultiByte( CP_ACP, 0, szFileName, -1, NULL, 0, NULL, NULL );
szFn = HeapAlloc( GetProcessHeap(), 0, len );
if (!szFn) return (HMMIO)NULL;
if (!szFn) return NULL;
WideCharToMultiByte( CP_ACP, 0, szFileName, -1, szFn, len, NULL, NULL );
}

View File

@ -52,7 +52,7 @@ static VOID TABLET_Register()
wndClass.lpfnWndProc = TABLET_WindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = 0;
wndClass.hCursor = (HCURSOR)NULL;
wndClass.hCursor = NULL;
wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW +1);
wndClass.lpszClassName = WC_TABLETCLASSNAME;
RegisterClassW(&wndClass);
@ -60,7 +60,7 @@ static VOID TABLET_Register()
static VOID TABLET_Unregister()
{
UnregisterClassW(WC_TABLETCLASSNAME, (HINSTANCE)NULL);
UnregisterClassW(WC_TABLETCLASSNAME, NULL);
}
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved)

View File

@ -573,7 +573,7 @@ LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
case WM_CREATE:
CreateWindowEx(0, szChildClass, _T("regedit child window"), WS_CHILD | WS_VISIBLE,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
hWnd, (HMENU)0, hInst, 0);
hWnd, NULL, hInst, 0);
break;
case WM_COMMAND:
if (!_CmdWndProc(hWnd, message, wParam, lParam))

View File

@ -181,7 +181,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
hAccel = LoadAccelerators(hInstance, (LPCTSTR)IDC_REGEDIT);
/* Main message loop */
while (GetMessage(&msg, (HWND)NULL, 0, 0)) {
while (GetMessage(&msg, NULL, 0, 0)) {
if (!TranslateAccelerator(hFrameWnd, hAccel, &msg)
&& !TranslateChildTabMessage(&msg)) {
TranslateMessage(&msg);