windows - Confusing Function in C++ Dialogs -


hi explain me function doing, reading programming book , struggling follow function.

from can gather function take in handle window (in case dialog box), information passed in second param , third param being pointer actual object.

to give context i'm trying populate combo box adapters computer has.

void additem(hwnd hwnd, char *ch, void *pdata)  {   wparam ni = (wparam)((int)(dword)sendmessage(hwnd,cb_addstring,0,(lparam)ch));    sendmessage(hwnd,cb_setitemdata, ni, (lparam)pdata); } 

here example call:

for (uint a=0; a<m_dwnumadapters; a++)  {    additem(m_hadapter, m_xadapterinfo[a].d3dadapteridentifier.description,            &m_xadapterinfo[a]); } 

thanks.

i used earlier add items combo box, might of help.

senddlgitemmessage(hwnd, idc_combostatus, cb_addstring, 0, (lparam) (lpctstr) "available"); 

where hwnd handle dialog, idc_combostatus resource id, , other pretty clear.

try senddlgitemmessage function rather sendmessage.

regards,

vajda


Comments

Popular posts from this blog

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

apache - Add omitted ? to URLs -

php - How can I stop spam on my custom forum/blog? -