|
Short of searching the entire disk(s), there's no sure-fire way of finding such information. You could look in places like HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths, but those are only as good as the applications themselves. An application is not required to update those registry keys.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hallo,
Does anyone here know an easy way to change the text of the header of a listCtrl. Till now, I delete all columns and insert them with the new text again. But I think, there should be an easier way
Thanks, Gerhard
|
|
|
|
|
ensger wrote: Does anyone here know an easy way to change the text of the header of a listCtrl.
Use SetColumn .
An Eg:
LVCOLUMN lvCol = { 0 };
lvCol.mask = LVCF_TEXT;
lvCol.pszText = _T( "Nibu babu thomas" );
SetColumn( 0, &lvCol );
|
|
|
|
|
Thank's a lot. Seems to work fine.
Have a nice weekend, Gerhard
|
|
|
|
|
Thank's for the example - my text is stored in a CString. And with this it doesn't work (conversion to string doesn't help).
But it works with a code like this:
<br />
char othertext[100];<br />
sprintf(othertext, "%s", text);<br />
lvc.pszText = othertext;<br />
Am I crazy to do so????
|
|
|
|
|
ensger wrote: char othertext[100];
sprintf(othertext, "%s", text);
lvc.pszText = othertext;
ensger wrote: Am I crazy to do so????
Yes!!
What about...
lvc.pszText = text;
Either way text is a string right?
Well if you have want to have strings that contain number then it's quite ok...
sprintf( othertext, "Column number: %d", 1 );
lvc.pszText = othertext;
|
|
|
|
|
Maybe my part of code was too short so I send the whole loop
<br />
LVCOLUMN lvc;<br />
CString titel;<br />
int i = 3;<br />
if (kstkaranz->wdfirst())<br />
do<br />
{<br />
i++;<br />
titel = kstkaranz->wdgetkstnr() + "\n";<br />
titel = titel + gettitel(0, kstkaranz->wdgetdatenart(), kstkaranz->wdgetvon(), kstkaranz->wdgetbis());<br />
listCtrl.GetColumn(i, &lvc);<br />
char strbetrag[100];<br />
<br />
sprintf(strbetrag, "%s", titel);<br />
lvc.pszText = strbetrag;<br />
listCtrl.SetColumn(i, &lvc);<br />
}<br />
while(kstkaranz->wdnext());<br />
where kstkaranz->wdgetkstnr = something like "6984" (number of a cost center) and the result of gettitle is something like " PLAN VALUES 2007-01-01 - 2007-02-28'. The whole result in titel is a CString (with numbers, of course, but handled as CString).
Btw, it works fine and as there should be no difference, whatever the CString titel contains, I see no danger. But your posting made me consider ....??
Btw2: if I try "lvc.pszText = titel;" I get an error-message like (I try to translate): Binary operator: no operator defined who accepts a right-sided operator of type 'class CString'
-- modified at 12:07 Friday 23rd February, 2007
|
|
|
|
|
Your code is fine. But your code snippet made me say that.
There is no point in sprintfING another string into another string. Since we already have a string it should be fine.
You can assign a CString object into lvc.pszText , do this...
lvc.pszText = titlel.GetBuffer(0);<br />
titlel.ReleaseBuffer();
|
|
|
|
|
Hey, this seems to become a fine weekend. I'm just having breakfase (it's 8:00 here), want to read some newspapers in the internet - and the first when I look on my monitor is your message. Of course I tried suddenly and it works!
Btw - with ' 'why I'm wrong ' I wanted to say 'why I made something wrong in my code'. My english
So, many thanks and have a nice weekend too
|
|
|
|
|
ensger wrote: Btw - with ' 'why I'm wrong '
The reason is you could have used "title" directly instead of trasferring it into another string. Does such a copy satisfy any purpose.
None AFAIK. It will be a performance hit. It's redundant that's why I said you are wrong.
|
|
|
|
|
I tried your code but now all my columns say "Nibu babu thomas"
Just kidding
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
No problem, if I can say "nibu babu thomas - PLAN Values" and son on
But indead, his answer helped me very much. I don't know, why he said I'm wrong
No problem, it works
|
|
|
|
|
ensger wrote: I don't know, why he said I'm wrong
I said that from your code snippet.
Look at the following example...
char title1[100];
sprintf( title, "%s", aString );
What's the point in doing this!!!. Since aString is already a string why not directly assign that string in a proper way and also on the long run this could be a performance hit.
|
|
|
|
|
Mark Salsbery wrote: I tried your code but now all my columns say "Nibu babu thomas"
RLY!! ;P
|
|
|
|
|
Hi,
I launched one application through CreateProcess()on a Button click event.
Now application is running and i want to pass arguments, to this application on some other button click event.
Is there any solution for this?
Pls help me.
Techneeli
|
|
|
|
|
Its your program or a foreign application
|
|
|
|
|
Hello, brother/friends in this codeproject.com forum.
first, My Name is Pardi Banjarnahor, I come from Indonesia.
as an information, my background aducation is in electronics.
the matter is I have a plan to make a program (software) that make possible for chatting (a client server application). May be it is like a SIMPLE yahoo messenger.
May questions are:
1. what kind of compiler (software) that is better, off course easy (simple) to make that sofware ( a client-server application).
2. it's possible to create/program it using MFC in Visual C++ 6.0?
3. I'm still a beginner in C++ programming, but I'm longing to be a good programmer in C++. If any one of you have information or advise (suggestion), It'll be very useful for me. if it's possible for you, you can e-mail me through Pardi.Marbun@gmail.com
Thanks for your attention and help.
Best Regards,
Thanks and GBU
|
|
|
|
|
There are several articles on client/server chat systems on this[^] CP page.
/ravi
|
|
|
|
|
|
Hi all
How can we read the data on webpage.
#sanroop#
|
|
|
|
|
|
|
Aside from the obvious answer of, "With your eyes," can you be a bit more specific about what you want?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
See this[^] article for an easy way to scrape HTML.
/ravi
|
|
|
|
|
hi i am having a function named FinalCall() which in turn call some functions. i have to do thread for this in mfc. i tried
void CBootLoader1Dlg::OnYes()
{
AfxBeginThread(ComputeThreadProc,phObjectHandle);
//FinalCall();
}
UINT CBootLoader1Dlg::ComputeThreadProc(LPVOID pParam)
{
HWND *phObjectHandle = static_cast<hwnd *="">(pParam);
::PostMessage(*phObjectHandle, WM_UPDATE_CONTROL, 0, 0);
return 0;
}
LRESULT CBootLoader1Dlg::PaintText(char* lParam)
{
FinalCall();
return 0;
}
there is no errors . but i cant acheive the threading.
can any one explain this
thanx in advance
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|