mORMot and Open Source friends
Check-in [90b1a2a4b3]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
SHA1 Hash:90b1a2a4b3be5985b5083004dc9c42cb3fa293ec
Date: 2012-05-09 06:26:02
User: G018869
Comment:fixed compiler error when using the unit with runtime packages enabled (known compiler issue about string resources, referenced as E2201) - see http://stackoverflow.com/questions/10510428
Tags And Properties
Changes
hide diffs unified diffs patch

Changes to SynTaskDialog.pas

409 409 410 410 411 {$ifndef USETMSPACK} 411 {$ifndef USETMSPACK} 412 412 413 const 413 const 414 TD_ICONS: array[TTaskDialogIcon] of integer = ( 414 TD_ICONS: array[TTaskDialogIcon] of integer = ( 415 17, 84, 99, 98, 81, 0, 78); 415 17, 84, 99, 98, 81, 0, 78); 416 TD_ICONS_IDENT: array[TTaskDialogIcon] of string = ( < 417 '', SMsgDlgWarning, SMsgDlgConfirm, SMsgDlgError, SMsgDlgInformation, < 418 '', SMsgDlgInformation); < 419 TD_FOOTERICONS: array[TTaskDialogFooterIcon] of integer = ( 416 TD_FOOTERICONS: array[TTaskDialogFooterIcon] of integer = ( 420 17, 84, 99, 98, 65533, 65532); 417 17, 84, 99, 98, 65533, 65532); 421 WIN_ICONS: array[TTaskDialogIcon] of PChar = ( 418 WIN_ICONS: array[TTaskDialogIcon] of PChar = ( 422 nil, IDI_WARNING, IDI_QUESTION, IDI_ERROR, IDI_INFORMATION, nil, IDI_WINLOGO 419 nil, IDI_WARNING, IDI_QUESTION, IDI_ERROR, IDI_INFORMATION, nil, IDI_WINLOGO 423 WIN_FOOTERICONS: array[TTaskDialogFooterIcon] of PChar = ( 420 WIN_FOOTERICONS: array[TTaskDialogFooterIcon] of PChar = ( 424 nil, IDI_WARNING, IDI_QUESTION, IDI_ERROR, IDI_INFORMATION, IDI_WINLOGO); 421 nil, IDI_WARNING, IDI_QUESTION, IDI_ERROR, IDI_INFORMATION, IDI_WINLOGO); > 422 > 423 function IconMessage(Icon: TTaskDialogIcon): string; > 424 begin > 425 case Icon of > 426 tiWarning: result := SMsgDlgWarning; > 427 tiQuestion: result := SMsgDlgConfirm; > 428 tiError: result := SMsgDlgError; > 429 tiInformation, tiShield: result := SMsgDlgInformation; > 430 else result := ''; > 431 end; > 432 end; 425 433 426 procedure InitComCtl6; 434 procedure InitComCtl6; 427 var OSVersionInfo: TOSVersionInfo; 435 var OSVersionInfo: TOSVersionInfo; 428 begin 436 begin 429 OSVersionInfo.dwOSVersionInfoSize := sizeof(OSVersionInfo); 437 OSVersionInfo.dwOSVersionInfoSize := sizeof(OSVersionInfo); 430 GetVersionEx(OSVersionInfo); 438 GetVersionEx(OSVersionInfo); 431 if OSVersionInfo.dwMajorVersion<6 then 439 if OSVersionInfo.dwMajorVersion<6 then ................................................................................................................................................................................ 632 if aButtonDef=0 then 640 if aButtonDef=0 then 633 aButtonDef := mrOk; 641 aButtonDef := mrOk; 634 end; 642 end; 635 if Title='' then 643 if Title='' then 636 if Application.MainForm=nil then 644 if Application.MainForm=nil then 637 Title := Application.Title else 645 Title := Application.Title else 638 Title := Application.MainForm.Caption; 646 Title := Application.MainForm.Caption; 639 if (Inst='') and (TD_ICONS_IDENT[aDialogIcon]<>'') then | 647 if Inst='' then 640 Inst := TD_ICONS_IDENT[aDialogIcon]; | 648 Inst := IconMessage(aDialogIcon); 641 if aParent=0 then 649 if aParent=0 then 642 if Screen.ActiveCustomForm<>nil then 650 if Screen.ActiveCustomForm<>nil then 643 aParent := Screen.ActiveCustomForm.Handle else 651 aParent := Screen.ActiveCustomForm.Handle else 644 aParent := Application.Handle; 652 aParent := Application.Handle; 645 if Assigned(TaskDialogIndirect) and not aNonNative and 653 if Assigned(TaskDialogIndirect) and not aNonNative and 646 not (tdfQuery in aFlags) and (Selection='') then begin 654 not (tdfQuery in aFlags) and (Selection='') then begin 647 // use Vista/Seven TaskDialog implementation (not tdfQuery nor Selection) 655 // use Vista/Seven TaskDialog implementation (not tdfQuery nor Selection)