|
Why don't you read MSDN doc about Services?!!!
There is everything, with plenty of complete samples !
|
|
|
|
|
Hi there-
How does one go about creating a virtual drive mounted in the OS?
What API's would one hook to to serve a virtual drive?
Thanks in advance.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
Hi,
WinCDEmu[^] is an open source disc emulating tool. See if that helps.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
i am in dire need of someone to teach me how to compile programs, from source codes, i have tried and tried to figure it out on my own and am having no luck, i am about to lose it guys, please help me, i am trying to use cygwin, edit plus3, visual studio c# 2008, and nmap i really need some help guys any would be very appriciated thanks.
|
|
|
|
|
Compiling a program is a very basic (and well documented) task.
For instance, using Cygwin environment, just type
g++ source-file-name
This works smoothly provided:
g++ coompiler is correctly installed.- (2) there is a source-file-name
C++ source file available.
I suggest you to choose your favourite compiler or IDE (this is an important step, for instance, I wouldn't use the C# compiler for compiling C++ source files... ) and read documentation about (help, tutorials, how to, 'even' a good book).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
thank you very much i will give it a shot.
|
|
|
|
|
ok i guess i am just a moron when it comes to this stuff, i am losing my mind i need step by step instructions i guess, everything i have found seems vague to me.. i used to mess around with this stuff back when 3.1 came out and 95 but i have lost all that i guess i just became lazy like most other people, the files i have for compiling the programs come in a tar.gz zip file and all the files end in like .c or .h i have no clue on what i am doing and your probably thinking wtf is this guy doing even attempting this..lol i guess i should just stick to building and modifying the hardware since i suck at the programs..
|
|
|
|
|
I need a connection avi or gif (multiple-frames) for my C++ program.
connection means client/server connection.
image size is around (100-300)x(50-250) pixels or similar.
It is too hard to find one from google.
Can you help to privide a link for download?
Thanks
|
|
|
|
|
includeh10 wrote: I need a connection avi or gif (multiple-frames) for my C++ program.
connection means client/server connection.
Do you mean a TCP client/server connection? What as it to do with AVI and animated GIF (i.e. have you special needs?)?
includeh10 wrote: Can you help to privide a link for download?
Well you're a software developer, aren't you? Have a look at [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
/*-----*//* the device context dc must still exist when the pen/etc is deleted */
class PEN{public: HDC d; HPEN pen,old; PEN(HDC dc,COLORREF col); ~PEN();};
PEN::PEN(HDC dc,COLORREF col){d=dc; pen=CreatePen(0,1,col); old=(HPEN)SelectObject(dc,pen);};
PEN::~PEN(){SelectObject(d,old); DeleteObject(pen);};
/*-----*/
class FONT{public: HDC d; HFONT font,old; FONT(HDC dc,HFONT f); ~FONT();};
FONT::FONT(HDC dc,HFONT f){d=dc; font=f; old=(HFONT)SelectObject(dc,font);};
FONT::~FONT(){SelectObject(d,old);};
/*-----*/
class TEXTCOLOR{public: HDC d; COLORREF col,old; TEXTCOLOR(HDC dc,COLORREF F); ~TEXTCOLOR();};
TEXTCOLOR::TEXTCOLOR(HDC dc,COLORREF c){d=dc; old=SetTextColor(dc,c);};
TEXTCOLOR::~TEXTCOLOR(){SetTextColor(d,old);};
/*-----*//* only declare one PEN and one FONT and one TEXTCOLOR in the same { } block */
Example of use:
{TEXTCOLOR brktlevel(dc,RGB((P->error&2)?255 ,0,0));
P->scrline=displ*CH;
scritem[displ&0xff]=P;
show(dc,L);
}
|
|
|
|
|
|
As Chris replied, MFC has classes for all of the GDI objects.
You should be using them instead of creating your own.
What exactly do you mean by keeping track?
I'm assuming you want to audit the creation and deletion of GDI objects.
For this you can derive your own classes from the GDI classes and in the constructor and destructor of these classes you could write your audit code.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
At the } the destructor automatically gets rid of the PEN/etc and restores the device context's previous PEN/etc instead of the programmer having to remember to.
Which #include file are CPen etc declared in?, so I can look to see what they do before I use them.
modified on Monday, September 21, 2009 1:53 AM
|
|
|
|
|
Your code is barely readable. Please, read the posting giudelines before posting (use the code tag in order to format your code decently).
|
|
|
|
|
do you want to reinvent CPen and CFont of the MFC or ATL, or what is the question
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Sorry. I had not heard of CPen etc, so I wrote my own similar.
|
|
|
|
|
you better read some articles here at CP and beginner books to get an overview of some class libraries of your choice as MFC, ATL.
The time you invest infront you get paid back very quick.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hi
From MSDN:
"It is not necessary to wait until creation of the property sheet window to call AddPage. Typically, you will call AddPage before calling DoModal or Create."
Usually, each "Page" "OnInitDialog()" is called after it is first clicked.
Can I get CPropertyPage to be created before it is first click?
Can I get each CPropertyPage "OnInitDialog()" to be called before the "page" is clicked?
Best regards,
|
|
|
|
|
transoft wrote: Can I get CPropertyPage to be created before it is first click?
Yes. Check out the PSP_PREMATURE style.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
you better understand the purpose of "OnInitDialog()", which means that THIS CODE had to get executed for the proper initialization RIGHT BEFORE showing the page.
If you have some operations, do it somewhere else!!!
I prefer threads for long operations, because they dont stop the GUI.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
I have to call GetDlgItem(..) which has to be called within "OnInitDialog()". I tried different ways before I post this message here.
I know the purpose of "OnInitDialog(). Because there are a lot of expert here, I post my question.
Thanks,
|
|
|
|
|
if the dialog isnt visible it isnt necessary to call GetDlgItem(..). If yoz have to change a value of a control, store the value in a member and change it in the OnInitDialog()
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Mr. DavidCrow already gave me solution.
|
|
|
|
|
I digged further about it and found:
http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesnative/thread/c6dc6a9a-0136-41e8-8bb8-2b92366d98e2/
the flags isnt supported anymore
But what is with OnSetActive() ?
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hi
I did following in CPropertyPage's constructor:
m_psp.dwFlags |= PSP_PREMATURE;
After debuging, I found that "OnInitDialog()" was called (after "AddPage") before it is clicked.
From my debuging, following statement (item 3) is not true.
1. OnInitDialog() fires for the first property page (the one all the way to the left).
2. OnSetActive() fires for the first property page.
3. OnInitDialog() then fires for each remaining property page, from left to right.
Thanks
|
|
|
|