|
Just saw that also, man
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
...and now I've seen it, for the first time.
Loocks excactly whar I needed.
Reading it now - Thanks
...and justice for all
APe
|
|
|
|
|
|
|
In C++ when using the array index overload operator, is there any way to tell if the operation is a lhs or rhs based.
for instace, assume
class intArray {...};
intArray intA;
and assume that intArray::operator[] has been defined
can I tell the difference between ...
int a = intArray[1];
... and ...
intArray[1] = a
... in the method. If so, please can you state how.
|
|
|
|
|
it is always the same.
<font style="color:blue;">int </font>Array[1] = a;
is equivalent to :
<font style="color:blue;">int </font>(Array.<font style="color:blue;">operator</font>[](1)).<font style="color:blue;">operator</font>=(a);
only ++ and -- operators have a way to tell if they are pre or post incrementation/decrementation :
<font style="color:blue;">const</font> T& <font style="color:blue;">operator</font>++ (T&); <font style="color:green;">
<font style="color:blue;">const</font> T& <font style="color:blue;">operator</font>++ (T&, int); <font style="color:green;">
TOXCCT >>> GEII power
|
|
|
|
|
when define operator[] The Debug version of the library asserts if the subscript (either on the left or right side of an assignment statement) is out of bounds.
it limits your index of array ,normally between 0 and up bounds,once beyond ,will be asserted error flow
understand?
|
|
|
|
|
It's customary to write two [] overloads, one const and one not:
class X
{
public:
X& operator[](int n);
const X& operator [](int n) const;
}; The non-const version will be called for l-values, or r-values that contain a non-const X. The const version will be called for r-values that contain a const X.
Unfortunately you can't really tell from the non-const version whether it's returning an lvalue or rvalue.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
Kosh reminded me of some of the prima-donna programmers I've worked with. Knew everything but when you asked them a question; never gave you a straight answer.
-- Michael P. Butler in the Lounge
|
|
|
|
|
I have a MFC Dialog based application which will update a Edit Box when an event is set. A thread is waiting on this event.
But how do I call a procedure from this thread to update this Edit Box.
2 questions;
1. How should this procedure be written (member of dialog or not)
2. I can pass in some data via a structure when I create the thread, but how can I pass in either a pointer to the Dialog or this procedure.
I did try passing in the dialog 'this' pointer but could not see the procedure;
CMyDialog::UpdateData() This is the update data procedure.
I am stuck - help
|
|
|
|
|
1. i would go for a member function
2. pass this then in the thread callback cast the pointer again to your dialog
(CMyDialog*) pxDlg = (CMyDialog*) pParam;
But personnaly, i would just pass the handle of the window, and post a message from the thread to this window
Check
SendMessage, PostMessage and RegisterWindowMessage
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Short answer for now:
Se
http://www.codeproject.com/threads/memberthread.asp
realy easy and Good!
...and justice for all
APe
|
|
|
|
|
sweep123 wrote:
CMyDialog::UpdateData() This is the update data procedure.
Be very careful when using UpdateData(). It can prove to be not very helpful.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
hi,
We have created an activex Ctrl using MFC.
It has serialize method in its COleControl derived class.
Now myActiveX control is inserted in a powerpoint presentation.
Whenever power point slideshow ends, then the serialize method is getting called.
How to avoid serialize method is getting called at the end of slide show mode?
I am trying by setting SetModifiedFlag(false) but no result.
pls help me.
dadsadasd
|
|
|
|
|
I need help in doing a save function.
The program needs to save the text in the text field from a dialog into a text file. The dialog is called from the application which is in MDI form.
Thanks.
jazzlycool
|
|
|
|
|
<font style="color:blue;">#include</font> <fstream>
<font style="color:green;">
ofstream dest("\\fold\\my_file.txt");
Cstring Buffer;
(GetDlgItem(MY_CONTROL))->GetWindowText(Buffer);
dest << Buffer;
dest.close();
TOXCCT >>> GEII power
|
|
|
|
|
Thank you very much. It works very well.
jazzlycool
|
|
|
|
|
perfect, i wasn't 100% sure of me
now i am... eheheh
TOXCCT >>> GEII power
|
|
|
|
|
Hi there
Can someone help me with this?
I need to write a program which simulates a computer system in a public library.
Working on these four objects - Customer, Books and loans
and the library itself.
The library needs to collect info about Customer and add customers.
Books title, isdn number and so forth.
Loans = the date loaned and date returned.
Customers must be able to loan books from and return books
to the library.
Library needs to print out a report containg details of each book and customer for each loan.
I would apreciate if some can just give me a starting point example of how to implement this.
Also links to places where i can go thru similar code
thanks in advance
Bhangie
|
|
|
|
|
It's been a while since I did homework.
Here are some hints for my version.
Each object should encapsulate the data about the instance of the object. For a book, this would be title, author, isbn etc. You'd probably want a unique book id too, since a library may have multiple copies of popular books. For a loan, you want to record the book, the customer, and the start/return dates. If you want history you have to save these after books are returned.
A library is really a collection of other objects. You need some way for objects to persist. A librarian wouldn't type in the names of all the borrowers every day at system startup, or all the books.
Steve S
|
|
|
|
|
i want to develop the interface like ms-paint where theres a toolbox in which button like icons are drawn.also how to add scrolling capability to the interface as it is in paint.
|
|
|
|
|
Try looking at CToolBar / CDialogBar for the toolbox bit,
and CScrollView for the scrolling interface.
For scrollview at least, there are some good scribble samples.
Iain.
|
|
|
|
|
hello!!
i try to drag items between listctrls in my application,but when i drag more than 8 items at one time,the dragmove operation is so slow.
i find that CImageList::DragMove function is so slow,but why?
and how to solve it?
help me!!
|
|
|
|
|
Hi there
Is it passible to resize DC?
Thanks
|
|
|
|
|
A DC doesn't have a size per se. What it has (generally) is a drawing surface (bitmap) associated with it. If it's a memory DC, you can select a different one in, but you'd have to be sure that the old one was managed properly.
Why do you want/need to do this?
Steve S
|
|
|
|
|
1) Wath is the corret way to use "put_Picture" for an Image control if I have the Path of the Picture to load (C++ MFC)?
2)How can I find the Ptah of the application that is running?
Thank's for all
Sorry for my English!!
|
|
|
|