|
Thank you all for your replies. I see you are using SetWindowText() and GetWindowText(). In the meantime I have tried the following and it worked.
String* S1 = textBox1->Text;
textBox1->Text = String::Concat(S1, S"Test");
Am I not suppose to code like that in C++ as there are better way of doing it?
Thanks
Ben
|
|
|
|
|
it seems that there had a misunderstood.
you are coding for .NET framework (so your question should be asked in the C++/CLI forum).
our answer were in fact for Win32 / MFC...
so don't take them in account.
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
I have initialized all the namespace declaration in a certain .h file. Then include the .h file in a CView class, it turned OK,
But when i used the same namespace and include the .h file in a CDialog class. An error occurred: "Already defined in CView.obj file".
HOw can I access a namespace in 2 separate classes or files?
|
|
|
|
|
|
hi ,
i made an application that can receive a file as unicast and multicast it in dialog based application , but it works only once ,mean to send another file i have to restart the application , so i think using thread i will not require to restart the application , it will receive data as unicast and send it as multicast ,
plz help me to do it ,if possibe give me an example of code.
my id is tosachingupta@gmail.com
thanks
sachin
|
|
|
|
|
cancerion wrote: but it works only once ,mean to send another file i have to restart the application
What has threads got to do with it. There must be something wrong with your application design.
Well as far as threads are concerned you can use
AfxBeginThread(...) //for starting off a thread
AfxEndThread() //to clean up a thread.
And take a look at the CWinThread class too.
cancerion wrote: if possibe give me an example of code.
my id is tosachingupta@gmail.com
Run
Jesus Loves <marquee direction="up" height="40" scrolldelay="1" step="1" scrollamount="1" style="background:#aabbcc;border-bottom:thin solid 1px #6699cc">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Its simple as that.. (this is a worker for you!)
in the header, declare as
UINT Threader(LPVOID p);
void realThread();
in the implementation,
UINT YourDialog::Threader(LPVOID p)
{
YourDialog* me = (YourDialog*)p;
me->realThread();
return 0;
}
void realThread()
{
do
{
}while(1);
}
then as said by drawn, you can use AfxBeginThread to start the thread
ie,
CWinThread *cwt=AfxBeginThread(realThread,this);
cwt->suspend();,cwt->resume(); ..ect then the thread is under your control
0x0400:
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
|
|
|
|
|
|
Can someone please write me a procedure which rescale a video image in UYVY format, from size 352*288 to 117*96 (scale factor of 3)? Please help. Thanks in advanced.
|
|
|
|
|
Hi,
How can i change the caption of the columns headers using the MS DataGrid 6 ?
Is there any way to find out which record is selected using the mouse click event ?
Best Regards,
sdancer75
|
|
|
|
|
There is one thing I can't figure out with VC 6.0 & ADO. How can I change the 'Background Fetch Size' (DBPROP_ASYNCFETCHSIZE) property of the recordset running asynchron? It's the number of records retrieved between two fetchprogress events. It's default is 15.
It's easy to do it in VB, but in VC++ before opening the recordset, I don't have any dynamic properties available, after executing the SQL the property is read only. I suppose if it's possible in VB it must be possible in VC++ 6.00 as well. I've hard times finding any docs about it even in SDK. As far as I know this OLEDB property is supported by the Cursor Service, which is initilaized when changing cursor to adUseClient.
Any idea?
|
|
|
|
|
I have a class on a library on the file Libr.h/.cpp
I build a doc/view app.
I link the header in Doc.h using #include "Libr.h" ,
and the code is pasted in Doc.cpp using #include "Libr.cpp" .
View knows that the library exist because in View.h I have #include "Doc.h" .
So I have some code that use the library in Doc.pp and View.cpp.
But the problem is:
Doc.cpp OK
View.cpp: Link error LNK2019 (functions not finded when link: but no problems when compile)
So I tried to past #include "Libr.cpp" in View.cpp, and then:
Doc.cpp: Link error LNK2019
View.cpp OK
Damn!
And this appens only with some functions of the library, and strange thing is that this functions are very very similar to other functions that haven't got any problem!!
Can anybody help me??
(sorry for the long message)
Have a nice code day
|
|
|
|
|
#include "Libr.cpp" is wrong.
Include Libr.h in your Doc.h & include Doc.h in your Doc.cpp
|
|
|
|
|
tuxyboy wrote: #include "Libr.cpp" is wrong.
is actually not wrong but poor way of programming.
-Prakash
|
|
|
|
|
you need to add the lib file to the link tab in the project settings.
-Prakash
|
|
|
|
|
Hi,
I had the same link error.
I feel the problem is inclusion of your header files(#include "Libr.h") in side the Doc.h.
Try to include the header files inside the .cpp files, not inside the .h files.
If you want exactly inside the .h file, then include inside of #define.
otherwise system will produce runtime error because of multiple inclution.
in your case you included "#include "Libr.h" inside your doc.h and doc.h is included inside view.h and etc.. try to avoid this and "#include "Libr.h" should be inside your doc.cpp
Dont include .cpp file. .h file will take care everythings of .cpp
best of luck,,
regards
Vallikumar A
|
|
|
|
|
Sorry, but I prefere the simple use of #include .
I have good news:
In libr.h/.cpp there was a lot of inline functions,
well... I modify the files cutting that word and now everything is running.
But I want to use inline: I need it!!
So, do you know if it is possible that the linker doesn't like the keyword inline or if the use of 'inline' could give this error??
Thaks
Have a nice code day
|
|
|
|
|
_Russell_ wrote: Sorry, but I prefere the simple use of #include.
linking the library to your project is also a simple way of doing.
-Prakash
|
|
|
|
|
btw, is the doc-view app a MFC project?
-Prakash
|
|
|
|
|
Yes
Have a nice code day
|
|
|
|
|
Add the .cpp file to the project and #include the .h file whereever you need.
It should compile and link properly.
-Prakash
|
|
|
|
|
Iam a beginer in testing and i need help in writing unit test cases. I have a Software specification document, use cases , my problem is how can i write unit test cases?
bigbluff
|
|
|
|
|
what software do you write your tests with ?
to get started, you have to consider for each part tested (in general, functions one by one) the purpose of it. then you initializes the context of which the function is called, the you know exactly what it is supposed to do, so, what would be either the result and the context left.
you must test this...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
Before start writing the test cases, you should know your software well. You should proficient and Should have step by step knowledge of your project. what are the previous step, next step, input and output etc.
try to go through some existing test cases of your project. I think this will helps you..
best of luck.
regards
Vallikumar A
|
|
|
|
|
I would like to do a Dependency/sequential build on the files in .NET.
For example, I have 2 files x.c and y.c.
Compiling and Linking of x.c needs y.z( the output of y.c).
But since .NET builds in alphabetical order, I cannot aceheve this.
I have seen similar behaviour in VC++ 6.0 as well.
Is there a way to do this?
kvprasad
your future is what you think
|
|
|
|