|
How Can i Do Windows Services program?. So that my application starts when system turns "ON".
-- modified at 8:03 Thursday 21st September, 2006
|
|
|
|
|
Sakthiu wrote: I have developed a dialog based applicaion. I want to change this dialog into windows service. So that my dialog program will start when system comes to "ON".
Why you wanted to do this ? Service is supposed to start in back ground and work silently.
See if
this[^] article helps you.
|
|
|
|
|
Use XYNTService. Just search for it here at CP.
Works as a charm (even) for GUI apps!
Here[^]
And Here[^]
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Mr Sakthiu,
what's the problem with your sig ?
can't you just edit it to avoid these dozens of empty lines ?
you're breaking the forums buddy ! do something, fast !
|
|
|
|
|
Sig means "Signature"...
Modify here[^]
also, why did you delete your question ? because you got the answers you were looking for ? that's selfish bobby ! you are on a forum, not a chat... people come here to share. what if you come here one day, and search the board for something that you won't find because it's been deleted ?
|
|
|
|
|
Ok. Fine
I resolved that problem (Signature Space). HereAfter This will not repeat.
okey.
|
|
|
|
|
good ! welcome to CP then
|
|
|
|
|
Sakthiu wrote: How Can i Do Windows Services program?. So that my application starts when system turns "ON".
You do not have to create a service to accomplish this goal.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I made a dialog application that draws text into the window using the device context:
CDC* pCD = GetDC();
pCD->TextOut(x, y, "some text I want to print");
I also made an option in which you can change the font. But you choose the print preview it is all messed up. Depending on what font size you choose it shows the letters overlapping each other or too far away from each other in the print preview.
Anyway to fix this?
This is how it looks like in the print preview depending on font size chosen:
http://www3.shrani.si/o.php?printpre951564.jpg
|
|
|
|
|
It seems I need some sort of ratio conversion between logical and physical pixel inside OnPrepareDC. I just can't figure out how to do this. Can anyone help me please?
|
|
|
|
|
Hi,
I am doing an sdi application with different views .In one of the form view i placed a list control.How can i color the list control header.
Thanks,
Radhika.
|
|
|
|
|
radhika28 wrote: I am doing an sdi application with different views .In one of the form view i placed a list control.How can i color the list control header.
You can ownerdraw the header control. But before that you must subclass the header control.
First get the header control and subclass it. Use CListCtrl::GetHeaderCtrl() for this purpose.
Read this[^] for more info.
|
|
|
|
|
Create customized HeaderCtrl class Say MyHeaderCtrl then create a member variable of this is in class of Listcontrol ,Then override the InsertColumn(...) there do the following code
InsertColumn(...)
{
CListCtrl::InsertColumn(...)
CHeaderCtrl *pHeaderCtrl = GetHeaderCtrl();
if(( 0 != pHeaderCtrl ) && ( FALSE != IsWindow( pHeaderCtrl->GetSafeHwnd())))
{
HeaderCtrl.SubclassWindow( pHeaderCtrl->GetSafeHwnd()); // HeaderCtrl is the member variable of type MyHeaderCtrl
}
........
}
|
|
|
|
|
How can i get HPALLETE from CPalette Object?
Best Regards.
MJM.
|
|
|
|
|
CPalette::GetSafeHandle();
nave
|
|
|
|
|
mostafa_pasha wrote: How can i get HPALLETE from CPalette Object?
CPalette cpPalette;
HPALETTE hPalette = cpPalette;
|
|
|
|
|
I'm working on a project where the settings will be stored to and loaded from a file on disk. The registry is unsuitable since I want these settings to be distributable and easy to be modified by a user.
I have worked with INI files many times and found them to be suitable for very simple data (like the registry), also they are easy to read (by eye) and edit. However I have noticed that quite a few apps these days are using XML files. I have never used them in an app before but it looks simple enough. So I was wondering what other coders would prefer to use, especially for the type of app as described above.
|
|
|
|
|
INI files are arguably more human readable, but an XML file is able to describe things better and is less prone to typos. If someone makes a mistake with an XML config, odds are it just won't load.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Wow, "... and the medal for fastest response..."
The files I am going to create will be a set of rules for a game. Since the game would eventualy be Multiplayer, it is important to quickly be able to share the same set of rules. I'm tempted to go with XML simply because I didn't do it before.
|
|
|
|
|
Christian Graus wrote: If someone makes a mistake with an XML config, odds are it just won't load.
The same holds true for .ini files.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
What he means is that it will fail to parse. An INI file will still load, but you will get invalid data back when calling GetProfileString/Int/etc at some point.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Typically, I would use XML. I used INI before but in some case it is quite limited.
I use a nice library, it's called tinyXML[^]
|
|
|
|
|
Thanks for the link. I was tempted to go with one those here on CP, but since this one comes recommended, and it's on SourceForge (always a good sign) I will use this one.
|
|
|
|
|
I agree with Cedric XML is better
|
|
|
|
|
waldermort wrote: I was tempted to go with one those here on CP, but
are you saying that CPians are not recommandable ?
|
|
|
|