- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Members,
I want to use edit boxes to selectively view the contents of a file, is there any way to specify the number of edit boxes(usingan integer variable, say) in a dialog box at run time?
AlsoI want to update the contents of an editbox, ie add new lines to it while keeping the previous ones, but I cant seem to find a way to accomplish this...
Any assistance with these issues will be greatly appreciated
Regards
Marrisa
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could add the controls and make them invisible at the start, then make them visible later. All resources need to be available and they must either be connected to callback routines or have their ID's dealt with ina subclassed dialog box procedure. see http://tinyurl.com/5gqj3.
You can also add via a hook procedure. Do some searches on this board for 'adding controls' and you will get some useful info.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Sir,
I searched the message boards like you suggested (I decided to tackle mymultiline problem first) and my search yielded the following subroutine:
SUBROUTINE AppendEditText(Dlg, ID, sText)
TYPE(Dialog):: Dlg
INTEGER:: ID
CHARACTER(*):: sText
TYPE(Dialog):: Dlg
INTEGER:: ID
CHARACTER(*):: sText
CHARACTER(LEN=LEN(sText)+1):: szText
INTEGER:: hwndEdit, i
INTEGER:: hwndEdit, i
hwndEdit = GetDlgItem(Dlg%hWnd, ID)
szText=TRIM(sText)//CHAR(0)
nLength = SendMessage ( hwndEdit, WM_GETTEXTLENGTH, 0, 0 )
i = SendMessage ( hwndEdit, EM_SETSEL, nLength, nLength )
i = SendMessage ( hwndEdit, EM_REPLACESEL, 0, LOC(szText))
END SUBROUTINE AppendEditText
szText=TRIM(sText)//CHAR(0)
nLength = SendMessage ( hwndEdit, WM_GETTEXTLENGTH, 0, 0 )
i = SendMessage ( hwndEdit, EM_SETSEL, nLength, nLength )
i = SendMessage ( hwndEdit, EM_REPLACESEL, 0, LOC(szText))
END SUBROUTINE AppendEditText
I am using it as follows however I cannot see anything in my editbox. I set the properties 'Multiline' and 'Want Return' under the 'styles' tab. Am I implementing it correctly? Any assistance will be greatly appreciated.
retlog = DlgInit( IDD_DIALOG9,dlg )
if ( retlog .eq. .true. ) then
if ( retlog .eq. .true. ) then
name = 'Chandrika'
call AppendEditText(dlg, IDC_Edit1, name)
iret = dlgmodal(dlg)
call AppendEditText(dlg, IDC_Edit1, name)
iret = dlgmodal(dlg)
end if
Regards
Chandrika
Chandrika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you tried, as it was sugested, that link? There is an API function sample:
i = ShowWindow(GetDlgItem(Dlg%hWnd,IDC_WHATEVER),SW_HIDE/SW_SHOW)
regards
Jadwiga
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To edit multiline outputs (or whatever) I use ListBox.
Let me know, if you need help with it.
Jadwiga
![](/skins/images/DF2E495CEC88D713A66401CF495CD875/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page