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.

Place Dialog

6 replies to this topic


  • Members
  • 2 posts

Posted 28 November 2001 - 21:07

I want to change the location of my dialogs so that they are not centered. I got some code that uses WinApi calls to get and set rect but they require the dialog handle. How do I get the handles for the standard dialogs?

Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

Posted 29 November 2001 - 14:59

You can get handles with the standard WinApi  FindWindow.  
However, that won't help you here because when you use a Sd Dialog, IShield transfers control to the function handling the Sd, which will only return control after the dialogbox has been derstroyed again.
Therefore, unless you rewrite the Sd function (I wouldn't recommend it), there isn't any point at which you can obtain a handle with which to reposition the dialog box.


(Edited by Ide Nentjes at 4:00 pm on Nov. 29, 2001)


  • Members
  • 744 posts

Posted 29 November 2001 - 16:35

PlaceWindow (nObject, nDx, nDy, nCorner);

for somethings but I can't believe one of the options is not for the sddialogs.


  • Members
  • 2 posts

Posted 01 December 2001 - 04:09

I ended up calling the dialog myself, It is defined in the isUser dll. Here is the code I wrote. Quite a lot of code for such a little operation. I hope they add the standard dialogs to PlaceWindow in the future.

   szDialogName = "TestDialog";
   EzDefineDialog (szDialogName, "", "", SD_NDLG_WELCOME);  
   bCancel = FALSE;
   bNext = FALSE;    
   nVal = WaitOnDialog (szDialogName);
   switch ( nVal )
case 9:
       bCancel = TRUE;  
case 1:
bNext = TRUE;

case DLG_INIT:
wWinHnd = CmdGetHwndDlg (szDialogName);
GetExtents (nvDx, nvDy);
_WinSubGetWindowRect  ( wWinHnd, nOX, nOY, nSX, nSY );
nDlgWidth  = nSX - nOX;
nDlgHeight = nSY - nOY;
nDlgPositionx = (nvDx - nDlgWidth) -10;
nDlgPositiony = (nvDy - nDlgHeight) -10;
_WinSubSetWindowPos ( wWinHnd, nDlgPositionx, nDlgPositiony, 0, 0, SWP_NOSIZE );

  until ( bCancel || bNext );
EndDialog (szDialogName);
ReleaseDialog (szDialogName);  


  • Full Members
  • 3 posts

Posted 02 February 2010 - 09:29


I have implemented this method in InstallShield version 2008 and it worked perfectly fine till date with 2008. However, the major concern I am having is related to the same problem in version 2010 of InstallShield Premier.

The moment I upgraded from 2008 to 2010, I started getting error about the SD dialog files (SdWelome.rul etc) I had copied from the the InstallShield folder. Now, I can't find these files in the current version (2010). Therefore, I can't customize this behaviour. DO you have any idea why this can't be achived in 2010?

I appreciate your effort and I have seen a couple of posts from you related to this. Could you please suggest a solution to this problem in version 2010? Also, I can't find the file "isUSER.dll" in the installshield folder. How can I get the code for various dialogs so that I can mention my coordinated using a window handle?


Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 02 February 2010 - 15:51

I don't know the actual answer to your question Prashant, but I do know that Flexera will help you with such upgrade issues for your IS project.
user posted image


  • Full Members
  • 3 posts

Posted 03 February 2010 - 13:57

Thanks Taco!!

Had posted this question on Acresso forum as well and found a suggestion. Now in Installshield 2010, there is a dropdown option in the main installscript code file (setup.rul). We can select the dialog code there.