|
Thanks alot for the links, they are very helpfull. I am now getting these 2 errors :
error LNK2001: unresolved external symbol _NetApiBufferFree@4 and
error LNK2001: unresolved external symbol _NetShareGetInfo@16
I think i am missing some libraries what could i include?
I tried including activeds.lib and adsiid.lib but i still get the same errors
Kelvin Chikomo
|
|
|
|
|
Look up the NetShareGetInfo function in MSDN. Scroll down. See the table at the bottom where it tells you what library the function is implemented in?
"Link to Netapi32.lib.
Link to Svrapi.lib in Windows Me/98/95."
using System.Beer;
|
|
|
|
|
hi!
i've made a software and i want to know how can i put the .exe file in the internet explorer where the icons like messenger are, anybody can help me?
|
|
|
|
|
Your question is not worded very well, but I think you want to add your application's icon to the system tray.
Check this function. There are many articles here on CP on systray icons.
Shell_NotifyIcon(...);
And actually it is called windows explorer or explorer, not internet explorer.
Now if you want to add a button to the internet explorer's toolbar, that is a different matter. That will be a BHO (Browser Helper Object).
this is this.
|
|
|
|
|
Hi everybody. I'm running into a bit of a complication when creating a window of the class "Static". I want to create using CreateWindowEX a simple text label. All went fine until I wanted to change the background color and text color. I can set the font ok, but when it comes to colors, I simply can't understand what to do! Here's how I create the window, with the necessary comments.
hwndControl = CreateWindowEx //Creating the window.
(
NULL, //ExStyles.
"Static", //Class name.
Text, //Text of the label, appears ok, using the font I give it.
WS_CHILD, //Styles.
0, //X.
0, //Y.
100, //Width.
30, //Height.
hwndThis, //Parent.
NULL, //Menu.
(HINSTANCE)hwndThis, //This is the handle of a window which contains this window.
NULL //CreateStruct.
);
hwndThis is a handle of another window, a WS_POPUP. I created that window too, and in it, I want to load this new window, the label.
So how do I change the colors? I subclassed this window but I don't receive any WM_CTLCOLORSTATIC or WM_CTLCOLOR messages. I only get WM_PAINT, WM_NCPAINT and WM_ERASEBKGND. I don't want to totally rewrite the paint since that would totally miss the point of me creating this Static control: I want to benefit from Window's wrapping and aligning the text.
Thank you in advance for your help ::- ).
For those who don't know, this is for a freeware application I'm working on, anybody that helps me will do so for a good cause, and will be mentioned in the Thanks section.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Handle WM_ERASEBKGND , and set the color of the DC you get in OnEraseBackground to the color you like.
~RaGE();
|
|
|
|
|
I didn't mention that this isn't a MFC application. Do I even have OnEraseBackground???
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Axonn Echysttas wrote: I didn't mention that this isn't a MFC application. Do I even have OnEraseBackground???
handle WM_CTLCOLORSTATIC in your WndProc
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hey Alok :- ). I can't. Read my initial message. I don't get that message!! I don't receive WM_CTLCOLORSTATIC at all.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
WM_CTLCOLORSTATIC is sent to the parent of the static text control (the window identified by hwndThis in your first post).
Steve
|
|
|
|
|
Hi
I've developed a service application using the class of P.J. Naughter which was a good base class for our application. Although everything works fine, I am now encountering some problems related to the security policy of the user where the services. I can't access any network path or resource (like printer). A solution could be to run the server with the NETWORK SERVICE account. But then the application fails altogether.
Does anyone has encountered any similar problems, or knows of a solution.
Are there any good books to write a Windows Service in C++, or even detailed books about services. Right about now any help would be very welcome.
Kurt
codito ergo sum
-- modified at 10:54 Monday 16th January, 2006
|
|
|
|
|
|
|
You either have to run the service under a user account that has network access rights, or use the LogonUser, ImpersonateLoggedOnUser and RevertToSelf functions in your code.
onwards and upwards...
|
|
|
|
|
Thanks,
I user the LogonUser, ImpersonateLoggedOnUser and RevertToSelf functions
and that was exactly what I needed
codito ergo sum
|
|
|
|
|
I tried passing a CString variable (known to contain text) to a function, and inside the called function, the parameter I passed in is empty. Did something fundamental in CString change? Is there a compiler bug? Am I suddenly incapable of writing even the most simple code?
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
void ThisFunction()
{
CString myString = "test";
MyFunction(myString);
}
void MyFunction(CString sVal)
{
if (sVal.IsEmpty())
{
AfxMessageBox("Empy String");
}
else
{
AfxMessageBox(sVal);
}
}
In the example above,m I get the message "Empty String".
Like I said, simple code - unexpected result.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
and forcing the string to display in a message box (or directly with the debugger), is the string actually empty too? or is it just the .IsEmpty() function which is bugged ?
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
The string is actually empty (in the debugger) before it gets to the comparison.
The project is an imported VC6 project. This is in a new class that I created using the IDE. I have other classes that were already part of the imported project that work just fine.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
-- modified at 9:11 Monday 16th January, 2006
|
|
|
|
|
|
A long shot...
Have you tried a "Rebuild All"?
|
|
|
|
|
Yeah...
I can't understand why the code doesn't work.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John
I presume that's a Unicode build. I've found weird behavior when I use ANSI strings with a CString in Unicode builds. Try making that an Unicode string, so the proper constructor gets called. Non-Unicode string constructors are conditionally marked as explicit when it's a Unicdoe build. It's a breaking change that is undocumented.
Regards,
Nish
|
|
|
|
|
Where do I find out if it's a unicode build? Actually, I think non-unicode would make my life easier...
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|