I was trying (and failing) to change the channel by using the following command:
SendMessage(hwndDD, WM_MODULE_MSG, DDMODAPI_SET_CHANNEL_BY_CHID, chid);
So I was going to ask if this was the correct command although I just looked through the DDDisecq sample and saw this:
SendMessage(hwndDD, WM_MODULE_MSG, DDMODAPI_GET_CHANNEL_ID, (LPARAM)&chid);
SendMessage(hwndDD, WM_MODULE_MSG, DDMODAPI_SET_CHANNEL_BY_CHNO, chid);
What is the difference between DDMODAPI_SET_CHANNEL_BY_CHNO and DDMODAPI_SET_CHANNEL_BY_CHID?
I don't have time to test this until I get home but hopefully DDMODAPI_SET_CHANNEL_BY_CHNO works.
Changing channel
Moderators:X05, Dreamer, FredB
Re: Changing channel
CHID is the index in CHL's Channels array.
CHNO is the channel number assigned by user (for remote controls, user can re-arrange channels etc in remote tab of DVB Dream)
your usage looks alright. Please check if DD main window handle (hwndDD) is correct, if other API functions work fine.
SendMessage(hwndDD, WM_MODULE_MSG, DDMODAPI_SET_CHANNEL_BY_CHID, ChID);
You can search in Channels array by name inside a for-loop, then return the index of for loop. That would be ChID.
CHNO is the channel number assigned by user (for remote controls, user can re-arrange channels etc in remote tab of DVB Dream)
your usage looks alright. Please check if DD main window handle (hwndDD) is correct, if other API functions work fine.
SendMessage(hwndDD, WM_MODULE_MSG, DDMODAPI_SET_CHANNEL_BY_CHID, ChID);
You can search in Channels array by name inside a for-loop, then return the index of for loop. That would be ChID.
DVB Dream - because I have to dream about having time to code it
Re: Changing channel
Sorry, when I got home I noticed that I was passing the address of chid, not the value.
Return to “Module / Plugin Programming”
Who is online
Users browsing this forum: No registered users and 1 guest