Click here to Skip to main content
15,885,546 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: boost::format Pin
Niklas L7-Jul-10 22:10
Niklas L7-Jul-10 22:10 
Questionlist box Pin
AbhiHcl7-Jul-10 19:47
AbhiHcl7-Jul-10 19:47 
AnswerRe: list box Pin
«_Superman_»7-Jul-10 19:49
professional«_Superman_»7-Jul-10 19:49 
GeneralRe: list box Pin
AbhiHcl7-Jul-10 19:57
AbhiHcl7-Jul-10 19:57 
GeneralRe: list box Pin
«_Superman_»7-Jul-10 20:09
professional«_Superman_»7-Jul-10 20:09 
GeneralRe: list box Pin
AbhiHcl7-Jul-10 20:44
AbhiHcl7-Jul-10 20:44 
GeneralRe: list box Pin
«_Superman_»7-Jul-10 20:46
professional«_Superman_»7-Jul-10 20:46 
GeneralRe: list box Pin
AbhiHcl7-Jul-10 21:14
AbhiHcl7-Jul-10 21:14 
Hi I hv tried but its not working..
Here by I m sending my code , plz look into that..

// Here I am creating the button as well as ListBox. CTxDropDown is derived from CButton.
void CTxDropDown::CreateDropDown(CRect rect, CWnd *pWnd, UINT nID)
{

this->Create(L"", WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON ,rect, pWnd, nID);

CRect m_rtBtn(rect);
m_rtLst.left = m_rtBtn.left + 2 ;
m_rtLst.top = m_rtBtn.top + 38 ;
m_rtLst.right = m_rtBtn.right - 2 ;
m_rtLst.bottom = m_rtBtn.bottom + 120 ;

m_lstCtrl.CreateListBox(m_rtLst , pWnd , this , nID);

m_lstCtrl.SetItemHeight(0, 25);
m_lstCtrl.AddString(L" ENGLISH");
m_lstCtrl.AddString(L" JAPANIES");
m_lstCtrl.AddString(L" FRENCH");
m_lstCtrl.AddString(L" GERMAN");
m_lstCtrl.ShowWindow(SW_HIDE);
}

// On button click I m showing the and hiding the ListBox. m_lstCtrl is the object of my listbox class
void CTxDropDown::OnBnClicked()
{
// TODO: Add your control notification handler code here.
m_lstCtrl.SetFocus();
m_bShowListCtrl = !m_bShowListCtrl;
m_lstCtrl.ShowWindow(m_bShowListCtrl );
Invalidate();
}
// Here I am creating the ListBox.CTxListControl is derived froom CListBox.

void CTxListControl::CreateListBox(CRect rect,CWnd *pWnd,CWnd *pDropDownWnd ,UINT nID)
{
this->Create(WS_VISIBLE |WS_CHILD|WS_VSCROLL|LBS_NOTIFY| LBS_HASSTRINGS | WS_TABSTOP ,rect , pWnd , nID);
this->SetFocus();
m_pDropDownWnd = pDropDownWnd;
m_rtLst = rect ;
}

// Calling the KillFocus on ClistBox
void CTxListControl::OnLbnKillfocus()
{
// TODO: Add your control notification handler code here

CListBox::ShowWindow(SW_HIDE);
}

Plz look the code..
and Gv some idea where I m worng..
AnswerRe: list box Pin
Iain Clarke, Warrior Programmer7-Jul-10 21:06
Iain Clarke, Warrior Programmer7-Jul-10 21:06 
QuestionRe: list box Pin
Niklas L7-Jul-10 22:29
Niklas L7-Jul-10 22:29 
AnswerRe: list box Pin
Iain Clarke, Warrior Programmer7-Jul-10 22:51
Iain Clarke, Warrior Programmer7-Jul-10 22:51 
GeneralRe: list box Pin
AbhiHcl7-Jul-10 23:19
AbhiHcl7-Jul-10 23:19 
GeneralRe: list box Pin
Iain Clarke, Warrior Programmer7-Jul-10 23:30
Iain Clarke, Warrior Programmer7-Jul-10 23:30 
GeneralRe: list box Pin
Niklas L7-Jul-10 23:27
Niklas L7-Jul-10 23:27 
QuestionMFC SDI multiple resource file Pin
alexander 19837-Jul-10 19:43
alexander 19837-Jul-10 19:43 
AnswerRe: MFC SDI multiple resource file Pin
Iain Clarke, Warrior Programmer7-Jul-10 21:26
Iain Clarke, Warrior Programmer7-Jul-10 21:26 
QuestionBuilding Query using C++ Pin
T.RATHA KRISHNAN7-Jul-10 19:04
T.RATHA KRISHNAN7-Jul-10 19:04 
QuestionRe: Building Query using C++ Pin
«_Superman_»7-Jul-10 19:18
professional«_Superman_»7-Jul-10 19:18 
AnswerRe: Building Query using C++ Pin
T.RATHA KRISHNAN7-Jul-10 19:28
T.RATHA KRISHNAN7-Jul-10 19:28 
GeneralRe: Building Query using C++ Pin
«_Superman_»7-Jul-10 19:31
professional«_Superman_»7-Jul-10 19:31 
GeneralRe: Building Query using C++ Pin
T.RATHA KRISHNAN7-Jul-10 19:42
T.RATHA KRISHNAN7-Jul-10 19:42 
GeneralRe: Building Query using C++ Pin
«_Superman_»7-Jul-10 19:47
professional«_Superman_»7-Jul-10 19:47 
GeneralRe: Building Query using C++ Pin
T.RATHA KRISHNAN7-Jul-10 19:52
T.RATHA KRISHNAN7-Jul-10 19:52 
GeneralRe: Building Query using C++ Pin
«_Superman_»7-Jul-10 19:54
professional«_Superman_»7-Jul-10 19:54 
GeneralRe: Building Query using C++ Pin
T.RATHA KRISHNAN7-Jul-10 20:00
T.RATHA KRISHNAN7-Jul-10 20:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.