|
or you can set Center in property dialog to true
|
|
|
|
|
Sorry as I am really new to vc++ .basically I am a java programmer and I have to do some stuff in VC++ as part of the project.I tried to go through the MSDN and other tutorials.But I guess it will take lot of time and I dont have time.
can any one give me simple idea of winsock programming,like, do we have something like ServerSocket and Socket(as in java).
and the flow of function calls once a connection is accepted.
Do we have any separate config for UDP and TCP.
|
|
|
|
|
use CSocket class
The calling of functions can be done in the manner below as per your requirement:
CSocket s;<br />
s.Create();<br />
s.Connect();<br />
s.Send();<br />
s.Receive();
Somethings seem HARD to do, until we know how to do it.
_AnShUmAn_
|
|
|
|
|
thanx for your help
|
|
|
|
|
|
hey thanx man.. !!this exactly wat I wanted.Thank you very much for your help;)
|
|
|
|
|
REQURIEMENT :
DETERMINE VERTICAL SCROLLBAR PRESENCE IN LISTBOX.
The ListBox has both vertical scrollbar and horizontal scrollbar checked in the resource.
When we add string to ListBox ,after addding the number of items,the vertical scroll bar
appears in the listcontrol.
Is there any way to check whether the vertical scrollbar is available or not?
CLISTBOX in vc++
for thendral
-- modified at 5:33 Friday 12th May, 2006
|
|
|
|
|
|
check for the style WS_VSCROLL
nave
|
|
|
|
|
HI NAVEEN..,
i have the scroll property checked for both vertical and horizontal scrollbar.
scenario 1:
1) you have Clist box
2) Add few entry to listbox till the vertical scroll bar appears
3) is there any way to find at this point that scrollbar has appeared.
so that i may do some action based on that.
Query :
Any point of time given a LISBOX is it possible to find where VERTICAL SCROLL is visible or available .
for thendral
|
|
|
|
|
For a list box even though u have set WS_VSCROLL style while creating, the style will be there untill there is enough item to show scroll bar. i.e..
The WS_VSCROLL style will only be there in the listbox if only the listbox have scroll bar at that time..
1.Consider that a listbox can occupy 5 items with out scroll bar..
2.Now the list is having 4 item..Hence there will not be any scroll bar..
So the listbox will not be having WS_VSCROLL style...
3. Now i inserted two more items so that the a verical scroll bar appear for the list box.
4. Now if i check for the WS_VSCROLL style.. it will be there
nave
|
|
|
|
|
what is the use of static class/function/variables.
NiLeSh KoRpE
|
|
|
|
|
When you declare a class member (function or variable) as static, it will be shared among all instances of the class (which means that, for a variable, if one class changes its value, it will be changed for all other instances).
Declaring a static variable in a function means that the variable won't be reinitailized each time you enter the function again: it will keep the same value as it had when the function was left the last time.
Cédric Moonen
Software developper
Charting control
|
|
|
|
|
what is subclassing actually??
how do u create a subclass in SDK and MFC?
Thanks in advance
Regards,
Prashanth.v
|
|
|
|
|
subclassing is not a MFC nor SDK concept but a C++ (and even general OO) concept.
it means using a base class to reuse its behavior/design/methods and not reinventing the wheel... another good term for this is also inheritence
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
can u please give me a example????
|
|
|
|
|
class BaseClass {
int m_iSize;
public:
int getSize() { return m_iSize; }
void setSize(int i) { m_iSize = i; }
};
class ChildClass : public BaseClass {
double m_dPrice;
public:
double getPrice() { return m_dPrice; }
void getPrice(double d) { m_dPrice = d; }
};
then, you use it like any object which contains all...
ChildClass cc;
cc.setSize(4);
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-- modified at 5:30 Friday 12th May, 2006
|
|
|
|
|
toxcct wrote: class ChildClass : BaseClass {
class ChildClass : public BaseClass {
class ChildClass : protected BaseClass {
class ChildClass : private BaseClass {
Maxwell Chen
|
|
|
|
|
|
but inheretance also seems to do the same thing
|
|
|
|
|
NiLeSh KoRpE wrote: but inheretance also seems to do the same thing
did you read my 1st post ?
"another good term for this is also inheritence"
yes, it is exactly the same... 2 different word for the same thing.
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Yes u ar correct Max
|
|
|
|
|
Is always tought that subclassing was to change the behaviour of a class in a framework
without changing the framework. I guess i'm wrong but what is then the correct term for
this kind of pattern.
Let me explain by a simple example. You create your own windowproc which is then used to overwrite the normal winproc. By using your own windowproc you can change the behaviour of the subclassed window.
codito ergo sum
|
|
|
|
|
in what way would that be different from what i explained ?
you can always inherit from a base class and override some functions do change the behavior, or had some new features...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Suppose one has a working application with the following structure
COrgMainFrame and COrgView loaded via a dll or unrelated part of the application.
At some point in time you need to change the behaviour of one of the classes, but you are prohibitted to do this at design time time. So you can't/may not create/use CMyNewView or CMyDifferentMainFrame. The only way is to implement this is at runtime. This means override the normal behaviour of the class at runtime, by loading a new windowproc function into the message handeling part of that window you want to change. Once this is done all windows messages passes your function first instead of the PreTranslateMessage function that normaly parses the messages. So one can delete certain messages being send to the normal PreTranslateMessage function or add new functions; and altering as such the behaviour of the Original class. This doesn't have anything to do with inheritance or objects this is 'normal' windows behaviour.
Each windowclass needs to be registerd in windows, this is normaly done by the MFC classes at creation of the window, this is needed to let windows now what windowproc needs to be called for this kind of window. Using the technique explained above one can alter the behaviour of one single instance of that class/window without changing the behaviour of other instances of the same object.
I hope I have explained it clearly ennough what I meant.
Like i said before I always thought that this was called subclassing in windows
codito ergo sum
|
|
|
|