home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / mswindo / programm / misc / 1720 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.6 KB

  1. Path: sparky!uunet!mcsun!ieunet!vms.eurokom.ie!mdewinter
  2. From: mdewinter@vms.eurokom.ie
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: help: display graph in dlg box (in shaded group)
  5. Message-ID: <1992Sep8.105705.11973@vms.eurokom.ie>
  6. Date: 8 Sep 92 10:57:05 CET
  7. Organization: EuroKom Conferencing Service
  8. Lines: 53
  9.  
  10. hi,
  11. I need help with displaying graphs in a dialog box
  12. I su  use BC3.0 and both windows versons.
  13. Here is the code fragment:
  14. int FAR PASCAL TestDialog(...)
  15. ...
  16. %
  17. ...
  18.  switch(message)
  19.  %
  20.   case WM_COMMAND:
  21.    switch(wParam)
  22.    %
  23.     case IDCANCEL:
  24.     case IDOK:
  25.      EndDialog(hdlg,0);
  26.      return FALSE;
  27.     case IDC_DRAW:
  28.      hDrawWindow=GetDlgItem(hdlg,IDC_DRW);
  29.      hdc=GetDC(hDrawWindow);
  30.      ...
  31.      (set map mode, viewport etc...)
  32.      ...
  33.      MoveTo(hdc,0,0);
  34.      LintO(hdc,10,10); /* sorry: LineTo... */
  35.      releaceDC(hDrawWindow,hdc);
  36.      brdeak;
  37.     default:
  38.      break;
  39.    %
  40.    break;
  41.   case WM_INITDIALOG:
  42.    return TRUE;
  43.   defualt;
  44.    return FALSE;
  45.  %
  46.  return FALSE;
  47. %
  48. The code refers to a dialog box in BorDlg style, with a button with
  49. ID IDC_DRAW and a shaded group with ID IDC_DRW.
  50. The % in the code stand for open and close brackets (there is something
  51. going on with my keyboard, so I "lost" some keys).
  52. The above code works just fine under Windows 3.1.
  53. However, under Windows 3.0 it does not work at all. WHY?
  54. I tried before to use the BeginPaint... and EndPaint stuff, but doesn't
  55. work under either Win3.0 or Win3.1
  56.  
  57. Please reply either to this forum,
  58. or by Eurocom, as a letter to marylene dewinter
  59. or by E-mail to fhcaa79 att location cc1.kuleuven.ac.ba (ba has to be "be")
  60.  
  61. Thankd;
  62. Guy.
  63.