 Bohdan » 27.07.2006 17:08:27
 Bohdan » 27.07.2006 17:08:27 
			
			Подскажите плиз, почему не работает прога (аналогичное на с++ - запускается). 
компилю: ppcrossarm.exe test.pas
Test.pas:
{$MODE DELPHI}
uses windows,messages;
var 	hInstance	: dword;
const
 IDD_DIALOG1=129;
 IDM_OK=40000;
{$R test.RES}
function DialogProc(Wnd: HWND; Message: UINT; wParam: WPARAM; lParam: LPARAM): UINT stdcall;
begin
	result:=0;
	case Message of
		WM_CLOSE:  begin
	 		EndDialog ( wnd, 0 );
			Result:=1;
			end;
	 	WM_COMMAND: begin
			if ( wParam = IDM_OK) then begin
				SendMessage (wnd, WM_CLOSE, 0, 0);
			Result:=1;
 			end;
 		end;
	end;
end;
begin
 hInstance:=GetModuleHandle ( NIL ); 
 InitCommonControls ();
 DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), 0, @DialogProc);
end.
Test.rc:
#define IDD_DIALOG1 129
#define IDOK 40000
#define IDCANCEL 40001
IDD_DIALOG1 DIALOG  0, 0, 168, 223
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Shell Dlg"
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,111,7,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,111,24,50,14
END