>From 58f730ef562895fd505d7d7289fb0e74d43b6e6a Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Wed, 24 Jun 2009 14:17:33 +0200 Subject: [PATCH] Fix DIALOGEX parsing --- transl/php/lib_res.php | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/transl/php/lib_res.php b/transl/php/lib_res.php index 0f963ed..ff877b0 100644 --- a/transl/php/lib_res.php +++ b/transl/php/lib_res.php @@ -638,16 +638,19 @@ class DialogResource extends Resource $this->Resource($header); $this->items = array(); - $signature = get_dword($data); - $this->extended = ($signature == 0xffff0001); + $temp = substr($data, 0, 4); + $signature = get_word($temp); + $dlgver = get_word($temp); + $this->extended = ($signature == 1 && $dlgver == 0xffff); if ($this->extended) /* DIALOGEX resource*/ { + $dummy = get_dword($data); $this->dwHelpId = get_dword($data); $this->exStyle = get_dword($data); $this->style = get_dword($data); } else /* DIALOG resource*/ { - $this->style = $signature; + $this->style = get_dword($data); $this->exStyle = get_dword($data); $this->dwHelpId = 0; } -- 1.6.0.6