|
sounds good. thx
-Raffi
|
|
|
|
|
You might find the Timing and Profiling with Visual C++ section of this article useful:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvc60/html/optcode.asp
|
|
|
|
|
A high-resolution timer can be found here on CP:
CCPUTicker v1.22
/moliate
Two o'clock and walking through familiar London - Or what was familiar London before the cursor deleted certain certainties -
I watch a suit and tie man giving suck to the Psion Organizer lodged in his breast pocket
its serial interface like a cool mouth hunting his chest for sustenance, familiar feeling, and I'm watching my breath steam in the air.
Neil Gaiman - Cold Colours
|
|
|
|
|
I'm working on a small project which requires 2 controls to fit in a window and be resized with sizes being relative to the size of the window and the other control.
First I'll state that I'm using only Win32 in plain old C and the controls in question are a Dialog Box which contains a tree control and a text control.
I guess I'll split my question into two parts.
1) What is the standard way of dealing with window resizing and contained controls. Dealing with 1 control is easy though any more and you have to deal with some math and possible diagrams just to make sure the resizing operation works as one might expect.
2) I've seen in some applications partitions between controls which let you resize adjacent controls based on left/right or up/down movement (sorry I have no clue what they are called). Does such a thing exist in the Win32 libraries or do I have to come up with it on my own. If I have to come up with it on my own I was thinking of using a plain button as I already know how to work with those. Does anyone have any suggestions or ideas how to solve this rather old yet simple problem?
Sean
|
|
|
|
|
There is a nice implementation using the C in the www.wdj.com magazine. Search the site, if you cannot find it, email me I think I downloaded the sources - I will search my hard disk!
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
|
|
|
|
|
Hi all,
When do we need an empty class like?
class Foo{};
thanks in advance
regards
/rsasalm
|
|
|
|
|
Never, except in examples where we need a dummy class to show it's use, or visibility.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
Christian Graus wrote:
Never, except in examples where we need a dummy class to show it's use, or visibility
Sometimes in defining exceptions they are useful.
|
|
|
|
|
They have a role sometimes:
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
How to determine whether the new request header is coming from client in HTTP/1.1 Keep-alive Connections ?
|
|
|
|
|
Looking at the header and check for "Keep-Alive:" ?
|
|
|
|
|
How to check whether this is a NEW http-header ?
Do I have to check EVERY message or just the first ones?
|
|
|
|
|
M A V wrote:
How to check whether this is a NEW http-header ?
As opposed to what? An OLD HTTP-header?
Of course you have to parse every request the server gets.
If your question is instead "How do I know if it's a 1.1 or 1.0" request: Well, read the header. It's all there, in plain-text format. It's either "HTTP/1.0" or "HTTP/1.1".
Maybe a trip to this place can clear things up? Especially this page might prove useful.
|
|
|
|
|
How can I determine whether the data that was just received, is a HTTP-header?
I am writing HTTP proxy server application,it works ok with HTTP/1.0 and fails with HTTP/1.1...
For example, when the page contains some data wich needs to be loaded from other server this data is not displayed.
I think that browser, when configured to use HTTP/1.1 sends it's requests one after another without breaking the connection.
My code looks like:
Thread1(started on every connect from client):
recv(...);
// parse header get URL_to_connect
_beginthread(Thread2);
// wait here for Event..
while(!Thread1done && !Thread2Done)
{
recv(...); //from client
send(...); //to server
}
closesocket();
//Thread2
connect(server_ip);
// fire the Event...
while(!Thread1Done && !Thread2Done)
{
recv(); //from server
send(); //to client
}
closesocket();
I've read RFC, but found nothing concrete about this...
|
|
|
|
|
AFAIK you can't just recv() + send() to pass on any data to any server. You need to parse every request sent from the client to see f.ex. what server to pass on the request to.
|
|
|
|
|
Can anyone help me to detect the code pages of text strings?
I wish to know so that I could convert to and from!
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
|
|
|
|
|
If the only information you have is the strings themselves, you are out of luck. There is no way, short of reading the text, understanding what language it is and then start guessing what codepage for that language it uses.
|
|
|
|
|
How about if I have the text file?
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
|
|
|
|
|
You still only have the characters (the "text"). You can't possibly know anything about what language and code-page was used to produce that file without some kind of meta content, wether in the text itself or as an alternate stream for the file or whatever).
|
|
|
|
|
The "Advanced Save As..." dialog in the VS.NET seems to indicate the correct codepage. What is the magic here?
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
|
|
|
|
|
For a plain text file? I haven't got a clue. Named NTFS streams?
|
|
|
|
|
A code page is simply a mapping of a byte value to a glyph. Only a person can tell if text is being mapped using the right codepage - they have to look at the output and decide if it looks correct. To the computer it's all just bytes.
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
So how does the VS.NET finds this out?
The Advanced Save As... popup indicates the correct code page of a text file, try it.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
|
|
|
|
|
I want to integrate MSCOMM.ocx into another ATL component. First I create
a composite control in the ATL component. Second I insert the MSCOMM.ocx into
the component. It creates two files mscomm.cpp and mscomm.h. Then I declare a
variable of CMSCOmm class. I don't know how to bind the variable and the control ID( Like the MFC: DDX_Control ). So I attach the hwnd of the control to the variable. But when I run, it will throw an assert on the line:
ASSERT( m_pCtrlSite != NULL );
Who can help me solve this problem?
|
|
|
|
|
Hi everybody!
I have a typical problem here. My application is a multithreaded one. In one of the cases, there are multiple threads which will be using a common buffer which is a member variable of a particular class. This buffer is also allocated memory by one of these threads and to be accessed by the other threads. I am getting a dbg_heap error as debug assertion. How do i go about solving this problem. Please help me out as this is very urgent. Thanx in advance.
regards,
sailesh
|
|
|
|