Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. AMosmann

    Converting integer to string

    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
  2. AMosmann

    left click & hold for 3 seconds

    Maybe it helps: As I read in the MSDN, the owner window of the button gets with WM_COMMAND message, if a button is pushed (BN_PUSHED) or released (BN_UNPUSH). if so in your App, you could BN_PUSHED: nLastTick=GetTickCount(); BN_UNPUSHED: if ((GetTickCount()-nLastTick)>3000...
  3. AMosmann

    Thread Programming

    Thanky Ion, any further questions: CData data{ [COLOR=magenta]CCriticalSection CriticalSectionElement; }; [COLOR=green]// contains the data I want to use. [COLOR=blue]struct { CData *data; CAnyOtherData *other; } CParam; DWORD WINAPI ThreadProc1(void* xx) { while(run) {...
  4. AMosmann

    Thread Programming

    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...
  5. AMosmann

    Thread Programming

    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...
  6. AMosmann

    Thread Programming

    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...
  7. AMosmann

    Error C1010

    thanks a lot, was a great help for understanding [bigsmile] Greetings Andreas
  8. AMosmann

    Error C1010

    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
  9. AMosmann

    Error C1010

    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...
  10. AMosmann

    list::iterator & const

    Thanx, was a great help :-)) Greetings Andreas
  11. AMosmann

    list::iterator & const

    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...
  12. AMosmann

    I tried to define like this #def

    In the Headerfile &quot;MyPrivateFunctions.h&quot; extern CString XTraceStringOnlyInMacro; #ifdef XTRACE_ENABLE #define XTRACE10(FORMAT,S1,S2,S3,S4,S5,S6,S7,S8,S9,S10) XTraceStringOnlyInMacro.Format(FORMAT,S1,S2,S3,S4,S5,S6,S7,S8,S9,S10); XTRACE(XTraceStringOnlyInMacro); #define...
  13. AMosmann

    I tried to define like this #def

    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 &quot;&quot; //will not write in File XTRACE (...); //nothing happens #define TRACEFILE...
  14. AMosmann

    I tried to define like this #def

    I tried to define like this #define AA &quot;A&quot; //AA a defined Value TRACE(&quot;#%s#\n&quot;,AA); //result #A# #define BB AA //BB as a temp storage of AA TRACE(&quot;#%s=%s#\n&quot;, BB , AA );//#A=A# #define AA &quot;a&quot; //new Value to AA TRACE(&quot;#%s#(%s)#\n&quot;,AA , BB...
  15. AMosmann

    howto catch access violation

    hi pete >Sure, but that's not what he posted. Try this >int* p; >try{ > *p = 10; //;-) >}catch(...){ > TRACE(&quot;GotYahNot\r\n&quot;); >} thx pete and /JOlesen [cheers] Greetings Andreas
  16. AMosmann

    howto catch access violation

    Can you explain it more? catch(what)? I tried CException*, but it did not work Greetings Andreas
  17. AMosmann

    howto catch access violation

    thx for your answer, but I dont have to choose between the libraries, the boss [yoda] is doing that, I &quot;only&quot; 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...
  18. AMosmann

    howto catch access violation

    to explain it a bit more I have to use some modules programmed by other programmers. To avoid that the complete application crashes without any senseful hint I would like to catch nearly all possible exceptions when starting that modules. try BadFunctionThatCouldRaiseAccessViolation()...
  19. AMosmann

    howto catch access violation

    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(&quot;There are big problems, lucky guy&quot;); } e->Delete(); } Does anyone have such an Idea? (-...
  20. AMosmann

    C++ illegal digit for base error...HELP!

    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

Part and Inventory Search

Back
Top