Click here to Skip to main content
15,913,669 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MemDC !!! Pin
Andre Massada29-Aug-04 20:39
Andre Massada29-Aug-04 20:39 
GeneralRe: MemDC !!! Pin
Andre Massada31-Aug-04 9:42
Andre Massada31-Aug-04 9:42 
GeneralRe: MemDC !!! Pin
KaЯl29-Aug-04 22:46
KaЯl29-Aug-04 22:46 
GeneralRe: MemDC !!! Pin
Andre Massada30-Aug-04 5:14
Andre Massada30-Aug-04 5:14 
GeneralRe: MemDC !!! Pin
KaЯl30-Aug-04 5:38
KaЯl30-Aug-04 5:38 
GeneralRe: MemDC !!! Pin
Andre Massada30-Aug-04 9:02
Andre Massada30-Aug-04 9:02 
GeneralRe: MemDC !!! Pin
KaЯl31-Aug-04 3:16
KaЯl31-Aug-04 3:16 
GeneralHaving trouble with arrays. Pin
nigma_x29-Aug-04 9:18
nigma_x29-Aug-04 9:18 
I'm using Visual C++.net 2002. I'm using CIni in an MFC from this site. http://www.codeproject.com/cpp/CIni.asp#xx909443xx. The problem I'm having is I Can declare the CStringArray in the function. Pass it to GetKeyNames. I'm unable to access any of the elements in the Array. Don't know If I'm declaring the array correct or not. I've tried to declare the CStringArray variable using the variable wizard. This allows me to access the elements but I'm unable to pass the array to GetKeyNames. Sort of new with C++ MFC. Any help would be great. This is the code so far. What I'm tring to do is get a list of the Keys in a section and display them in a Edit Control. Tried to get an anwser from the site forum but no response. Any help would be great.


void CRunProgramDlg::OnBnClickedOk()<br />
{<br />
//// TODO: Add your control notification handler code here<br />
<br />
<br />
<br />
<br />
<br />
LPTSTR Current = NULL;<br />
DWORD dwBuffer = 100;<br />
CString ArrayString;<br />
<br />
//CStringArray Declared with the variable wizard and using <br />
//Using SetSize to set the size of the array<br />
m_FindKey.SetSize(32,0);<br />
<br />
//CStringArray declared in the function set array to 1<br />
CStringArray ProfileSearch[1];<br />
<br />
CIni ini;<br />
ini.SetPathName("C:\\amrtemp\\file2.ini");<br />
ini.GetKeyNames("Routing Indicator",Current,dwBuffer);<br />
<br />
//When using this CStringArray in GetKeyNames recieve error<br />
// error C2664: 'void CIni::GetKeyNames(LPCTSTR,CStringArray *) <br />
// const' : cannot convert parameter 2 from 'CStringArray' to 'CStringArray *<br />
ini.GetKeyNames("Routing Indicator",m_FindKey);<br />
<br />
//When using this CStringArray in ProfileSearch I don't recieve an error here<br />
ini.GetKeyNames("Routing Indicator",ProfileSearch);<br />
<br />
<br />
<br />
<br />
<br />
//Don't know if this works. Wont'compile after ini.GetKeyNames <br />
//("RoutingIndicator",m_FindKey);<br />
ArrayString = m_FindKey.GetAt(1);<br />
<br />
//Recieve error C2679: binary '=' : no operator found which takes a right-hand<br />
//operand of type 'CStringArray' (or there is no acceptable conversion)<br />
ArrayString = ProfileSearch[1];<br />
<br />
m_strBrowse = ini.GetString("Routing Indicator", ArrayString,"Dev");<br />
<br />
<br />
<br />
UpdateData(FALSE);<br />

I'm at a loss I don't think I'm declaring the variables correctly.
GeneralRe: Having trouble with arrays. Pin
PJ Arends29-Aug-04 9:34
professionalPJ Arends29-Aug-04 9:34 
GeneralRe: Having trouble with arrays. Pin
nigma_x30-Aug-04 3:54
nigma_x30-Aug-04 3:54 
GeneralRegistry question Pin
Andre Massada29-Aug-04 8:35
Andre Massada29-Aug-04 8:35 
GeneralRe: Registry question Pin
PJ Arends29-Aug-04 8:53
professionalPJ Arends29-Aug-04 8:53 
GeneralRe: Registry question Pin
Andre Massada29-Aug-04 9:53
Andre Massada29-Aug-04 9:53 
Generalsetting font size in wm_paint Pin
Tyrus18229-Aug-04 8:30
Tyrus18229-Aug-04 8:30 
GeneralRe: setting font size in wm_paint Pin
bneacetp29-Aug-04 9:02
bneacetp29-Aug-04 9:02 
GeneralRe: setting font size in wm_paint Pin
PJ Arends29-Aug-04 9:03
professionalPJ Arends29-Aug-04 9:03 
GeneralMultiple inheritance in MFC Pin
Vaclav29-Aug-04 8:21
Vaclav29-Aug-04 8:21 
GeneralRe: Multiple inheritance in MFC Pin
PJ Arends29-Aug-04 9:52
professionalPJ Arends29-Aug-04 9:52 
GeneralRe: Multiple inheritance in MFC Pin
Vaclav30-Aug-04 7:07
Vaclav30-Aug-04 7:07 
GeneralRe: Multiple inheritance in MFC Pin
PJ Arends30-Aug-04 17:58
professionalPJ Arends30-Aug-04 17:58 
GeneralRe: Multiple inheritance in MFC Pin
Vaclav31-Aug-04 9:57
Vaclav31-Aug-04 9:57 
GeneralStruct for CListCtrl items/subitems Pin
Thomas Latuske29-Aug-04 8:03
Thomas Latuske29-Aug-04 8:03 
GeneralRe: Struct for CListCtrl items/subitems Pin
toxcct29-Aug-04 9:24
toxcct29-Aug-04 9:24 
GeneralRe: Struct for CListCtrl items/subitems Pin
KaЯl29-Aug-04 22:53
KaЯl29-Aug-04 22:53 
GeneralRe: Struct for CListCtrl items/subitems Pin
David Crow30-Aug-04 4:44
David Crow30-Aug-04 4:44 

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.