WND List box problem

Results 1 to 1 of 1
  1. #1
    Member cffazot is offline
    MemberRank
    Mar 2012 Join Date
    53Posts

    WND List box problem

    I'm still new to making in-game windows for my features and I've came across a problem that I've been trying to solve for ages.

    A couple of systems I'm working on involves listing a set of things in WIDC_LISTBOX (a list box) and selecting a desired line in order to use it... The problem is, the way I did it does nothing; The stuff I want to appear inside of that list box appears just fine but nothing happens when I'm trying to select a listed item.

    I've tried looking up other source files to see how it's done for other windows but I still failed to figure it out.

    Here's what I've got for it:

    WndField.cpp
    Code:
    BOOL CWndCustomTest::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult ) 
    {
    	switch(nID)
    	{
    		case WIDC_CUS_LISTBOX1: // view ctrl
    			g_WndMng.PutString( "test", NULL, 0x00dc143c, CHATSTY_GAME ); //Dummy test!
    			break;
    		case WIDC_CUS_CLOSE:
    			Destroy();
    			break;
    	}
    	return CWndNeuz::OnChildNotify(message,nID,pLResult);
    }
    resdata.inc
    Code:
    APP_CUSTOM_TEST "WndTile00.tga" "" 1 672 400 0x2410000 26
    {
    // Title String
    IDS_CUSTOMT_TXT_000001
    }
    {
    // Help Key
    IDS_CUSTOMT_TXT_000000
    }
    {
        WTYPE_LISTBOX WIDC_CUS_LISTBOX1 "WndEditTile00.tga" 1 8 56 368 360 0x20020000 0 0 0 0 46 112 169
        {
        // Title String
    IDS_CUSTOMT_TXT_000000	
        }
        {
        // ToolTip
    IDS_CUSTOMT_TXT_000000
        }
        WTYPE_STATIC WIDC_CUS_GROUP1 "WndEditTile200.tga" 1 8 8 378 26 0x2220001 0 0 0 0 46 112 169
        {
        // Title String
    IDS_CUSTOMT_TXT_000003
        }
        {
        // ToolTip
    IDS_CUSTOMT_TXT_000000
        }
    
    ...
    If I press the WIDC_CUS_CLOSE button, it will actually destroy the window so that works with no problem. Anything else I do with it works but not the list box... Is there more to it or something? What am I missing? Any possible causes of this? Any help will be appreciated.

    Thanks :)
    Last edited by cffazot; 17-07-12 at 03:44 PM.




Advertisement