Hi...
Additionally I use in dialog "SdAskDestPath2" with two text box control. One of those i want to set the size of total feature, and the other, I want to put in the space avaible on disk.
If i put this part of my code in section "Dlg_AskDestPath2" then when I test the installation I see 0 kb in one of the text box, so did not set well.
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.
problem with using two text box control...
Started by
thanatos83
, Jun 15 2010 12:10
8 replies to this topic
Posted 15 June 2010 - 12:10
CODE |
#define TXT3 1306 if (nSetupType = CUSTOM) then FeatureGetTotalCost (MEDIA, szDir, nTotalReqSize); NumToStr (szText, nTotalReqSize); CtrlSetText (SD_DLG_ASKDESTPATH2, TXT3, szText); nResult = SdAskDestPath2( "", "", szDir ); TARGETDIR = szDir; endif; |
however when i test the installation with debugger i see the correct size of features:
szText = 45678 KB
so whats the problem???
Edited by thanatos83, 15 June 2010 - 12:12.
Posted 15 June 2010 - 14:26
I've never tried to override a dialog's default content like that, but when I look at this particular dialog, I'm seeing different ID values for the text controls.
Specifically, I see an ID of 718 for the first text box control and an ID of 715 for the second text box control.
Hope it helps and let me know how that works out for you.
Specifically, I see an ID of 718 for the first text box control and an ID of 715 for the second text box control.
Hope it helps and let me know how that works out for you.
Posted 15 June 2010 - 15:19
Hi taco...
Sorry i didn't modify in "SdAskDestPath2" the two text box controls. I added two more text box control as the same in "SdFeatureDialog".
If i added more controls in a "default dialog" will be consider as "Custom Dialog" ???
UPDATE
=====
Well finally i get worked nice ...
Sorry i didn't modify in "SdAskDestPath2" the two text box controls. I added two more text box control as the same in "SdFeatureDialog".
If i added more controls in a "default dialog" will be consider as "Custom Dialog" ???
UPDATE
=====
Well finally i get worked nice ...
Edited by thanatos83, 16 June 2010 - 13:48.
Posted 16 June 2010 - 16:07
Ah, that explains why you referred to it as the third text box control then and glad to hear you got it working.
Posted 17 June 2010 - 12:33
HI Taco...
I have a problem about Space Avaliable in hard disk drive, so i can see the correct size of my drive C:\ but if i select another folder in "SelectDir" the other text box control not changes and always i see the size of my first unit drive.
I have installed another drive, this drive is an USB HDD and his capacity its 500 GB. Perhaps i forget to put some code in a (case of SD_PBUT_CHANGEDIR) ???
thanks...
I have a problem about Space Avaliable in hard disk drive, so i can see the correct size of my drive C:\ but if i select another folder in "SelectDir" the other text box control not changes and always i see the size of my first unit drive.
I have installed another drive, this drive is an USB HDD and his capacity its 500 GB. Perhaps i forget to put some code in a (case of SD_PBUT_CHANGEDIR) ???
thanks...
CODE |
bDone = FALSE; repeat nCmdValue = WaitOnDialog( szDlg ); switch ( nCmdValue ) case DLG_INIT: hwndDlg = CmdGetHwndDlg( szDlg ); // Space Avaliable on hard disk drive di.szDiskPath = szDir; di.nInfoToQuery = DISK_INFO_QUERY_DISK_FREE_SPACE; nGetDiskSpace = GetDiskInfo ( &di ); nUnitsTarget = MBYTES; nGetDiskSpace = ConvertSizeToUnits( di.nFreeSpaceHigh, di.nFreeSpaceLow, BYTES, nvSizeTargetHigh, nvSizeTargetLow, nUnitsTarget ); NumToStr ( szT, nvSizeTargetLow ); CtrlSetText ( szDlg, TXT6, szT ); // Required Space FeatureGetTotalCost ( MEDIA, szDir, nTotalReqSize ); NumToStr ( szText, nTotalReqSize ); CtrlSetText ( szDlg, TXT5, szText ); case DLG_CLOSE: SdCloseDlg( hwndDlg, nCmdValue, bDone ); case DLG_ERR: SdError( -1, szDlg ); nCmdValue = -1; bDone = TRUE; case SD_PBUT_CHANGEDIR: SelectDirNoLog( "", "", szDir, TRUE ); CtrlSetText( szDlg, 0x80000000 | SD_STA_DESTDIR, szDir ); // Selected drives CtrlSetText ( szDlg, TXT4, szDir ); CtrlSetText ( szDlg, TXT3, szDir ); case BACK: goto Dlg_SetupType2; bDone = TRUE; case SD_PBUT_CONTINUE: TARGETDIR = szDir; bDone = TRUE; case SD_PBUT_CANCEL: Do ( EXIT ); bDone = TRUE; case RES_PBUT_CANCEL: Do ( EXIT ); bDone = TRUE; if (SdIsStdButton( nCmdValue ) && SdDoStdButton( nCmdValue )) then bDone = TRUE; endif; endswitch; until bDone; EndDialog ( szDlg ); ReleaseDialog ( szDlg ); |
Posted 17 June 2010 - 14:53
Based on your reports and in looking at the code, I do see an explanation behind the behavior you're seeing.
Specifically, you only populate the available disk space (TXT5) as part of the dialog initialziation when you also need to do that as part of a directory change in case it resides on another drive.
So your theory was correct and hope it helps.
Specifically, you only populate the available disk space (TXT5) as part of the dialog initialziation when you also need to do that as part of a directory change in case it resides on another drive.
So your theory was correct and hope it helps.
Posted 17 June 2010 - 15:44
OK, finally that worked... i can see the space of my USB HDD.
It is necessary to copy and paste all of the code of Dialog source from SdAskDestPath2 by default to manipulate those new text box control or maybe can i remove some part of code???
Because i think if you need to add more controls in a dialog so it to be consider as Custom Dialog?
thanks taco for your pacience.
It is necessary to copy and paste all of the code of Dialog source from SdAskDestPath2 by default to manipulate those new text box control or maybe can i remove some part of code???
Because i think if you need to add more controls in a dialog so it to be consider as Custom Dialog?
thanks taco for your pacience.
Edited by thanatos83, 18 June 2010 - 14:58.
Posted 18 June 2010 - 15:06
As previously mentioned, I've never tried to customize a built-in dialog like this. However, it's definitely your responsibility to manage the additional controls to whatever extent is necessary.
Posted 19 June 2010 - 16:42
Hi...
How can i get to working %p (place holder) in new strings maked???
For example, the text in "check boxes"...
OK, i see that page:
DOCUMENTATION
It explains how to do working this...
but seems strange because the text control must be inside in a range... :S
thx...
How can i get to working %p (place holder) in new strings maked???
For example, the text in "check boxes"...
OK, i see that page:
DOCUMENTATION
It explains how to do working this...
but seems strange because the text control must be inside in a range... :S
thx...
Edited by thanatos83, 20 June 2010 - 00:52.