|
try the following way
subclass the tabctrl in the property page.
overide the WM_LBUTTONDOWN message. Inside that call CTabCtrl::HitTest() to find the item. If the item is the one that u dont want to act as disabled, simply return the function with out calling the CTabCtrl::OnLButtonDown(..)
nave
|
|
|
|
|
see me wrote: disable a particular tab of my property page
Check this[^]
Do your Duty and Don't expect the Result
|
|
|
|
|
How do we know how much maximum memory we can use for user process running on some OS (2K, XP, CE, Mac, Linux etc.)?
I mean is it OS and hardware dependent or we can change it at the time of linking while linking for different OS.
Can we increase or decrease the maximum memory used by any user process if yes how ?
Thanks in advance.
Manish Agarwal
manish.k.agarwal @ gmail DOT com
|
|
|
|
|
The limit on the user-mode virtual address space for a process is well-defined for each OS. In Win32 it's normally 2GB, but on some versions of NT you can change it to some other value at boot time with boot.ini switches. The most common value to change to is 3GB. 64-bit Windows has different limits for each CPU type.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Vis C/C++ 6.0, Visual Studio
My program is a client to read a web page.
I am successfully setting up the socket.
The following calls and assignments are successful
WSAStartup()
memset(&sa,0,sizeof(sa));
sa.sin_family = AF_INET;
gethostbyname(gipaddrname); // example yahoo.com
memcpy(&sa.sin_addr, phe->h_addr, phe->h_length);
sa.sin_port = portn; //port 80 converted to net order
getprotobyname("tcp");
socktype = SOCK_STREAM;
sockdes = socket(PF_INET, socktype, ppe->p_proto);
connect(sockdes, (struct sockaddr *)&sa, sizeof(sa));
But when I go to receive the Servers 'hello'
message with:
recv(sockdes, pbufbin, len, 0);
I get the error:
WSAECONNABORTED The virtual circuit was terminated due to a time-out or other failure. The application should close the socket as it is no longer usable.
The strange thing is that I have used this exact code for
other servers, such a pop3 mail servers and servers that I wrote, all without a problem....
Any help would be much appreciated
Many thanks,
Robert
|
|
|
|
|
Robert Palma Jr. wrote: memcpy(&sa.sin_addr, phe->h_addr, phe->h_length);
try changing this line to
(&sa.sin_addr.s_addr,phe->h_addr,phe->h_length);
Hope this helps you.
KIRAN PINJARLA
|
|
|
|
|
Hi Kiran,
Thank-you for input.
I made the change but still get the same result.
Hmmm ....
Any other thoughts?
Many thanks,
Robert
|
|
|
|
|
hey all,
I get this error
error C2011: 'CNTGraph' : 'class' type redefinition
in the ntgraph.h header file in the line
// CNTGraph wrapper class
class CNTGraph : public CWnd ---error here.
{
protected:
----
}
I havent defined this classa anywhere else. Waht could be wrong?
Any help/suggestins?
thanks in advance.
|
|
|
|
|
The most likely cause of this problem is that the h-file for CNTGraph becomes included more than once.
The usual way to fix this problem is to surruond the contents of the h-file with a block such as this:
#ifndef CNTGRAPH_H
#define CNTGRAPH_H
.... The normal class definition
#endif
That way, the class can only be defined once. Of course, you substitue CNTGRAPH_H with something else for other classes.
|
|
|
|
|
thathvamsi wrote: 'CNTGraph' : 'class' type redefinition
You might have include the '.h' file(which has CNTGraph) in more than one place... to avoid redefinition error try by putting the below as your first line of .h file
#pragma once
-- modified at 1:53 Tuesday 8th August, 2006
Do your Duty and Don't expect the Result
|
|
|
|
|
That's right (of course). I didn't think of that , I just came back from my summer vacation.
|
|
|
|
|
No Problem, every body will miss something in someday.. Cheers..
Do your Duty and Don't expect the Result
|
|
|
|
|
Did you see msdn
From the MSDN
<br />
'identifier' : 'type' type redefinition<br />
The identifier was already defined as type. For example:<br />
<br />
struct S;<br />
union S;
<br />
<br />
<br />
<div class="ForumSig"><font size="2" color="#99ff66"><hr></font><div style="padding: 2px; text-align: left; color: rgba(255, 255, 255, 1); width: 80px"><font size="2" color="#99ff66">WhiteSky<br />
</font></div><hr></div>
|
|
|
|
|
Hi,
I have created a TCP connection between client and server. On client system I do socket(), bind(), connect() and recv()/send(). I do recv() and send() simultaneously in two threads.
The program works fine for some time (1-2 minutes), but after some time, recv() returns SOCKET_ERROR. WSAGetLastError() returns error code of 12. Any suggestions on how to solve this problem?
I am sending about 20 packets per second (at a rate of 100kbps). I am receiving about same number of packets although bitrate is much lesser.
Any help will be highly appreciated.
Thanks very much in advance.
Regards
RS
|
|
|
|
|
What are the sizes of the packets?
Do they change?
You need to print the error message text.
I think 12 is:
WSAEMSGSIZE The message was too large to fit into the specified buffer and was truncated.
But I'm not sure.
The above is in the MSDN for recv().
FUNNY, I am chasing a recv() error right now myself! My post is just a few after yours
|
|
|
|
|
> What are the sizes of the packets?
> Do they change?
Initially the packet sizes are about 8-10 bytes. Later packet sizes increase to 600-800 bytes. When the packet size is small and packets per second are low, the error is generated after a longer time. When packet size increases the error is generated in a very short time.
Also I am using TCP port 80.
|
|
|
|
|
Also if I use port such as 5000 the program works fine.
Thanks a lot.
Regards,
RS
|
|
|
|
|
I have a editbox in my dialog box. When I use right click on the editbox, it will display a menu. I would like to know how to disable it during the program is running? Please help!
|
|
|
|
|
one approach is subclassing CEdit and handle right mouse button down
Kuphryn
|
|
|
|
|
Could you tell me more detail about this approach?
Please help!
|
|
|
|
|
Derive a class from CEdit.(CMyEdit->CEdit). Override the WM_RBUTTON Click. Create an object of CMyEdit .
CMyEdit m_MyEdit.(Associate this with the edit control in which you want to show the menu when right button of the mouse is pressed)
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
If I want to ignore the mouse right click, what should I do?
Please help!
|
|
|
|
|
Just override the right button click and do nothing in the function. If you are asking them in context to what would happen with the other edit boxes you can associate a CEdit type of control variable and leave them as they are with default functionalities
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thank you very much!
It's alright now!
|
|
|
|
|
If you derived from each class for controls you have a most power than to use in the standard case
|
|
|
|