Ok, I have a list box, and i've been considering converting to a Listview, but for temporary purposes, how do I get my listbox to not be alphabetized? I have it as a log window and it dumps a TON of data into this listbox, at first, I thought it was an error because it dumps thousands of entries into this window, but even after using a Sleep(10) before each SendDlgItemMessage() It was still happening. And it wasn't until I put integers in front of my messages that I noticed it was putting everything in alphabetical order based off of the first letter/number. Any way to change this so all the new stuff goes below the last entry?
Code:
switch(Opcode)
{
case 0xA9: //LDA imm
CPU.P+=2; //two byte instruction
wsprintf(buf, "You need to implement opcode: %#X", Opcode);
index=SendDlgItemMessage(hwnd,IDC_LIST1, LB_ADDSTRING,0,(LPARAM)buf);
SendDlgItemMessage(hwnd, IDC_LIST1, LB_SETITEMDATA, (WPARAM)index, (LPARAM)ListIdNum);
ListIdNum++;
break;
I thought that the LB_SETITEMDATA helped keep track of this but apparently not. Anyone? It does the same if its this too:
Code:
CPU.P+=2; //two byte instruction
wsprintf(buf, "You need to implement opcode: %#X", Opcode);
SendDlgItemMessage(hwnd,IDC_LIST1, LB_ADDSTRING,0,(LPARAM)buf);
break;
My ListBox code is done as a resource through Visual Studio. My program is dialog based as well.