- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have this problem:
I have a SDI application. When it starts I create a dialog:
Where the MainDialogProc creates the dialog using DlgModeless function, the dialog subroutine is assigned:
bret = DlgSetSub(gdlg, Dialog_Trans, TransSub).
In the TransSub within the dlg_init section I read some numbers from a file and put them into edit boxes. It works fine. NOW: after reading numbers and filling the edit boxes I would like to make a sum of these numbers, so I call subroutine suma (still within the dlg_init section), that evaluates the sum and writes the result into another editbox.
The subroutine SUMA checks whether there are numbers in the edit boxes (they are), but it says they are not. When I call the subroutine right after the dialog starts by a button click, everything is OK.
It seems to me like the numbers aren't in the editboxes during the dlg_init section. Is there a way how to manage these numbers?
Thanks for your suggestion
Vit
I have a SDI application. When it starts I create a dialog:
case(WM_CREATE) ... call MainDialogProc ...
Where the MainDialogProc creates the dialog using DlgModeless function, the dialog subroutine is assigned:
bret = DlgSetSub(gdlg, Dialog_Trans, TransSub).
In the TransSub within the dlg_init section I read some numbers from a file and put them into edit boxes. It works fine. NOW: after reading numbers and filling the edit boxes I would like to make a sum of these numbers, so I call subroutine suma (still within the dlg_init section), that evaluates the sum and writes the result into another editbox.
The subroutine SUMA checks whether there are numbers in the edit boxes (they are), but it says they are not. When I call the subroutine right after the dialog starts by a button click, everything is OK.
It seems to me like the numbers aren't in the editboxes during the dlg_init section. Is there a way how to manage these numbers?
Thanks for your suggestion
Vit
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try calling DlgFlush(Dlg) before calling Suma.
Jugoslav
Jugoslav

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