CString cs;
cs.Format("%i %5i %-5i %x %X %f %3f %8.3f",
3.14,3.14,3.14,3.14,3.14,3.14,3.14,3.14);
Try it out!
Andreas
Greetings Andreas
email is invalid, because of spam
email me to amosmann[at]dualis[dot]net
...if so in your App, you could
BN_PUSHED:
nLastTick=GetTickCount();
BN_UNPUSHED:
if ((GetTickCount()-nLastTick)>3000 [COLOR=green]/*time in ms*/[COLOR=blue]){
StartTheOtherDialog();
};
I hope I could help a bit
set/reset a bool to find out whether is still pressed an at the...
Hi Ion...
>There are many thigs also to learn about synchronization.
That is it I want to know
To start a thread is easy, I use MFC, so CWinThread is ok.
To use a simple boolean to tell all threads to end is easy too.
but... after that there are the questions.
>Questions:
>Where do I put...
Thanks Ion, and now to the questions:
let me say:
CData data; // contains the data I want to use.
struct {
CData *data;
CAnyOtherData *other;
} CParam;
DWORD WINAPI ThreadProc1(void* xx)
{
while(run)
{
AVeryLongProcedureThatChangesEverything(xx->data);
}
run...
Please don't send me to msdn, I tried this.
Maybe my English is too bad, but I did not find the answers I looked for.
I have a main thread, that starts a thread to read from file into an object, and another one, that displays the object, both of them should be killable from the main thread.
I...
Thx!
Pete:
it worked, but I do not know, why. Any explainations?
sethmcdoogle:
sorry, did not work. I read wrong, did not search for precompiled header, but for directive for precompiled headers ...
[cheers]
Greetings Andreas
Sorry, must be simple, but I do not know:
What are possible reasons for
Error C1010: Unexpected end of file while searching precompiled header?
I used 2 empty files, let me say f.h and f.cpp, put it into project and wanted to rebuild it, and this error occurs. Why? What is the minimal text I...
if I want to declare a copy-constructor or a operator= like
X::X(const X &x);
X &X::operator={const X &x};
x has a member std::list<AnyType>;
if I do the following:
X::X(const X &x){
std::list<AnyType>::iterator it=x.anylist.begin();
...
};
the compiler tells me:
error C2679:
binary...
...#define XTRACE(FORMAT)
#endif
In the CPP File "MyPrivateFunctions.cpp"
void LogToFile(int Level, CString sMessage, int Tracelevel, /*CString Time,*/ int Line, CString File){
if (File.GetLength()>0){
//Es wird nur geschrieben, wenn tatsächlich eine Datei angegeben ist
bool...
thx. Is there another way?
I have written som macros for debug, that write some texts to a file (XTRACE), and for special paragraphs I would like to choose a special file.
example:
#define TRACEFILE "" //will not write in File
XTRACE (...); //nothing happens
#define TRACEFILE...
I tried to define like this
#define AA "A" //AA a defined Value
TRACE("#%s#\n",AA); //result #A#
#define BB AA //BB as a temp storage of AA
TRACE("#%s=%s#\n", BB , AA );//#A=A#
#define AA "a" //new Value to AA
TRACE("#%s#(%s)#\n",AA , BB...
hi pete
>Sure, but that's not what he posted. Try this
>int* p;
>try{
> *p = 10; //;-)
>}catch(...){
> TRACE("GotYahNot\r\n");
>}
thx pete and /JOlesen
[cheers]
Greetings Andreas
thx for your answer, but I dont have to choose between the libraries, the boss [yoda] is doing that, I "only" have to manage that.
Libraries exist longer than I work in this company, are very complex and not too easy to debug, cause errors only come from time to time.
But, if the...
...like to catch nearly all possible exceptions when starting that modules.
try
BadFunctionThatCouldRaiseAccessViolation();
catch (CWhatever *e) {
if (e->m_cause==CWhatever::ecAccessViolation){
TRACE("There are big problems, lucky guy");
}
e->Delete();
}...
I look for a possibility to catch an access violation like
try
int *p;
*p=1;
catch (CWhatever *e) {
if (e->m_cause==CWhatever::ecAccessViolation){
TRACE("There are big problems, lucky guy");
}
e->Delete();
}
Does anyone have such an Idea?
(-...
program will convert the input into float, if can.
that means if user gives 00000800, 800, 800.0, 8E+2, 80E+1 will all be the same
if user gives 08 00 it will not work
note: user can input 800.1, may be it is not as you like, so try int
[ghost]
Greetings Andreas
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.