|
hello i want to know the meaning of:
%u
%s
%d
%..
how many %.. symbol in c++?
thanks for the information
|
|
|
|
|
The info you're looking for is all in MSDN: printf Type Field Characters[^].
The use of the rest of the format specifiers can be found by searching through MSDN for printf or sprintf.
-----
In the land of the blind, the one eyed man is king.
|
|
|
|
|
thanks Vineas for the information,
i've found it in msdn, and i know the meaning know
|
|
|
|
|
Can anyone tell me how to discover the full path of the associated program by known extension via windows registry.
|
|
|
|
|
How about AssocQueryString() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi,
I dont know whether this is the right place for this question, Please excuse if it is not so,.
I have just started programming in winsock.
How is my server intimated that one of the clients has sent it some data?
should I have a loop with the recv(....) function so that it checks continuously for incoming data?
Or are there anyother options?
(Windows is my OS)
Thanks,
Deepak Samuel.
|
|
|
|
|
Use accept() . I had a little server application that used the following functions:
WSAStartup()
socket()
bind()
listen()
accept() in loop
closesocket()
WSACleanup()
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
If you want to wade through some stuff, this link http://www.vijaymukhi.com/vmis/vmchap4.htm should show you an easier way using winsock 2 (that won't freeze your application).
wWw.KruncherInc.cOm
|
|
|
|
|
what kind of sockets are you using? TCP or UDP?
There are 4 (as far as I know) ways to get informed about incoming data.
these ways are:
- blocking sockets (call recv() and what till it returns control to your app)
- use select() to check whether there is activity on the socket
- use WSAEventSelect() to assign an EVENT to a socket and then wait for the event
- use WSAAsyncSelect() to make the socket send window messages when there is activity
If you want to create a server which has a main window, then the forth way could be interesting.
If your server doesn't have a window:
- For servers (TCP) with only few clients or UDP servers you should use way one.
- For servers (TCP) with many clients I'd prefer way two (It's also linux compatible ).
I hope I could help....
Don't try it, just do it!
|
|
|
|
|
Hello,
I want to build a NT service. I couldn't find any good articles on the subject until I came across this[^] article.
I find the class (CNTService) which the author refers to highly interesting. The only thing is that I can't download the source code. .
I don't know if you have to be a MSDN member before you can download the code.
My question is if anybody knows a similar class? If not, I guess that I've to build CNTService myself...
Thanks in advance.
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Bob Stanneveld wrote:
The only thing is that I can't download the source code.
I did not see any "download" links.
Also, try here and here.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
DavidCrow wrote:
I did not see any "download" links.
I also didn't see any download links. Maybe they appear if you are a MSDN member or something that requires you to pay microsoft...
Thanks for the links.
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Bob Stanneveld wrote:
Maybe they appear if you are a MSDN member or something that requires you to pay microsoft...
No. It's an older article and the author just forgot the links. There are plenty of other articles with links intact. I'm also an MSDN subscriber.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
It is part of MSDN. Just search for "CNTService" and you will find a page where you can extract the source code.
Don't try it, just do it!
|
|
|
|
|
I tried searching the MSDN for CNTService, but no luck. I guess that the source code isn't availeble anymore (or never was).
Anyway, I found enough information on the subject to write my own CNTService class...
Thanks for your suggestion.
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
it is available. I have the source code. The Microsoft Visual Studio .NET Documentation. You have to find it.
Don't try it, just do it!
|
|
|
|
|
--------------------------------------------------------------------------------
Hi all,
I seem to have hit a brick wall with trying to elimate flicker. I am using Win NT to drive a liquid crystal microdisplay via a dual port graphics card, which is integrated into an optical system.
The display alternates between two monochrome images and it is essential that the display shows a complete image during each frame.
My problem is that, although I am currently using a double buffer method (using a memory DC and BitBlting the bitmap) and have (I think) got rid of any WM_ERASEBKGND messages, I still get disastrous flicker between the alternating images. Indeed, it doesn't look like the background colour is the issue here.
If you were to watch it on screen it looks like one image gradually dominating/taking over the other and then vice versa over several thousand frames. Is there any way to fix this problem or does someone have any explanation for it? I can only think of flicker being the cause, but am open to other suggestions? Am I just asking too much from Windows?
Any help/suggestions greatly appreciated!
|
|
|
|
|
What do you mean you "got rid of WM_ERASEBKGND"? This is a normal message to receive. When you do double-buffered painting, a common way is to do nothing in your WM_ERASEBKGND handler but return TRUE, then do all drawing in your WM_PAINT handler. If you don't handle WM_ERASEBKGND at all, the default behavior will paint the entire client area with your window class's background brush, which sounds like what you're describing with two images alternating.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
|
|
|
|
|
hello,
i want to make program ras api completely,
i mean, i'll make the dial up(DUN) and the response for the dial up
for the the dial up is not my problem.
the problem is how to handle incoming connection using ras api?
i want to call incoming connection dialog in the windows programmatically with visual C++ and i don't know.
i am using window 2000
please help me, if anyone knows to handle this.....
|
|
|
|
|
|
thanks for the information,
but i've already known the information about that.
in the site,there's no program to handle incoming connection with ras api,
so, i ask to the forum,
how to call incoming connection to accept connection from dial up program with
ras api?
|
|
|
|
|
I want to write an application which displays a log. I then want other applications to be able to write to this log. If I click refresh on my log viewing application I want to see any new log entries.
This is my idea for my design:
(1) Log Viewer Application
(2) Logging Application
(3) Other Applications that send log entries to (2)
I think that (2) could be made a COM component. What do you think? What sort of COM component would this be? Would it have to be multi-threaded? How would I have (2) maintain a file which it could read entries from and refresh as requested while other applications (3) write entries to it?
Am I heading the right direction?
|
|
|
|
|
How often will items be added to this file? If the frequency is low, you might consider using the OS's event log. For moderate to high frequency, a database would be more suitable for the task.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
My log viewer must manage the entries and I might have it on Windows 98 or ME so can not use the event viewer or an NT service. You say a database but that would mean depending on a further MS product and using an Access or SQL database wouldnt it? I have written my own database already as my log entries are objects that use CArchive to save themselves to a file. I have a COM component now that I can write entries to and it saves them in the file it manages. But now I want to have access to the log file from my log viewer and still allow other applications to write to it. Is this now a COM question? Must the COM object be multi-threaded or pooled?
|
|
|
|
|
I am creating the contorls dynamically in win32 application. Can we add the windows controls like static, button, edit, check box, etc.. to TREE control?
|
|
|
|