Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Updating property binded to EditBox


5 replies to this topic

igodunov

igodunov
  • Full Members
  • 61 posts

Posted 27 February 2006 - 13:16

I made a dialog form where user can set username in EditBox. Another way I supported is to choose user through standard IDsObjectPicker invoked in custom action binded to "browse" button on this form (after doing this action I call standard action, that set binded property to new value). It works if I simply use "browse" button - but, if I initially try to edit value in EditBox, later browsing for user doesn't set new value. These is two message in installer log:

-- this message caused by setting property atfer browsing for user
MSI © (E0:50) [14:57:52:406]: PROPERTY CHANGE: Adding SERVICE_USERNAME property. Its value is 'NewValue'.

-- I can't recognize what reason cause this action sad.gif
MSI © (E0:50) [14:57:54:843]: PROPERTY CHANGE: Deleting SERVICE_USERNAME property. Its current value is 'OldValue'.

Any suggestions?


igodunov

igodunov
  • Full Members
  • 61 posts

Posted 27 February 2006 - 14:39

I'm mistaken. Property successfully set to new value - but visible value in EditBox not. sad.gif

igodunov

igodunov
  • Full Members
  • 61 posts

Posted 27 February 2006 - 17:19

I found it's impossible to refresh EditBox value. So, I made following workaround:
in custom action call GetForegroundWindow, then find required control using FindWindowEx, finally update text in edit box using SendMessage(hwnd, WM_SETTEXT, NULL, szNewValue).
It works.

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 27 February 2006 - 22:20

The best known workaround is using a 'twin dialog'. Create an identical copy of the dialog (in InstallShield this is easy: just export, rename & import the dialog, newer versions even have a rename function).
Let the browse button activate the twin dialog, and vice versa.

Your workaround has a drawback, as it depends on the implementation of Windows Installer (read: may not work in older or newer versions).

igodunov

igodunov
  • Full Members
  • 61 posts

Posted 06 March 2006 - 12:39

I use dynamic msi generator, it's rather difficult to support such functionality for custom gui. So I prefer to use CAs for various workaraounds. smile.gif

igodunov

igodunov
  • Full Members
  • 61 posts

Posted 06 March 2006 - 12:42

>Your workaround has a drawback, as it depends on the implementation of Windows Installer (read: may not work in older or newer versions).

You are certainly right! New version of my generator will be able to handle such cases. wink.gif