Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
C

ClockDivider

@ClockDivider
About
Posts
22
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Beginners question? Where does the exact double value go?
    C ClockDivider

    Aaaah! Trying six hours on that issue, then waiting five minutes for your excellent answer! Thank you very much! :-D Martin...

    Algorithms help question csharp c++ visual-studio

  • Beginners question? Where does the exact double value go?
    C ClockDivider

    Hello, I have a strange problem, but probably it is because i am lacking knowledge, but what? When debugging this: double dTryThis = 1.23456789; the debuggers variable watch shows this value for dTryThis: 1.234567889999999 instead of the expected 1.234567890000000! :confused: And so is the wrong value used for further calculations! Is my computer sick or am I or what? I am on Visual Studio 2005 C++. Thanks a lot for your help! Martin...

    Algorithms help question csharp c++ visual-studio

  • Please help: Where has CDumpContext gone?
    C ClockDivider

    Hello, could you please help me with this: I am porting a solution for PocketPC 2003 written in eVC 4.0 (MFC) to Visual Studio 2005 (Visual Studio 8). Now I recognized there is no CDumpContext in the MFC-Version in VS 2005? Why is this? When looking into afx.h, where CDunpContext was declarated for Embedded C++ 4.0, it does not belong to WinCE-devices: #ifndef _WIN32_WCE class CDumpContext { ... } #endif Is there any replacement for dumping? Thanks a lot... Martin

    Mobile c++ visual-studio csharp hardware help

  • Where has the CDumpContext gone? [modified]
    C ClockDivider

    Hello, could you please help me with this: I am porting a solution for PocketPC 2003 written in eVC 4.0 using MFC to Visual Studio 2005 (Visual Studio 8). Now I recognized there is no CDumpContext in the MFC-Version in VS 2005? Why is this? When looking into afx.h, where CDunpContext is declarated for Embedded C++ 4.0, it does not belong to WinCE-devices: #ifndef _WIN32_WCE class CDumpContext { ... } #endif Is there any replacement for dumping? Thanks a lot... Martin -- modified at 7:28 Monday 12th June, 2006

    System Admin c++ visual-studio csharp hardware help

  • How to disable automatic COMMAND_UI routing?
    C ClockDivider

    Thank you, found out myself! It´s always the same: Searching two hours for a solution, then decide to ask the forum, then try again and find solution self within 2 minutes! Here is the solution: Subclass a CMyMenu from CMenu and overwrite "void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler)" in this new class. In this function do nothing, so the automatism doesn´t work. Greez...

    C / C++ / MFC question tutorial

  • How to get rid of "Untitled" in SDI app title bar?
    C ClockDivider

    Isn´t it just AfxGetMainWnd()->SetWindowText("MyApp")? Didn´t try, but it´s a suggestion... Greez! Martin...

    C / C++ / MFC tutorial question

  • How to disable automatic COMMAND_UI routing?
    C ClockDivider

    Hello, I wonder how to disable the automaic menu enable/disable for CFrameWnd mechanism in eVC 4.0, I thought it could be done by setting the m_bAutoMenuEnable to FALSE? Am I wrong with that? How can I accomplish it to stop that automatism? Thnaks a lot... Martin

    C / C++ / MFC question tutorial

  • Howto: Calculate brightness from RGB-Color?
    C ClockDivider

    Hello! I need to calculate a bright text-color when a background is dark and a dark textcolor when the background is bright. Does anyone have an idea how to calculate the brightness of a rgb-value to do this? Thanks a lot!

    IT & Infrastructure tutorial question

  • How to convert a CString to DWORD in C++
    C ClockDivider

    Thanks a lot, due to your answer i was able to get the code compiling now. I thought new .NET projects were unicode by default, as i could not find a switch. but now i found it and it works fine.... i appreciate it very much, thanks.... Martin.

    ATL / WTL / STL c++ csharp dotnet visual-studio help

  • Howto draw a pie in WinCE?
    C ClockDivider

    Dows anyone know how to drwa a pie in WinCe, since it does neither support Arc() nor ArcTo()? Thanks in advance! Martin Hoppe

    Mobile tutorial question

  • How to convert a CString to DWORD in C++
    C ClockDivider

    Hello, I just switsched from C++ 6.0 to VS .NET, and some code that compiled before does not compile any more: CString cNum = "123"; unsigned short* ss; DWORD dwRet = (DWORD)wcstod(cNum.GetBuffer(0),&ss); error C2664: 'wcstod': conversion of parameter 1 von 'ATL::CSimpleStringT::PXSTR' into 'const wchar_t *' impossible What do I have to do? I do NOT want to use the .NET framework nor ATL, only MFC? I suppose I have to switch some compiler parameters? Thanks a lot! Martin

    ATL / WTL / STL c++ csharp dotnet visual-studio help

  • ListView_SortItems question
    C ClockDivider

    The prob is this in: ListView_GetItemText(lpNmlv->hdr.hwndFrom, lParam2, lParamSort, szBuf2, sizeof(szBuf2)); the parameter lParamsort is wrong here, it should define the column (lpNmlv->iSubItem). AND: Do you to set the LPARAM value when inserting your item? Here is an excerpt from .NET help: "The lParam1 parameter is the 32-bit value associated with the first item being compared, and the lParam2 parameter is the value associated with the second item. These are the values specified in the lParam member of the items’ LVITEM structure when they were inserted into the list." I hade precisely the same problems as you, now that I assured being the item.lPram member valid and changing the wrong parameter value to the item.iSubitem it works... Hope it helps now?...

    C / C++ / MFC question com help

  • ListView_SortItems question
    C ClockDivider

    Ummm... Your code compiles here... But you already changed the calling of the ListView_FindItem and ListView_GetItemText, now using the lpNmlv.>hdr.hwndFrom, no? What is the exact compiler error?

    C / C++ / MFC question com help

  • ListView_SortItems question
    C ClockDivider

    I am not sure why :-) but here is some code i have in my function that might belong to the problem: int CALLBACK CListCtrlEx::CallbackSortString(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) { // lParamSort contains a pointer to the list view control. CListCtrlEx* pListCtrl = (CListCtrlEx*) lParamSort; } Thus you should be able to convert lParamSort to a CWnd* which then provides the propper m_hWnd Is that true?

    C / C++ / MFC question com help

  • Diving into GPS development
    C ClockDivider

    Hello, I need some suggestions from a GPS-hare! I am starting to implement GPS into my app, which is running same time as a navigation system is running, thus it has to share the gps port, whatever it is made of (serial, bluetooth, usb and so on). I saw one can use the commercial solution "Franson GPS Gate", which provides "virtual ports" by taking the original signals and then forwards them to its emulated ports. So here is my first question: Is there any way to emualte such a port myself, i mean, grab the signal from the port and provide a virtual port from within my app, so the navi-soft gets its signal from MY app? And another question I have: Can anyone suggest some mfc classes encapsulating the NMEA protocol? Thank you very very much! Martin

    C / C++ / MFC question c++

  • ListView_SortItems question
    C ClockDivider

    I am not that experienced but as far as i know you have to pass a callback funtion as parameter: i have done it useing mfc so zou have to translate that somewhat, this is the member function i declared as member of my derived listview, this example is used to sort numeric columns: static int CALLBACK CallbackSortNumeric(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort); Then, when you add a column, you have to pass the adress of the function (PFNLVCOMPARE pCALLBACKSORT): this->InsertColumn(nCol, cHead,pCALLBACKSORT,iSortMode,iFormat, nWidth,nSubItem); This way the sorting is managed in CallBackSortNumeric. Hope it helps... Martin...

    C / C++ / MFC question com help

  • Baking or buying a serial port?
    C ClockDivider

    Hello and thanks looking into my question. I am about to implement gps support to my embedded C++ 4.0 program, but i do not find an entry point to step into: I already know the com port is only for exclusive use, so if there is a navigation system running, the serial port is locked. Is that true? If so: How would I start to get the serial data into my program and then pipe the NMEA stream further to the navi-system? I know I could use the virtual driver from FRANSON, but I would like to avoid a third party product. Thank you very much... Martin

    Mobile question c++ com hardware

  • C++ Math-Failure? modfl == mudfl?
    C ClockDivider

    Hello, I wonder about the behaviour of the modfl-function that splits a double into it´s integer and fractional part, and beside this why double values seem to have different values in different C++ IDEs. Here is my code: long double dVal; // Value to split into fractional and integer part long double dInt; // takes the integer part long double dFract; // takes the fractional part 1. dVal = 3333.3333; dFract = modfl(dVal,&dInt); //Result: // dInt = 3333.0000000000 // dFract = 0.33329999999978 2. dVal *= 10000; // should be 33333333.0 now? dFract = modfl(dVal,&dInt); // Result: // dInt = 33333332.0000000000 // dFract = 0.99999999627471 3. dVal = 33333333.0; dFract = modfl(dVal,&dInt); //Result: // dInt = 33333333.0000000000 // dFract = 0.0000000000 In Example 1, the dVal is stated to be 3333.3332999999998 when looking at it with the Visual Studio .NET debugger (watch), in Embedded C++ 4.0 it is 3333.33330000000, this is directly after assigning the constant value. Why is this? And especially: why does only the last example come up with correct values? Thanks... Martin

    C / C++ / MFC csharp question c++ visual-studio hardware

  • Possible? Injection of a CWndEx-Class in MFC-structure?
    C ClockDivider

    Bill Buklis wrote: Another approach (at least for objects you directly create) would be to multiply inherit. This wouldn't apply to objects that are dynamically created, however. Actually I was trying to get this work for three days, I derived classes from CEdit and CButton and both from my own class "CInputCtrl" too, like this: class CEditEx : public CEdit, public CInputCtrl { public: void MyFunc(); } class CInputCtrl { public: void MyFunc(); } But now, when running this code CInputCtrl* pCtrl = (CInputCtrl*)GetFocus(); pCtrl->MyFunc(); the CInputCtrl::MyFunc() is called. If only I was able to "virtualize" the MyFunc() of CEditEx everything was OK. Can I change something so it works the way I expect? I already read about multiple inheritance but could not find something helping me further on... Thank you very much again...

    C / C++ / MFC question c++

  • Possible? Injection of a CWndEx-Class in MFC-structure?
    C ClockDivider

    Hello, I would like to add a new member-function to all the controls of different kind in my dialog, e.g. CEdit, CButton and so on. Since they are all derived from CWnd I would like to know if there is a possibility to insert a new class "CWndEx" between CWnd and the control class, so that e.g. CEdit is not longer derived directly from CWnd but from CWndEx. This way I could add a new member function to CWndEx so all the my controls would inherit this function? Seems to be a newbie :confused: question, yes? Thank you very much...

    C / C++ / MFC question c++
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups