Thread: C - Win32 problem writing in ListBox

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    9

    C - Win32 problem writing in ListBox

    Hi all,


    I have a generic WndProc() func running and I have a Dialog Box with a ListBox in it.
    I enter a Menu Item to open the Dialog Box and enter a specific function I created to fill the ListBox
    Code:
            BOOL CALLBACK FillListBox(HWND hWnd, UINT messg, WPARAM wParam, LPARAM lParam);
    The problem i'm facing, is the fact that while I have the Dialog Box opened, it keeps revisiting the WndProc() function and coming back to the FillListBox() in an infinit cycle, causing it to fill the ListBox numerous times.

    Is there a better way to treat the ListBox in the Dialog Box, or a way to only enter the FillListBox() function once?

    Thanks in advance,

    keyboarder
    P.S. I tried creating a modal and non-modal Dialog Box and it still cycles.
    Last edited by keyboarder; 08-30-2010 at 11:02 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. listbox Problem
    By emtec in forum C++ Programming
    Replies: 2
    Last Post: 04-27-2010, 12:59 AM
  2. Radiobuttons and listbox problem
    By osal in forum Windows Programming
    Replies: 2
    Last Post: 08-02-2004, 11:43 AM
  3. problem with win32 threads
    By pdmarshall in forum C++ Programming
    Replies: 6
    Last Post: 07-29-2004, 02:39 PM
  4. win32 Winsock problem
    By spoon_ in forum Windows Programming
    Replies: 3
    Last Post: 07-19-2002, 01:19 AM
  5. Problem with file listbox
    By Garfield in forum Windows Programming
    Replies: 6
    Last Post: 02-04-2002, 03:41 PM