- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since I installed windows XP Service Pack 2, edit controls in dialogs of my Visual fortran applications can no longer be modified (arrow and delete keys work, but no text/numbers can be entered).The simplest way of observing the bug is to create a dialog based sample code application using the application wizzard, to add an edit control to the dialog in the resource editor and to open two instances of the dialog: eg in the WinMain
Code:
ghInstance = hInstance ghModule = GetModuleHandle(NULL) ghwndMain = NULL lret = DlgInit(IDD_dlgtest_DIALOG, gdlg) if (lret == .FALSE.) goto 99999 lret = DlgInit(IDD_dlgtest_DIALOG, gdlg2) if (lret == .FALSE.) goto 99999 lret = DlgSetSub(gdlg, IDD_dlgtest_DIALOG, dlgtestSub) lret = DlgSetSub(gdlg, IDM_APPLY, dlgtestApply) lret = DlgModeless(gdlg, nCmdShow) if (lret == .FALSE.) goto 99999 lret = DlgModeless(gdlg2, nCmdShow,gdlg%hwnd) if (lret == .FALSE.) goto 99999
with gdlg2 defined as a global variable of type dialog.None of the edit controls will be editable. If you close the child dialog, the edit control of the parent becomes editable.
Does anyone know of a reason for such behaviour, a workaround or a fix ?
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To be more precise, in the previous example if you try editing the content of the edit control of the child dialog first, you'll be able to do so, but if you try editing the edit control of the parent control first, then none of the edit controls will respond until you close the child dialog.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Don't know what happened there, and I don't have a XP handy. However, does it perhaps work with this message loop?:
Code:
DO WHILE( GetMessage(Mesg,NULL,0,0) .NEQV. .FALSE.) hActive=GetActiveWindow() iStyle=GetWindowLong(hActive,GWL_EXSTYLE) IF (IAND(iStyle,WS_EX_CONTROLPARENT).NE.0) THEN IF (.NOT.IsDialogMessage(hActive, Mesg)) THEN iSt=TranslateMessage(Mesg) iSt=DispatchMessage(Mesg) END IF ELSE iSt=TranslateMessage(Mesg) iSt=DispatchMessage(Mesg) END IF END DO
If it does, it means something is broken with DlgIsDlgMessage... in any case, please attach a complete zipped workspace and I'll (try to) take a look.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I haven't tried the message loop you suggested with service pack 2 yet since I had to unsintall SP2 to be able to continue my work (because of the aforementioned bug).
I'll try it when I have a spare couple of hours to install/uninstall sp2.
In the meanwhile here's the (really basic) project which causes the bug with WinXP SP2 (it works perfectly well with XP SP1).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried it on my SP2 system and couldn't detect a problem. I could enter text into either of the boxes. What should I be seeing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As described in the second message, with SP2 installed, if I try entering text in the edit control of the parent dialog before I enter text in the child dialog, none of the edit controls responds.
This works fine on your xp sp2 system ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
...but I don't see from earlier messages which Visual Fortran? Intel or Compaq?
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No - I could enter text in either edit control in either order on my SP2 system.

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