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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Pointers

Pointers

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    durban2
    wrote on last edited by
    #1

    There are two pointers, both points on controls of type IDC_DATETIMEPICKER. COleDateTime* pIN = (COleDateTime*) GetDlgItem(IDC_DATETIMEPICKER1); The second control is on another dialog window COleDateTime* pDest = (COleDateTime*) (m_pParent->GetDlgItem(IDC_DATETIMEPICKER1)); The first pointer to point date ’27.05.1953’ How do with help the second pointer receive date ’27.05.1953’ ? Thank you.

    C 1 Reply Last reply
    0
    • D durban2

      There are two pointers, both points on controls of type IDC_DATETIMEPICKER. COleDateTime* pIN = (COleDateTime*) GetDlgItem(IDC_DATETIMEPICKER1); The second control is on another dialog window COleDateTime* pDest = (COleDateTime*) (m_pParent->GetDlgItem(IDC_DATETIMEPICKER1)); The first pointer to point date ’27.05.1953’ How do with help the second pointer receive date ’27.05.1953’ ? Thank you.

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      Is this your real code ? Because you cannot cast a CDateTimeCtrl (which is the control on your dialog) to a COleDateTime. You can't do something like that, you will end up will something totally invalid (it strange that it didn't even crash). So, cast it to a CDateTimeCtrl instead of a COleDateTime.

      Cédric Moonen Software developer
      Charting control [v2.0] OpenGL game tutorial in C++

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

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