|
|
Hi, I wrote an application which connects via an HTTP proxy. Can I get the default proxy from the system (hostname and port)? Alternatively can I get it from IE?
|
|
|
|
|
Hi,
There is not such a thing as the system proxy. WinINet functions are tied to IE, and it is IE settings that you can get and set with this library. Take a look at InternetQueryOption documentation.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Cheers, I'll try... following what I have found
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/internetqueryoption.asp
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q226/4/73.asp&NoWebContent=1
|
|
|
|
|
Hi!
I need to convert a TCHAR* string (which actually can be a char* or wchar_t* string) to UTF-8 format and the other way round.
I cannot use the MultiByteToWideChar and WideCharToMultiByte functions.
Is there a small, tiny library that does this? I've had a look at IBM's ICU, but this library does much too much, I don't need all those additional conversion functions, etc.
Or is there perhaps a simple method how I can do the conversion myself?
Thanks in advance!
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
I dunno how allergic you are to the LGPL license, but here's one library which can do the transformation for you: http://www.gnu.org/software/libiconv/[^]
--
Seraphim Shock. Gold for your ears.
|
|
|
|
|
Hey all.
I have read a couple of articles on this site (and others) that I thought would help out, but was not exactly what I was looking for.
I have modified the default "MFC" icon in my app to put my own in there. I compile and run it, all is fine, it shows up correctly.
However, when I am looking at files with Explorer, the file shows up with the MFC icon! It shows up with the MFC icon, then the program name, and then "TODO: <file description="">" ... I figured out where I put in the description, company name and all that good stuff, but I can not figure out how to make it use the icon that I created that gets displayed on the taskbar when the program runs. Any suggestions?
Thanks
|
|
|
|
|
the icons have different sizes for different display contexts
make sure u edit the 16x16 icon too
"there is no spoon" biz stuff about me
|
|
|
|
|
If I open up my project , under "Icon" there is only one. IDR_MAINFRAME and under appearance it says "32x32". I've looked all through the resources and do not have a 16x16 or any other icon in there.
Do I have to add a new ICON and make it 16x16? If so, how would I then tell the program to use it?
Thank You
|
|
|
|
|
|
I'm using VS .NET now, but I did find the place where the multiple sizes are.
Man alive, there are 9 of them! Different sizes and colors!
So I pretty much have to edit all of them, right?
It says like 16x16, 16 colors, 16x16 256 colors, 16x16 16million colors (or something like that)
So is that so depending on what the users computer display color depth is set at which icon will be displayed?
Thanks!
|
|
|
|
|
yup u got it
altho a 16color and a 256 color will generally be ok
in fact i only use 16color for the small ones
"there is no spoon" biz stuff about me
|
|
|
|
|
THANKS!!!
It works perfectly now!
Took me a bit to figure out the Icon Editor!
|
|
|
|
|
Is anybody can help me,if i want use three radio button to control the motor run in different speed.......what is the source i need to add!!!!!!!!!!
|
|
|
|
|
write an onclick() handler for the radio buttons and do ur logic there
"there is no spoon" biz stuff about me
|
|
|
|
|
Can u explain more detail how i use the logic to control motor run in different speed.....
|
|
|
|
|
What kind of motor is it? What are you using as a hardware controller? Did it come with a driver package? Is there an API for programming it? The method Lauren describes is simple enough, but we're working in the dark here. If you haven't got some kind of specific controller in mind, find one and provide some details. Nothing on your PC can directly control a motor (other than perhaps a single-speed dc motor connected to a line on a parallel port). For a dc motor you'll need at a minimum a D/A converter with a power amp. You'll probably also want an A/D converter with a tachometer on the motor for feedback, if the speed has to be regulated under load. For a stepper motor you'll need a stepper controller card, and you'll program it for a selectable step rate. A synchronous motor will need a programmable ac power supply to control it properly by varying the frequency. What are you using?
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
In my project i just need counter clockwise dc motor with no load condition via parallel port. But what is the purpose of the D/A converter with power amp and how they control the motor run in different speed....
|
|
|
|
|
A DC motor, unless it is very tiny, draws more current than a parallel port can provide without burning out. DC motors are voltage controlled (not really, but it looks that way to the user), so you need a variable voltage to adjust the speed. An D/A converter takes a digital input and converts it into a dc voltage. An amplifier following it raises the voltage and provides the large current necessary to drive a motor. Crude versions of both are easy to design and build.
If the motor is very tiny you might try one of a couple of approaches. The simplest is to connect it to a line of the parallel port (with a small series resistance to protect the port) then output a pattern of bytes the alternates the ratio of 1's and 0's on the line to simulate a PWM signal. Another method would be to attach series resistances to all the lines, tie them together at the motor connection, then use a binary value to effectively switch resistances in and out of the circuit. Assuming that the parallel port is used to switch a powered motor to ground (line driver circuits can usually sink far more current than they can source), all 0's would create the lowest virtual resistance to ground, while all 1's would be effectively open.
I don't know what a modern port can handle in terms of current - they don't publish specs with PCs anymore. They used to use a TTL open-collector configuration which could sink about 100 mA, max. I doubt that they've increased that, more likely it's less these days.According to my reading of some troubleshooting manuals, the parallel ports are still TTL, a 5V logic family, so the spec is unlikely to have changed much. Note that a logic 1 signal must be applied to the SELECT pin for the port to send any data at all.
For the software to drive it you'll need to do some research. The parallel port uses much of the same stuff as a serial port. See "Using Communications Resources" in the Platform SDK for detailed information. You'll need to write a class for communicating with a parallel port with your motor connected to it, providing a function to change speeds which implements your preferred method of controlling the effective motor voltage, then your control program can call this function in response to a radio button selection. Sounds like fun, if hazardous to your PC - good luck!
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
Hi
How can check if a CWnd object atteched to a valid handle?
I've tried this:
bool isValid = pWnd->GetSafeHwnd() == NULL;
but sometime GetSafeHwnd() returns me 0xfeeefeee
thanks.
|
|
|
|
|
try
isValid = IsWindow(m_hWnd);
Hope it Helps
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
thanks
|
|
|
|
|
Hi all,
I choose grey property for File menu item.
how can i un-grey it at run-time
Thanks all,
best regards,
|
|
|
|
|
I knw how to make a Win32 Dll and implicit link it with the Win32 client in Same directory. What are the steps involved in exporting a function to a VB client.And can VB client use it as simle C function
Rum + Whisky is very Risky
Cheers!!!!
Siddharth
|
|
|
|
|
Hi all,
i need to store the elements in the integer array from two different files in a buffer. Then i need to compare the elements in the arrays. How do i store the array into buffer.Thank you for all your help.
Ivory
|
|
|
|