I have this dialog:
Code:
BOOL CALLBACK ConcesDlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
{switch(Message)
{case WM_INITDIALOG:
SendDlgItemMessage(hwnd, IDC_COMBOBOX, CB_ADDSTRING, 0, (LPARAM)st1);
SendDlgItemMessage(hwnd, IDC_COMBOBOX, CB_ADDSTRING, 0, (LPARAM)st2);
SendDlgItemMessage(hwnd, IDC_COMBOBOX, CB_ADDSTRING, 0, (LPARAM)st3);
return 1;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDC_COMBOBOX:
switch (HIWORD(wParam))
{case CBN_SELENDOK :
COMBOBOXIDS(hwnd,LOWORD(wParam)); return 0;
default: return 0;}
case IDCANCEL:
EndDialog(hwnd, 0);
return 1;
}
return 1;
default: return FALSE;}
return TRUE;}
From the bold type function, goes to here:
Code:
VOID COMBOBOXIDS(HWND hwnd,int List)
{int id;
id = SendDlgItemMessage(hwnd,List,CB_GETCURSEL,0,0);
Beep(700,100);
if (carid < 1)
{CheckDlgButton(hwnd,List - 4,0);
CheckDlgButton(hwnd,List - 3,0);
CheckDlgButton(hwnd,List - 2,0);
CheckDlgButton(hwnd,List - 1,0);
SetDlgItemText(hwnd,List + 1,NULL);}
else
{CheckDlgButton(hwnd,List - 4,1);}
switch(id)
{case 0:SetDlgItemText(hwnd,IDC_STATIC9,"This is case 0."); break;
case 1:SetDlgItemText(hwnd,IDC_STATIC9,"This is case 1."); break;
case 2:SetDlgItemText(hwnd,IDC_STATIC9,"This is case 2."); break;}}
What I'm trying to do is, in a picture control, display a diferent .bmp depending on the selected combobox item. So, basically I would like to add, in each case of the switch(id) a function like "LoadBitmap" or whichever is it that is most suitable to load a bitmap. If that is a problem, even pressing a button would be just fine. My problem is not where, but how...
And I've been trying for days already but it just won't work, though I am able to set a bitmap in the .rc (like one that it is "born" with).
If you need any more info let me know.