home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!ieunet!vms.eurokom.ie!mdewinter
- From: mdewinter@vms.eurokom.ie
- Newsgroups: comp.os.ms-windows.programmer.misc
- Subject: help: display graph in dlg box (in shaded group)
- Message-ID: <1992Sep8.105705.11973@vms.eurokom.ie>
- Date: 8 Sep 92 10:57:05 CET
- Organization: EuroKom Conferencing Service
- Lines: 53
-
- hi,
- I need help with displaying graphs in a dialog box
- I su use BC3.0 and both windows versons.
- Here is the code fragment:
- int FAR PASCAL TestDialog(...)
- ...
- %
- ...
- switch(message)
- %
- case WM_COMMAND:
- switch(wParam)
- %
- case IDCANCEL:
- case IDOK:
- EndDialog(hdlg,0);
- return FALSE;
- case IDC_DRAW:
- hDrawWindow=GetDlgItem(hdlg,IDC_DRW);
- hdc=GetDC(hDrawWindow);
- ...
- (set map mode, viewport etc...)
- ...
- MoveTo(hdc,0,0);
- LintO(hdc,10,10); /* sorry: LineTo... */
- releaceDC(hDrawWindow,hdc);
- brdeak;
- default:
- break;
- %
- break;
- case WM_INITDIALOG:
- return TRUE;
- defualt;
- return FALSE;
- %
- return FALSE;
- %
- The code refers to a dialog box in BorDlg style, with a button with
- ID IDC_DRAW and a shaded group with ID IDC_DRW.
- The % in the code stand for open and close brackets (there is something
- going on with my keyboard, so I "lost" some keys).
- The above code works just fine under Windows 3.1.
- However, under Windows 3.0 it does not work at all. WHY?
- I tried before to use the BeginPaint... and EndPaint stuff, but doesn't
- work under either Win3.0 or Win3.1
-
- Please reply either to this forum,
- or by Eurocom, as a letter to marylene dewinter
- or by E-mail to fhcaa79 att location cc1.kuleuven.ac.ba (ba has to be "be")
-
- Thankd;
- Guy.
-