cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nrlaing
Level 2

Setting Custom Dialog Window Position

It always seems that whenever I have an InstallShield problem, 5 or 6 other people have had the same problem, but no one has posted a solution.

Here's my (professional) problem: I have a install that consists of a handful of custom dialogs. If the user moves one of the dialog boxes, then clicks next, the following dialog will jump back to the initial position.

Is there any way that I can capture the window position, save it, and set each dialog's position based on that? I know that PlaceWindow() won't work with custom dialogs. That leaves MoveWindow(), but I can't get that to work either.

Any suggestions?
Labels (1)
0 Kudos
(2) Replies
nrlaing
Level 2

Going once... twice... ?

I found this post about using _WinSubGetWindowRect ( wWinHnd, nOX, nOY, nSX, nSY ); This function is declared in winsub.rul, but it looks like it was depreciated, since my version of winsub.rul doesn't contain anything. I found a version online that had function declarations, but I'm afraid that I'm wasting time now... Anyone? PLEASE?

http://forum.installsite.net/index.php?showtopic=290
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

If you call EzDefineDialog to create your custom dialog, that will call the DefineDialog function with the DLG_CENTERED flag passed to the lMsgLevel parameter. If DLG_CENTERED is passed to DefineDialog, when that dialog is initialized, it will be centered on the screen.

You can try calling DefineDialog directly instead of EzDefineDialog and only pass DLG_MSG_STANDARD in the lMsgLevel parameter. This may allow you to call MoveWindow to change the dialog's position.
0 Kudos