WND List box problem

Status
Not open for further replies.
Newbie Spellweaver
Joined
Mar 24, 2012
Messages
52
Reaction score
18
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 [COLOR="#B22222"]WIDC_CUS_LISTBOX1[/COLOR]: // 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
}
{
 [COLOR="#B22222"]   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
    }[/COLOR]
    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
    }

[SIZE=4]...[/SIZE]

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:
Status
Not open for further replies.
Back