Click here to Skip to main content
15,887,392 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Multithreading Pin
Cedric Moonen1-Mar-06 21:00
Cedric Moonen1-Mar-06 21:00 
GeneralRe: Multithreading Pin
Waldermort1-Mar-06 21:54
Waldermort1-Mar-06 21:54 
GeneralRe: Multithreading Pin
Cedric Moonen1-Mar-06 22:19
Cedric Moonen1-Mar-06 22:19 
AnswerRe: Multithreading Pin
Joe Woodbury1-Mar-06 21:20
professionalJoe Woodbury1-Mar-06 21:20 
Questionc++ Pin
yaaqub1-Mar-06 20:28
yaaqub1-Mar-06 20:28 
AnswerRe: c++ Pin
Nibu babu thomas1-Mar-06 20:33
Nibu babu thomas1-Mar-06 20:33 
AnswerRe: c++ Pin
Stephen Hewitt1-Mar-06 22:28
Stephen Hewitt1-Mar-06 22:28 
QuestionCombo box height is not increasing Pin
BiswaR1-Mar-06 19:45
BiswaR1-Mar-06 19:45 
Hi Guys,
I have a list control containing 3 columns, When i click on any item in the list box it again pops up a combo box having 3 values.If you select a valu in that combobox then it sets that value to the 2nd column of the list control. But problem is that when i am tring to increase the height of the combo box it's not increasing and reamain same always. I am giving you the whole code. please tell me how to fix this problem. I am trying to increase the rect.bottom in the code -> "PLEASE SEE THIS". This code is not complicated at all and you can ignor many things as the last portion is only important and i have given the comment there.

void CListAgr::OnListLButton(WPARAM wParam, LPARAM lParam)
{

UINT nFlags = lParam;
int iItem = wParam;
int iItem = m_list_Agr.GetNextItem(-1, LVNI_SELECTED);


if (iItem >= 0) // If any item in the list box is selected
{
CRect rect;
int offset = 0;
// Make sure that the item is visible
m_list_Agr.GetSubItemRect(iItem, 1, LVIR_BOUNDS, rect);
// Now scroll if we need to expose the column
CRect rcClient;
m_list_leaseabs.GetClientRect(rcClient);


// Set the scroll size. You can ignore this as it is always false and not
// executed

if( offset + rect.left < 0 || offset + rect.left > rcClient.right )
{
CSize size;
size.cx = rect.left;
size.cy = 0;
m_list_leaseabs.Scroll(size);
rect.left -= size.cx;
}

//Checks if the right edge of combo box is greater than the list control
//and if that is true then it will make right edge of combobox equal to
// right edge of list control

rect.left += offset;
rect.right = rect.left + m_list_Agr.GetColumnWidth(1);
if(rect.right > rcClient.right)
rect.right = rcClient.right;


// Here i am setting the length(bottom) of the combo box,creating it and
// displaying it. I think there is some problem in the code below.

rect.NormalizeRect();
rect.bottom += 10 * rect.Height();//dropdown area "PLEASE SEE THIS"
rect.left += 10;
rect.right += 10;
rect.top += 30;

CStringList lstItems;
lstItems.AddTail("X");
lstItems.AddTail("Y");
lstItems.AddTail("Z");

CComboBox *pADFList = new CComboInListView(iItem, 1, &lstItems);

DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_VSCROLL |
WS_HSCROLL|CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL;

pADFList->Create(dwStyle, rect, this, IDC_COMBOBOXINLISTVIEW);
pADFList->ModifyStyleEx(0,WS_EX_CLIENTEDGE);

pADFList->SetHorizontalExtent(m_list_Agr.GetColumnWidth(1));
pADFList->ShowDropDown();

pADFList->SelectString(-1, m_list_Agr.GetItemText(iItem, 1));
} // End of outer if Statement

}


-- modified at 1:46 Thursday 2nd March, 2006
AnswerRe: Combo box height is not increasing Pin
Naveen1-Mar-06 20:42
Naveen1-Mar-06 20:42 
QuestionUsing Serial Port communication for dialog based application Pin
BeakX1-Mar-06 19:44
BeakX1-Mar-06 19:44 
AnswerRe: Using Serial Port communication for dialog based application Pin
Cedric Moonen1-Mar-06 20:26
Cedric Moonen1-Mar-06 20:26 
GeneralRe: Using Serial Port communication for dialog based application Pin
Rick York1-Mar-06 21:50
mveRick York1-Mar-06 21:50 
GeneralRe: Using Serial Port communication for dialog based application Pin
Cedric Moonen1-Mar-06 22:00
Cedric Moonen1-Mar-06 22:00 
Questionhow to show images on window and move. Pin
baldha rakesh1-Mar-06 19:19
baldha rakesh1-Mar-06 19:19 
AnswerRe: how to show images on window and move. Pin
Nibu babu thomas1-Mar-06 19:54
Nibu babu thomas1-Mar-06 19:54 
GeneralRe: how to show images on window and move. Pin
baldha rakesh1-Mar-06 20:14
baldha rakesh1-Mar-06 20:14 
QuestionHow to test the MTTTY example of serial comm in Win32 console? Pin
pkyiu1-Mar-06 19:17
pkyiu1-Mar-06 19:17 
QuestionHow to convert exe to dll Pin
BicycleTheif1-Mar-06 18:38
BicycleTheif1-Mar-06 18:38 
AnswerRe: How to convert exe to dll Pin
Naveen1-Mar-06 18:49
Naveen1-Mar-06 18:49 
Questionrelated to images Pin
baldha rakesh1-Mar-06 17:19
baldha rakesh1-Mar-06 17:19 
AnswerRe: related to images Pin
Nibu babu thomas1-Mar-06 17:36
Nibu babu thomas1-Mar-06 17:36 
AnswerRe: related to images Pin
Naveen1-Mar-06 17:39
Naveen1-Mar-06 17:39 
AnswerRe: related to images Pin
Hamid_RT1-Mar-06 18:05
Hamid_RT1-Mar-06 18:05 
Questionimage processing Pin
elips1-Mar-06 17:12
elips1-Mar-06 17:12 
AnswerRe: image processing Pin
Member 22716551-Mar-06 23:27
Member 22716551-Mar-06 23:27 

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.