Article View: comp.os.ms-windows.programmer.misc
Article #1966Re: ListBox problem
From: Tom W. Brown
Date: Thu, 17 Dec 1992 00:27
Date: Thu, 17 Dec 1992 00:27
27 lines
1780 bytes
1780 bytes
In article <pjsmith.724533171@pv1414.vincent.iastate.edu>, pjsmith@iastate.edu (Phil J Smith) writes: |> I am attempting to load a directory listing into a listbox with DlgDirList. |> This works fine except that the listbox does not display it until I click in |> it. I have tried using "SendDlgMsg(id,LBN_SETFOCUS,0,0)" but nothing happens. |> I am using Turbo C++ for Windows v3.1 and OWL. Any ideas? Well, I don't use OWL at all, but at the SDK level it sounds like you may have forgotten to turn back on redraw: SendDlgItemMessage(hdlg, id, WM_SETREDRAW, 1, 0); InvalidateRect(GetDlgItem(hdlg, id), NULL, TRUE); UpdateWindow(GetDlgItem(hdlg, id)); // not really necessary Try simply appending these lines after you load the listbox and see what happens. This may work, but it potentially addresses only a symptom and not the problem. You might want to include the appropriate code fragment in a followup if it still doesn't work, this would give us more to go on. ---------------------------------------------------------------------------- Tom Brown | "She turned me into a newt... PE Nelson Systems | ... I got better" twbrown@pe-nelson.com | Monty Python and the Holy Grail ----------------------------------------------------------------------------
Technical Details
Message-ID:
<717@lax.lax.pe-nelson.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!lax.pe-nelson.com!lax!twbrownReferences:
<pjsmith.724533171@pv1414.vincent.iastate.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!lax.pe-nelson.com!lax!twbrown From: twbrown@PE-Nelson.COM (Tom W. Brown) Newsgroups: comp.os.ms-windows.programmer.misc Subject: Re: ListBox problem Keywords: windows, programming Message-ID: <717@lax.lax.pe-nelson.com> Date: 17 Dec 92 00:27:34 GMT References: <pjsmith.724533171@pv1414.vincent.iastate.edu> Sender: news@lax.pe-nelson.com Organization: PE-Nelson Lines: 27