Click here to Skip to main content
15,895,462 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How do I extern a structure? Pin
jmkhael3-Aug-04 1:57
jmkhael3-Aug-04 1:57 
GeneralRe: How do I extern a structure? Pin
Henry miller3-Aug-04 4:16
Henry miller3-Aug-04 4:16 
GeneralOverlaying Data (union) Pin
sweep1233-Aug-04 0:27
sweep1233-Aug-04 0:27 
GeneralRe: Overlaying Data (union) Pin
LittleYellowBird3-Aug-04 5:20
LittleYellowBird3-Aug-04 5:20 
GeneralRe: Overlaying Data (union) Pin
sweep1233-Aug-04 21:43
sweep1233-Aug-04 21:43 
QuestionSet Timer ??? Pin
Zeeshan Bilal3-Aug-04 0:13
Zeeshan Bilal3-Aug-04 0:13 
AnswerRe: Set Timer ??? Pin
Antony M Kancidrowski3-Aug-04 1:01
Antony M Kancidrowski3-Aug-04 1:01 
GeneralListcontrol problem Pin
JHAKAS3-Aug-04 0:09
JHAKAS3-Aug-04 0:09 
listCtrl problem:

Hello

I am inserting some item to list control from database.

Say items are stored in database as following:

A1, B1, C1, A2, B2, C2,A3,B3,C3 ------ line 1

My list control is in ascending sort order, so it displays the design as alphabetically ascending order:

A1, A2, A3, B1, B2, B3, C1, C2, C3 ------ line 2

Now in list box i am selecting B1,B2,B3 and using following code:



POSITION pos = m_DesignList.GetFirstSelectedItemPosition();<br />
<br />
// Get all the item in the listview selected 's Design ID <br />
// and assign it to the IDArray in the following loop<br />
if (pos == NULL)<br />
	TRACE0("No items were selected!\n");<br />
else<br />
	while (pos)<br />
	{<br />
		int nItem = m_DesignList.GetNextSelectedItem(pos);<br />
		if(D_EXPORT == m_ModeFlag )			// EXPORT mode<br />
		{<br />
			// indexArr is array filled in function onInitDialog. So it contains index value as shown in line 1<br />
			IDArray[incr++] = indexArr[nItem];   -- line 3<br />
		}	<br />
		m_indexCount ++;	// Increase the counter of number of designs selected<br />
	}


Line 3- is the main root of problem.
When i select say B1,B2,B3 from the list , so as there index in the list are 3,4,5 (0 based), but actually in the recordset they are 1,4,7 instead

Note: I have to keep the Listcontrol items in sorted manner.

Leave your mark wherever you go
GeneralRe: Listcontrol problem Pin
Michael P Butler3-Aug-04 0:39
Michael P Butler3-Aug-04 0:39 
Generalhandling databases in MFC Pin
Anonymous3-Aug-04 0:08
Anonymous3-Aug-04 0:08 
GeneralRe: handling databases in MFC Pin
JHAKAS3-Aug-04 0:25
JHAKAS3-Aug-04 0:25 
GeneralRe: handling databases in MFC Pin
Michael P Butler3-Aug-04 0:44
Michael P Butler3-Aug-04 0:44 
GeneralRe: handling databases in MFC Pin
Anders Gustafsson17-Jan-06 5:15
Anders Gustafsson17-Jan-06 5:15 
GeneralA question Pin
rfixxxer2-Aug-04 23:53
rfixxxer2-Aug-04 23:53 
GeneralRe: A question Pin
Anonymous3-Aug-04 0:01
Anonymous3-Aug-04 0:01 
GeneralRe: A question Pin
rfixxxer3-Aug-04 0:07
rfixxxer3-Aug-04 0:07 
GeneralRe: A question Pin
Zeeshan Bilal3-Aug-04 0:16
Zeeshan Bilal3-Aug-04 0:16 
GeneralRe: A question Pin
David Crow3-Aug-04 3:48
David Crow3-Aug-04 3:48 
GeneralMakefile problems Pin
mcsherry2-Aug-04 23:40
mcsherry2-Aug-04 23:40 
Generallinking error with &quot;afxdao.h&quot; Pin
si_692-Aug-04 23:19
si_692-Aug-04 23:19 
GeneralRe: linking error with &quot;afxdao.h&quot; Pin
David Crow3-Aug-04 3:54
David Crow3-Aug-04 3:54 
GeneralRe: linking error with &quot;afxdao.h&quot; Pin
si_693-Aug-04 3:58
si_693-Aug-04 3:58 
GeneralRe: linking error with &quot;afxdao.h&quot; Pin
David Crow3-Aug-04 4:04
David Crow3-Aug-04 4:04 
QuestionHow to show a dialog in the taskbar? Pin
GiHubb2-Aug-04 23:12
GiHubb2-Aug-04 23:12 
Questionhow to fing windows system directory Pin
Anonymous2-Aug-04 22:42
Anonymous2-Aug-04 22:42 

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.