|
apparently, some idiots didn't like it
|
|
|
|
|
|
Do you want us to create the video for you?
Try GOOGLE![^]
"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."
|
|
|
|
|
|
Hello,
Can any body help me on my query…
I’m new to VC++6. I built an application for printer, in which I Read printerDriverData from windowsXp registry and write all the data in to a file in specific Location of hard-disk. Now I again want to import that data in the same location of registry with using a SetPrinterDataEx() function. But I’m not able to do it. Can any one help me of my query?
Plz guide me on my query…I’m so thankful to you
Ashish Bajpai
|
|
|
|
|
I wonder that, will the fundamentals of microsoft windows programming change with Vista?
|
|
|
|
|
It is mostly the same, I have ported most of my code to Vista. At most some Security issues have changed, but a lot of it makes sences.
As ever "The best Windows ever"
Greetings from Germany
|
|
|
|
|
Hi all.
I write service and now I am writing API(I use MFC Dialog form).
This API must install my service, but I have problem with it.
Wen I write:
<br />
SC_HANDLE schService;<br />
<br />
<br />
SC_HANDLE schSCManager;<br />
<br />
LPQUERY_SERVICE_CONFIG lpBuf;<br />
Or
<br />
schService = CreateService(<br />
schSCManager,<br />
MYServiceName,<br />
MYServiceName,<br />
SERVICE_ALL_ACCESS,<br />
SERVICE_WIN32_OWN_PROCESS,<br />
SERVICE_DEMAND_START,<br />
SERVICE_ERROR_NORMAL,<br />
"c:\\ntbk2\\src\\service\\small\\debug\\small.exe",<br />
NULL,<br />
NULL,<br />
"",<br />
NULL,<br />
NULL);<br />
Compile give me error message.
I include windows.h in my project, but noting. My program can't see thet CreateService() is function or 'LPQUERY_SERVICE_CONFIG' is struct.
I acnt see what I do wrong.
How can I install my service?
|
|
|
|
|
Check if you have latest platform SDK.
Have look at this FAQ[^].
|
|
|
|
|
|
Thanks.
|
|
|
|
|
|
Hi Guys,
Can anyone guide me to check whether particular application is been installed on my machine or not thorugh coding (may be Windows API or MFC).
Thanks in advance.
|
|
|
|
|
Try getting the installed applications list through the registry.
Check HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
|
|
|
|
|
chirag_chauhan wrote: Can anyone guide me to check whether particular application is been installed on my machine
This registry key holds some information ( Start->Run fetches commands from here )
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
This registry key also holds information on installed applications ("Open with" dialog fetches application names from here).
HKEY_CLASSES_ROOT\Applications
|
|
|
|
|
|
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
|
|
|
|