|
Sarvan AL wrote: Since I am a newbie to Windows Registry Handling
Then it's trouble. You'll have to learn first. Coz registry is very sensitive to changes. Any wrong action is catastrophic. It could take the entire OS down.
Sarvan AL wrote: I am not able to grasp the things exactly
Only in the beginning.
Sarvan AL wrote: I'd like to know, what is happening behind HKCU and HKLM.
Nothing special is going on.
Sarvan AL wrote: Is it very hard to make the UI settings common to all the users?
Not at all. But first learn how to work with the registry.
Microsoft has provided this set of functions(WriteProfileString is one of them) so that users don't have to break their head writing and reading values from the registry. There are some easy functions for manipulation of registry. Look at what Ganesh said.
All the best.
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
Hi Nibu,
I really agree with you. As you said, Windows Registry is very sensitive. That's why I didn't want to do anything trial and error. Let me learn the basics first.
Thanks for your suggestion.
Sarvan AL
|
|
|
|
|
Sarvan AL wrote: Let me learn the basics first.
Great! It's very easy. I would recommend open up the registry and see what is inside and understand why it is there.
Sarvan AL wrote: As you said, Windows Registry is very sensitive.
Yes it is! But it's a safe approach to use WriteProfileString ,... and others in that group.
Sarvan AL wrote: That's why I didn't want to do anything trial and error.
Never! First Back Up
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
Use RegCreateKey to creaet the key under any root. Just you have to specify
HKLM_LOCAL_MACHINE and other parameters
You can set values by RegSetValue or RegSetValueEx
Cab get value by : RegQueryValue or RegQueryValueEx.
you can ermove entry by RegDeleteKey and RegDeleteValue.
Cheers
"Peace of mind through Technology"
|
|
|
|
|
would you please tell me how to set the meflexgrid cell wordwrap?
CMSFlexGrid m_flexgrid;
though I add "m_flexgrid.SetWordWrap(true);" in the code add set the msflexgrid wordwrap true in property tabel, It still can't work.
why?
|
|
|
|
|
i found it can work with only where there is a space" ";
such as CString str="afasdfwe adf adsf efs dfe asfe af";
wordwrap occurs at the space character" ";
if the CString str ="adfasdfewfwegfregergruwergrgqa";
why can't the wordwrap function work?
|
|
|
|
|
zeus_master wrote: if the CString str ="adfasdfewfwegfregergruwergrgqa";
Where should it break?
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
anywhere, depends on the width of the cells?
|
|
|
|
|
Hi ,
From the below code it displays the file name on the output screen,can anyone please tell how to add them to List box ??
I have list box IDC_OUTPUT CListCtrl m_output.
-----------------------------------
if (e != NULL) {
readFiles (e->left);
fp = fopen (e->filename, "r");
fnum++;
if ((s = (char*)strrchr(e->filename, '/')) == NULL)
cout << e->filename; //Prints file name
else
cout << e->filename; //Prints File name
insert (fnum, e->filename);
if (fp) {
wds = getWord (fp,fnum);
}
cout << " (" << wds << " words)" << endl; //Prints number of words
fclose (fp);
------------------------------------
Regards,
Parichay.
|
|
|
|
|
hi parichaya,
u want to add to ListBox or ListControl?
r u from AP?
|
|
|
|
|
Hi,
its List Control.
I am from Bangalore.
|
|
|
|
|
hii,
where r u working in b'lore?
|
|
|
|
|
Hey i am nt working,i am doing my MCA project work.
|
|
|
|
|
good.
may i know on which project u r doing?
ur name?
|
|
|
|
|
|
Hi,
Thanks for the reply,
its CListCtrl,
|
|
|
|
|
Use InsertItem of CListCtrl .
There is an example in MSDN related to this. Please look up InsertItem . I guess here you will have to use the report style(LVS_REPORT ).
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
Hi,
Thanks for the reply..I just checked the MSDN Ex..
---------------------
Example MSDN
// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;
CString strText;
int nColumnCount = pmyListCtrl->GetHeaderCtrl()->GetItemCount();
// Insert 10 items in the list view control.
for (int i=0;i < 10;i++)
{
strText.Format(TEXT("item %d"), i);
// Insert the item, select every other item.
pmyListCtrl->InsertItem(
LVIF_TEXT|LVIF_STATE, i, strText,
(i%2)==0 ? LVIS_SELECTED : 0, LVIS_SELECTED,
0, 0);
// Initialize the text of the subitems.
for (int j=1;j < nColumnCount;j++)
{
strText.Format(TEXT("sub-item %d %d"), i, j);
pmyListCtrl->SetItemText(i, j, strText);
}
}
----------------------------------------
extern CListCtrl* pmyListCtrl;
can u tell me what the use of the above statment ??
|
|
|
|
|
parichaybp wrote: extern CListCtrl* pmyListCtrl;
can u tell me what the use of the above statment ??
This is just an indication that pmyListCtrl is declared elsewhere. Most of the samples have this kind of declaration.
You can ignore this and concentrate on the essentials.
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
parichaybp wrote: extern CListCtrl* pmyListCtrl;
Meaning the variable CListCtrl* pmyListCtrl is declared somewhere else (another .cpp file) outside this cpp file.
Maxwell Chen
|
|
|
|
|
Hi Maxwell Chen,
Hope U still Remember me..
i just tried with this statment
CString strText = "hello";
m_OUTPUT->SetItemText(1, 1, strText);
is this correct ???
|
|
|
|
|
Yes I remember you.
Regarding to a CListCtrl, you had better use the structured data to feed it. As what WhiteSky has provided (THE REPLY[^]) 3 min earlier.
[Edit]
A second method is to use CListCtrl::InsertItem(nIndex, sStr) , if it contains only one column.
[/Edit]
Maxwell Chen
|
|
|
|
|
parichaybp wrote: extern CListCtrl* pmyListCtrl;
can u tell me what the use of the above statment ??
And that's why I have suggested you to read a book about the syntax of C++ Language.
Maxwell Chen
|
|
|
|
|
<br />
void CAnswerView::FillList(CListCtrl *m_ListCtrl,CListBox *m_ListBox,CString str)<br />
{<br />
if(m_ListCtrl)<br />
{<br />
LV_ITEM Item2={0};<br />
<br />
Item2 .mask = LVIF_TEXT| LVIF_STATE|LVIF_PARAM;<br />
Item2 .iItem =m_ListCtrl->GetItemCount(); <br />
Item2 .pszText = CA2T(str);<br />
Item2 .stateMask = LVIS_STATEIMAGEMASK;<br />
Item2 .state = INDEXTOSTATEIMAGEMASK(1);<br />
m_ListCtrl->InsertItem( &Item2);<br />
<br />
}<br />
<br />
if(m_ListBox)<br />
{<br />
m_ListBox->AddString(str);<br />
m_ListBox->InsertString(0,str);<br />
}<br />
}<br />
|
|
|
|
|
Hi WhiteSky,
CListCtrl *m_OUTPUT;
CString strText = "hello";
m_OUTPUT->SetItemText(1, 1, strText);
is the above statment correct ?? i tryed but its not giveing any output.
|
|
|
|