|
An alternative to using the ATL macros is to use the _bstr_t class. It has constructors that take both ASCII and WIDE character sets, and have overloaded operators for both char* and wchar_t* . It will end up calling the same functions in the end (the MultiByteToWide, etc.) but it easier to read and debug since it isn't a macro.
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
|
|
|
|
|
Hi,
Im writing a webserver which loads an exe file as cgi application. What im trying to do is not make the window popup each time someone visits the site.
I still need the process visible in taskmanager though...
Heres what im using at this point to load the cgi app and get the std out... which is what i need to do...
char psBuffer[1024];
FILE *pPipe;
send(AcceptSocket, header, strlen(header), 0);
pPipe = _popen("test.exe", "r");
//..other functions
_pclose( pPipe );
Any Help on this matter is appreciated.
|
|
|
|
|
I assume you've got a console window popping up. If you make the exe a normal Win32 project instead of a console one you will not get a console window popping up.
Steve
|
|
|
|
|
Thnx.. I dont think thats going to help in this situation.. because if users were to write thier own cgi.. they would have to do the same.. and such is too much to ask in my opinion... Theres got to be another way to hide the bloody window...
|
|
|
|
|
Assuming you're on XP (or better..) can't you just run your Web Server as a different user - this way the web server will have a seperate desktop, on which any cgi programs will run
|
|
|
|
|
I work with vc++ 6 (don't lough).
I have an MFC project with a resource file created by the MFC wizzard.
I can not run rc.exe on this file. It says "RC: fatal error RC1107 :
invalid usage: use rc /? for help"
I have no problems running rc.exe my own (simple) resource files.
I assume that VC runs rc.exe with some more defines/swithces.
Can anyone tell me how should I run it (and succeed) ?
Thanks
Maurice
|
|
|
|
|
hi all i want to write teh software that block certain site i.e yahoo.com how to do that any help is welcomned.Thanks
Tasleem Arif
|
|
|
|
|
Try writing BHO ( Browser Helpler Objects)
|
|
|
|
|
Hi,
I have a problem with DDK.
when I include every file of DDK (like video.h)
it gives me many errors.
Why?
please help me.
thanks.
Every new thing you learn,Gives you a new personality.
|
|
|
|
|
question now would be what are the errors you are getting?
vipin - Microsoft MVP
http://www.explorewindows.com
|
|
|
|
|
hello there,
I would like to scroll my CListBox (in other words, not a CListCtrl or CListView!) so that a certain item is the topmost visible item in the list (having it visible is not enough). Any ideas? I tried SetScrollPos, and although the range is meaningful, only the scrollbar gets "scrolled" (the bar moves), but the listbox itself doesn't move.
I'm getting quite desperate and all i can find if horizontal scrolling everywhere.
thanks
|
|
|
|
|
I think SetTopIndex or LB_SETTOPINDEX will do what you want.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
After you call SetScrollPos() to set the postion of the scroll bar you have to also send a WM_VSCROLL message to the list box to actually get the list box content to scroll.
pListBox->SetScrollPos(SB_VERT, Position);
pListBox->SendMessage(WM_VSCROLL, MAKEWPARAM(SB_THUMBPOSITION, Position), NULL);
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
wonderful, both approaches work. Thanks
|
|
|
|
|
Hello,
I have develloped a software in Visual studio 2005. It's works well but some time I get this message :
encountered a problem and needs to close. We are sorry for the inconvenience.
Error signature
App Name: spscurviewer.exe
App Ver. 1.0.0.1
Mod Name spscurviewer.exe
Mod. Vers. 1.0.0.1
Offset 0003218f
How can I check the problem !
AutreChien
|
|
|
|
|
Run it in a debugger and it should get you to the source of the problem.
Vipin - Microsoft MVP
http://www.explorewindows.com
|
|
|
|
|
|
Does anyone know where I can get the main alpha blended selection color? I know about LVS_EX_DOUBLEBUFFER for listviews, but this time I have to roll my own, and I'd rather it be consistent. I know that the border of the selection rect can be gotten from GetSysColor(COLOR_HIGHLIGHTTEXT) though. I tried using stylebuilder to see whether the color of the main selection rect came from a theme color, but couldn't find it
-- modified at 15:13 Sunday 30th July, 2006
|
|
|
|
|
Use GetSysColor(COLOR_HIGHLIGHT) to get the background color, and GetSysColor(COLOR_HIGHLIGHTTEXT) to get the foreground or text color.
Not sure what you mean by alpha blended selection color.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Ah, I was actually referring to the selection marquee when you drag select items in the listview. You can try drag selecting items in explorer in Windows XP to see what I mean. Unless you disabled it, it should draw a rather nice alpha blended selection rectangle.
Under performance options, Microsoft has it listed as "Show translucent selection rectangle".
|
|
|
|
|
Yeah, that's not what I was thinking at all (but, it's the weekend, so thinking is at a minumum )
I know nothing about the selection marquee, but this might hook you up. http://www.viksoe.dk/code/bluemarquee.htm[^]
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Thanks . I actually already know viksoe's site though. He's using COLOR_HIGHLIGHT and then blending to acheive the effect, which is what I'm already doing, but when I change the Selected Items color, I notice that only the border of the selection rectangle changes for the one in explorer. Maybe it's caching the color and not changing in response to WM_SETTINGCHANGE. I guess I'll have to live with it for the time being but I did go through all the colors in stylebuilder so I'm rather annoyed I couldn't find it.
It would have been nice if Microsoft's theming documentation came with pictures of the theme parts and colors though.
|
|
|
|
|
Hello everyone!
First of all, thank you all for helping me with my programs and stuff...
Now, does it? Thanks!
Windows Calculator told me I will die at 28.
|
|
|
|
|
Kixdemp wrote: does it? Thanks!
Absolutly impossible for us to tell that without looking at the function.
Anyways if memory was allocated using new/malloc then you have to delete/free it explicitly.
I don't think, therefore I am not.
|
|
|
|
|
You don't have to bother about any memory consumed on the stack. But if you dynamically allocate any memory on the heap using malloc/new then you need to explicitly delete using free/delete.
Vipin Aravind
http://www.explorewindows.com
|
|
|
|