cant load dialog with listbox, help

This is a discussion on cant load dialog with listbox, help within the Windows Programming forums, part of the Platform Specific Boards category; Hi, i have a list box in a dialogBox defined in a resource file, if i add the listbox to ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    113

    cant load dialog with listbox, help

    Hi,
    i have a list box in a dialogBox defined in a resource file, if i add the listbox to the dialog the dialog is not displayed from the application clickiing a menu option but if i comment the listbox part the dialog is show without problems any idea?
    heres de code of my .rc file

    Code:
    #include <windows.h>
    #include "ids.h"
    
    IDM_MENU MENU
    BEGIN
    	POPUP "&Principal"
    	BEGIN
    		MENUITEM "&Dialogo", IDM_DIALOGO 
    	END
    END
    
    IDD_DIALOGO DIALOG 0,0,118,135
    STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION
    CAPTION "Dialogo de prueba"
    FONT 8, "Helv"
    BEGIN
    	CONTROL "Lista:", -1 , "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 8,9,28,8 
        CONTROL "", ID_LISTA , "listbox", LBS_STANDARD | WS_CHILD | WS_VISIBLE | WS_TABSTOP,9,19,104,99
    	CONTROL "Ok" , ID_OK, "button", BS_PUSHBUTTON | BS_CENTER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 8,116,45,14 
        CONTROL "Cancelar", ID_CANCELAR, "Button",BS_PUSHBUTTON | BS_CENTER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 61,116,45,14 
    END
    if i comment the
    CONTROL "", ID_LISTA , "listbox", LBS_STANDARD | WS_CHILD | WS_VISIBLE | WS_TABSTOP,9,19,104,99 part the dialog is drawed without problems so i think the problem is in the listbox part

    thanks for any help

    I'm using viasual c++ 6.0

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,701
    Works fine for me.
    Do you have ID_LISTA defined?

    gg

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    113
    yes in IDS.H

    if i use numbers like 101 instead of the ID_xxx the dialog works fine!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Adding Strings to ListBox in a Dialog
    By kevins963 in forum C Programming
    Replies: 5
    Last Post: 09-10-2008, 05:36 PM
  2. Edit controls of a dialog from another dialog...
    By Snake in forum Windows Programming
    Replies: 9
    Last Post: 07-01-2005, 03:18 PM
  3. make Child Dialog not Popup?
    By Zeusbwr in forum Windows Programming
    Replies: 5
    Last Post: 04-08-2005, 03:42 PM
  4. Getting the position of a dialog without parent on the screen
    By stormbringer in forum Windows Programming
    Replies: 1
    Last Post: 08-27-2003, 03:59 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 10:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21