I have combo box in which i have two strings i.e. nothing but properties->data ->insert string
First is BABINA & 2nd JAIPUR
I have two maps which are in tga format ( map1.tga & map2.tga). What i want is when i selected BABINA & press OK map1.tga should display & when I select JAIPUR & press OK map2.tga should display .
Right now only map1.tga is getting displayed.
Code:
CenView.cpp
int CenView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
HWND hWnd = GetSafeHwnd();
HDC hDC = ::GetDC(hWnd);
if (SetWindowPixelFormat(hDC)==FALSE)
return 0;
if (CreateViewGLContext(hDC)==FALSE)
return 0;
m_objTexture.LoadTGA("map2.tga") ;
m_objTexture.LoadTGA("map1.tga") ;
objQuad = gluNewQuadric();
gluQuadricNormals(objQuad,GLU_FLAT);
gluQuadricDrawStyle(objQuad,GL_LINE);
gluQuadricOrientation(objQuad,GLU_OUTSIDE);
gluQuadricTexture(objQuad,GL_TRUE);
return 0;
}
Code:
CLocationSelection.cpp
BOOL CLocationSelection::OnInitDialog()
{
CDialog::OnInitDialog();
((CComboBox*)GetDlgItem(CMB_LOC_SEL))->SetCurSel(0) ;
mycombo.FindString(0,"BABINA");
mycombo.FindString(0,"JAIPUR");
return TRUE;
}

