|
thanks for the interest.... but... if i change this....
/*
char **Temp;
Temp = (char **)malloc(sizeof(char *));
*Temp = (char *)malloc(MAX_LIST);
DWORD size = MAX_LIST;
*/
BYTE Temp[1024];
DWORD size = sizeof(Temp);
CString sTemp,sTemp2;
if (RegQueryValueEx(pParentWnd->m_ListKey, RSS_KEY,0,NULL,Temp,&size) == ERROR_SUCCESS)
{
//Temp[size] = '\0';
while(**Temp != '\0')
{
sTemp = strsepRss(Temp,';'); <==
////////////////Problem////////////////////
i have problem here because strsepRss ask char ** stringp
//////////////////////////////////////////
m_cRss1Combo.AddString(sTemp);
m_cRss2Combo.AddString(sTemp);
}
m_cRss1Combo.SetCurSel(0);
m_cRss2Combo.SetCurSel(1);
}
else
{
m_cRss1Combo.AddString(ECHO_LINK);
m_cRss2Combo.AddString(ECHO_LINK);
m_cRss1Combo.SetCurSel(0);
m_cRss2Combo.SetCurSel(0);
}
//posiziona i due combo box sul rss precedentemente salvato
if((m_cRss1Combo.FindStringExact(-1,pParentWnd->m_sRss1)) != -1)
m_cRss1Combo.SetCurSel(m_cRss1Combo.FindStringExact(-1,pParentWnd->m_sRss1));
if((m_cRss2Combo.FindStringExact(-1,pParentWnd->m_sRss2)) != -1)
m_cRss2Combo.SetCurSel(m_cRss2Combo.FindStringExact(-1,pParentWnd->m_sRss2));
UpdateString(pParentWnd->m_iVisualizationControl);
//free(*Temp);//giulio
free(Temp);
sorry but i'm a novice of c++...
thanks still...
Giulio
|
|
|
|
|
Ing.Raiz82 wrote: i have problem here because strsepRss ask char ** stringp
So just use strtok() .
Or, since you are using MFC, use a CString object, and AfxExtractSubString() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
thanks you so much... now work...
sorry for the time...
thanks
Giulio
|
|
|
|
|
1) you don't initialize the memory allocated
2) please use new[] /delete[] instead of malloc() /free()
3) prefer using containers such as std::vector if you need dynamic arrays (good for arrays of arrays too)
4) please also use <pre></pre> tags when posting code blocks
-- modified at 11:29 Wednesday 21st March, 2007
|
|
|
|
|
Ing.Raiz82 wrote: but i don't understand....
Do you really required double pointer???
looking at code, I don't think so it is required.
You could use single pointer to do same job.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Generally allocation of memory is from TOP-to-BOTTOM approch. and deallocation of memory is BOTTOM-to-TOP approch.
Allocate => parent -> child -> subchild.<br />
Deallocate => subchild -> child ->parent.
if you deallocate parent first, then it looses the reference to child and finally subchild also which will leads to memory leaks.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hello!
I have now try to find information about changing font and color on a specific item in a listbox without succeed.
I find a "turtorial" on http://www.codersource.net/mfc_clistbox_font.html witch is describing exactly how to make a function cald MyListbox whitch change the font and color of a item in a listbox.
The problem is... I dont have any ide how to use it? Is it anybody who can help me get this function working and I will be very happy!
How do a declare declare LPDRAWITEMSTRUCT?
Thank you all!
//Anders
|
|
|
|
|
How can I convert the content of a CString object into
a "const char *" type in a VS2005 UNICODE MFC application?
In VS6 there were only CString class... now, in VS2005,
developing UNICODE projects, is still good to use CString
or is better use CStringW or CStringT ?
Thanks a lot !
|
|
|
|
|
use CString. it is a conveniant shortcut to either CStringA (ansi builds) or CStringW (unicode builds).
with this, always use _T() marco around your litteral strings.
and to convert from a CString object, use the LPCTSTR (or LPTSTR if constness is too much), mixed if needed with conversion macros such as T2W, T2A, CT2W, CT2A, etc... (Clikety[^])
|
|
|
|
|
Hi,
We need help to create a window and display three variables with big fonts. How do we do this, we don't need nothing complicated. Please help!
alex
|
|
|
|
|
|
nice demo program but it is a bit complicated for us. we have only been programming c++ for three weeks and we need something simpler and easier to follow with a few commands/functions. thanks
|
|
|
|
|
Your problem can be broken down into at least three smaller problems:
1) Create a window
2) Display data
3) Use a font other than the default
Which part do you need help with? Are you using MFC?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
we would like to get help with 2)display data and 3)Use a font other than the default. And yes, we are using MFC.
thank you for taking your time.
|
|
|
|
|
alimanishere wrote: we would like to get help with 2)display data...
In the OnPaint() handler, use TextOut() .
alimanishere wrote: 3)Use a font other than the default.
Select a new font into the DC used by the OnPaint() handler.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
ok thanks..but how do you change the font size?
|
|
|
|
|
alimanishere wrote: how do you change the font size?
LOGFONT lf = {0};
_tcscpy(lf.lfFaceName, _T("MS Sans Serif"));
lf.lfHeight = 8;
lf.lfWeight = FW_BOLD;
CFont font;
m_font.CreateFontIndirect(&lf);
dc.SelectObject(font);
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello Friends
Any idea as to how we can export a document in text/HTML format to RTF/DOC format?
Is there anything free from microsoft to do the conversion?
Or some other library / some way?
Regards
|
|
|
|
|
I would be tempted to try it with Word. It has a COM interface that can open/save documents.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
A possibly quick and dirty way is to create an application that has a Rich Edit control on it, and paste in content from a normal edit control or a browser. You can then stream the RTF back out of the rich edit control.
It is Q&D, but it should work...
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
how to insert a dll to our VC++ Project files and how to findout the functions exported to it if we don't have knowledge on it...pl any one answer it
Thanks a lot
|
|
|
|
|
|
Should start from Part 1[^] of series of articles by Hans Dietrich.
|
|
|
|
|
Hello comunity,
i try to open local html files using CInternetSession::OpenURL(); function, but this fails
every time when the path has some letters that are over 122, example, if path contains
letter ä!
I recive an error that the path is incorect, and the letter in this case ä is changed to %E4!
How to solve this, is this posible?
And, if the path has only the normal letters, this funktion works fine!
thanks for any help!
with best regards
break;
|
|
|
|
|
I believe URLs have a limited set of allowed characters, something like:
Only alphanumerics [0-9a-zA-Z] and the special characters $-_.+!*'(),
Any other characters need to be encoded.
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|