|
Well known port numbers are as defined here[^]. Also if you look here[^] you will see that there is no HTML tag that describes the information you are looking for.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
ALLERSLIT wrote: Banner is like a name that identifies the service that runs on the port.
Iam just look for a way to identify what service/program runs on a port.
Check the HTTP response headers. Some web servers include a Server header in every response, e.g. Server: Apache/1.2.3 . Practically, you take a HTTP client class, make a dummy request and evaluate the response headers. It's a simple way to identify the web server software running on that port, it is not reliable as you can often configure or omit this information on the server side.
Happy coding!
|
|
|
|
|
I want to bring the window that has been activated before my application's window in the z-order and set keyboard focus to it. there are 3 API related to this job in Windows APIs:
BringWindowToTop (...)
SetActivatedWindow (...)
SetForegroundWindow (...)
I've been trying all possible combination of these functions since yesterday, but I failed. The problem is I can bring the windows I like to the front, but those never get keyboard-focused. I've also tried ShowWindow (...), but It failed to set the focus to the windows too.
what to do?
|
|
|
|
|
According to the MSDN documentation for SetFocus()[^] you can only set the focus to a window that is attached to your own message queue.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Hello out there.
I use Visual Studio and when setting the project to use Unicode under project settings I get a nice rounded look on the buttons etc. But if I set it to Multi Byte Character Set everything is sharp and have corners. Why is this so?
I have an old program that I would like to convert into the nicer look. But as it has several thousand lines of code and changing all text into _T("") and use Unicode-functions will take forever and is not an option.
Is there a way to use Multi Byte Char set and still have the rounded buttons and boxes?
Is there a simple way to go around this? Or is it so that I have to leave it to as it is?
|
|
|
|
|
Are they owner-drawn buttons? Usually the charset has nothing to do with how the buttons are drawn. Check the drawing code in detail.
|
|
|
|
|
It's because of the Common Controls V6 being used in Unicode builds.
Open your stdafx.h and at the bottom remove the line that checks for Unicode - it's a wrapper around the common controls v6.
It should look something like
#ifdef UNICODE
...
...
#endif
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Thank you. This really helps me.
|
|
|
|
|
krmed is correct.
I removed the check for UNICODE and it compiled and ran well.
I wonder why the wizards put that check in there.
|
|
|
|
|
I download the emule source code from the sourceforge but it is difficult to config for the reliant library. Where can I download the emule source code with the reliant library?
|
|
|
|
|
Hi,
I am drawing .ico file using GDI+, Ico file is tranparent but while drawing the tranparent area is coming black.
How can I draw a transparent ico file?
|
|
|
|
|
Please include code containing the drawing part...
|
|
|
|
|
HI,
Is there a standard/Portable equivalent functions for MSVC++ functions like : strncpy_s(), strcpy_s(), _stricmp(), strcat_s(), sprintf_s(), fopen_s() etc.
I am porting a VC6 application to VC8, and getting tones of warnings regarding non-secure functions. I want to replace the non-secure functions with secure ones. But, till now i have not been able to find a portable solutions. I want a portable solution as some part of my app. connects with unix while others with windows.
Thanks in advance.
|
|
|
|
|
you could easily create those functions yourself from scratch (for the simpler ones), or create a safety wrapper around existing unsafe ones (for the more complex ones, mainly the I/O functions).
|
|
|
|
|
See my answer to your same question here[^], and please do not cross-post.
AR
When the wise (person) points at the moon the fool looks at the finger (Chinese proverb)
|
|
|
|
|
I reposted "here" because i did not get any response "there" even after 2 days.
|
|
|
|
|
VC_RYK wrote: I want a portable solution as some part of my app. connects with unix while others with windows.
What functions you use in your code and what systems your code talks to are mutually exclusive. In other words, you can use whatever code you want and be able to talk to Windows, Unix, Mac, OS400, etc.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Had great fun at a virtual robot coding night, using http://robocode.sourceforge.net/ where you develop a robot in Java or .NET to fight against others robots. I am now looking for a C++ version, is there a Robocode or similar game, ideally with similar API to reuse your robot strategies?
Thanks for tips!
|
|
|
|
|
C++? bah. try CoreWars[^] - it uses an Assembly-like language! and it's the original! (i wrote a version for my C64, back in '85)
or, if you must, there's C++Robots[^] and CRobots[^]
|
|
|
|
|
|
Hello folks!
Am looking for a way to do this: i have a rectangle that specifies the available space for some text. I want to display as much as possible of this text. What i mean is, if the text fits nicely in the rectangle, it should be displayed as usual, centered with wordbreaks as needed (DrawText with DT_WORDBREAK | DT_CENTER). However, when the specified rectangle is too small, the text doesn't fit into it even with wordbreaks (e.g. there are a few long words) then i'd like the text to e.g wrap around at positions where the long words would "hang out" of the rectangle.
First i tried DT_CALCRECT with DrawText to check if the text fits, if yes then i simply draw it with DrawText and go on, if not, then i tokenized the string using space as separator/delimiter. Then i iterated trough the words and checked the widths of the words and if they were too wide then i'd find the character inside the word which would hang out of the rectange and inserted a space. After this, i used DrawText again with DT_WORDBREAK to display the string. This works reasonably well but not well enough because it produces things like this:
(the text is "This is somewhat longer" and there's space for 3 lines)
---------
|This is|
|somewha|
| t | <- a whole word is lost ("longer")
--------- I guess one alternative i can go for is wrapping the whole string
---------
|This is|
|somewha|
|t longe| <- i see more of "longer" here
--------- but am not sure if doing this is the only/best way, and also i don't know how to wrap text aside of writing it character by character myself checking before each letter if it would hang out or not and "linefeeding" as needed + handling spaces specially (something like not display them if they are at a linebreak position). I have a faint memory from the good old times that something like DT_WORDWRAP or somesuch existed but i see no trace of it now so it's either gone or it never had existed at all and i have a few bit errors in my memory.
Any suggestions before i go into implementing the char-by-char thing? There should be a better way (i don't wish to go into dynamically selecting font sizes, let us assume the font is fixed)...
P.S: Am using GDI (CDC::DrawText and friends...)
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <
|
|
|
|
|
Don't know who downvoted you, but have my 5 in compensation. It's an interesting question (even if the answer is going to be WAAAAY too long). I suspect you're going to be forced into "measure each char and draw it somewhere" stuff.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Thank you very much. I don't know what the problem is with my question that it needed a downvote.
Anyways, for now i went with the following aproach: if the text doesn't fit, i go char by char, calculate sizes, when i hit the "line-end" then i insert a linefeed ('\n') in the string and after i hit the end of the string, i output it with DrawText without DT_WORDBREAK.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <
|
|
|
|
|
Isn't this why we have scrollbars?
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
No, this is why we have larger monitors.
|
|
|
|