Что тут не так?
#include "resource.h"
LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM);
BOOL CALLBACK MAINW(HWND,UINT,WPARAM,LPARAM);
HINSTANCE hih;
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
char cname[]="m_class";
char title[]="RETEG ALPHA";
WNDCLASS wc;
HWND hWnd;
MSG msg;
//структура для регистрации класса окон
wc.style = 0;
wc.lpfnWndProc = (WNDPROC)WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground= (HBRUSH)(COLOR_WINDOW+15);
wc.lpszMenuName = 0;
wc.lpszClassName= cname;
//Регистрация класса окна
if(!RegisterClass(&wc)) return 1;
hWnd = CreateWindow(
cname,
title,
WS_OVERLAPPEDWINDOW,
0,
0,
500,
400,
NULL,
NULL,
hInstance,
NULL);
if(!hWnd) return 2;
ShowWindow(hWnd,nCmdShow);
UpdateWindow(hWnd);
while(GetMessage(&msg,NULL,0,0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return 0;
};
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_CREATE:
if(DialogBox(hih,(char*)IDD_MAIN,hWnd,MAINW)==1) DestroyWindow(hWnd);
break;
case WM_PAINT:
break;
case WM_CHAR:
if(LOWORD(wParam)==27)
{
DestroyWindow(hWnd);
}
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default: DefWindowProc(hWnd, message, wParam, lParam);
};
return 0;
}
BOOL CALLBACK MAINW(HWND hwndD, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_INITDIALOG:
break;
case WM_CLOSE:
EndDialog(hwndD,0);
break;
case WM_COMMAND:
if(LOWORD(wParam)==IDC_START)
{
EndDialog(hwndD,0);
};
if(LOWORD(wParam)==IDC_EXIT)
{
EndDialog(hwndD,0);
return 1;
}
break;
};
return 0;
}
'kernel_reteg_1.0apha.exe': Loaded 'D:\Documents and Settings\root\Мои документы\Visual Studio 2005\Projects\kernel_reteg_1.0apha\debug\kernel_reteg_1.0apha.exe', Symbols loaded.
'kernel_reteg_1.0apha.exe': Loaded 'D:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'kernel_reteg_1.0apha.exe': Loaded 'D:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'kernel_reteg_1.0apha.exe': Loaded 'D:\WINDOWS\system32\user32.dll', No symbols loaded.
'kernel_reteg_1.0apha.exe': Loaded 'D:\WINDOWS\system32\gdi32.dll', No symbols loaded.
'kernel_reteg_1.0apha.exe': Loaded 'D:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll', Symbols loaded.
'kernel_reteg_1.0apha.exe': Loaded 'D:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
'kernel_reteg_1.0apha.exe': Loaded 'D:\WINDOWS\system32\imm32.dll', No symbols loaded.
'kernel_reteg_1.0apha.exe': Loaded 'D:\WINDOWS\system32\advapi32.dll', No symbols loaded.
'kernel_reteg_1.0apha.exe': Loaded 'D:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
'kernel_reteg_1.0apha.exe': Loaded 'D:\WINDOWS\system32\lpk.dll', No symbols loaded.
'kernel_reteg_1.0apha.exe': Loaded 'D:\WINDOWS\system32\usp10.dll', No symbols loaded.
'kernel_reteg_1.0apha.exe': Loaded 'D:\Program Files\Agnitum\Outpost Firewall\wl_hook.dll', No symbols loaded.
'kernel_reteg_1.0apha.exe': Unloaded 'D:\Program Files\Agnitum\Outpost Firewall\wl_hook.dll'
'kernel_reteg_1.0apha.exe': Loaded 'D:\WINDOWS\system32\uxtheme.dll', No symbols loaded.
'kernel_reteg_1.0apha.exe': Loaded 'D:\WINDOWS\system32\MSCTF.dll', No symbols loaded.
The program '[4064] kernel_reteg_1.0apha.exe: Native' has exited with code 2 (0x2).
Извините нашел, return пропустил