home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / mswindo / programm / misc / 4289 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  1.7 KB

  1. Path: sparky!uunet!lax.pe-nelson.com!lax!twbrown
  2. From: twbrown@PE-Nelson.COM (Tom W. Brown)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Re: ListBox problem
  5. Keywords: windows, programming
  6. Message-ID: <717@lax.lax.pe-nelson.com>
  7. Date: 17 Dec 92 00:27:34 GMT
  8. References: <pjsmith.724533171@pv1414.vincent.iastate.edu>
  9. Sender: news@lax.pe-nelson.com
  10. Organization: PE-Nelson
  11. Lines: 27
  12.  
  13. In article <pjsmith.724533171@pv1414.vincent.iastate.edu>, pjsmith@iastate.edu (Phil J Smith) writes:
  14. |> I am attempting to load a directory listing into a listbox with DlgDirList.
  15. |> This works fine except that the listbox does not display it until I click in
  16. |> it.  I have tried using "SendDlgMsg(id,LBN_SETFOCUS,0,0)" but nothing happens.
  17. |> I am using Turbo C++ for Windows v3.1 and OWL.  Any ideas?
  18.  
  19. Well, I don't use OWL at all, but at the SDK level it sounds like you may
  20. have forgotten to turn back on redraw:
  21.  
  22.     SendDlgItemMessage(hdlg, id, WM_SETREDRAW, 1, 0);
  23.     InvalidateRect(GetDlgItem(hdlg, id), NULL, TRUE);
  24.     UpdateWindow(GetDlgItem(hdlg, id));   // not really necessary
  25.  
  26. Try simply appending these lines after you load the listbox and see what
  27. happens.  This may work, but it potentially addresses only a symptom and not
  28. the problem.
  29.  
  30. You might want to include the appropriate code fragment in a followup if it
  31. still doesn't work, this would give us more to go on.
  32.  
  33.  
  34.  
  35. ----------------------------------------------------------------------------
  36. Tom Brown               |  "She turned me into a newt...
  37. PE Nelson Systems       |                                  ... I got better"
  38. twbrown@pe-nelson.com   |                    Monty Python and the Holy Grail
  39. ----------------------------------------------------------------------------
  40.