create rectangle box ,display inside system time how?
-
Hi friends i want to create one rectangle box in that rectangle box inside displays the system date how to do that in MFC? please give me your code snippet Thanks and regards Nisha.S
-
Hi friends i want to create one rectangle box in that rectangle box inside displays the system date how to do that in MFC? please give me your code snippet Thanks and regards Nisha.S
to create rectangle firstly draw group box id (IDC_STATIC) then hide it and using following code on paint method u can draw rectangle ... CPaintDC dc(this); // device context for painting CRect rc; CWnd * pW = this->GetDlgItem(IDC_STATIC); pW->GetClientRect(&rc); pW->ClientToScreen(&rc); this->ScreenToClient(&rc); //dc.FillSolidRect(&rc,RGB(50,50,50)); dc.Draw3dRect(rc.left+2, rc.top+5, rc.Width()+1, rc.Height()-3, RGB(255, 255, 0), RGB(255, 255, 0)); dc.Draw3dRect(rc.left+1, rc.top+4, rc.Width(), rc.Height()-4, RGB(255, 255, 0), RGB(255, 255, 0));
-
to create rectangle firstly draw group box id (IDC_STATIC) then hide it and using following code on paint method u can draw rectangle ... CPaintDC dc(this); // device context for painting CRect rc; CWnd * pW = this->GetDlgItem(IDC_STATIC); pW->GetClientRect(&rc); pW->ClientToScreen(&rc); this->ScreenToClient(&rc); //dc.FillSolidRect(&rc,RGB(50,50,50)); dc.Draw3dRect(rc.left+2, rc.top+5, rc.Width()+1, rc.Height()-3, RGB(255, 255, 0), RGB(255, 255, 0)); dc.Draw3dRect(rc.left+1, rc.top+4, rc.Width(), rc.Height()-4, RGB(255, 255, 0), RGB(255, 255, 0));
hi thanks to replay its create rectangle successfully .and how to display system time inside this rectangle box
-
hi thanks to replay its create rectangle successfully .and how to display system time inside this rectangle box
you have a pointer for the window. Use GetSystemTime/GetLocalTime to get the time and then CString::Format function to get it in the desired format, after this you can use SetWindowText
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
you have a pointer for the window. Use GetSystemTime/GetLocalTime to get the time and then CString::Format function to get it in the desired format, after this you can use SetWindowText
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
can u plz write the code snippet for that problem
-
can u plz write the code snippet for that problem
I am new to the coding world and in need of money desperately... :-O
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
can u plz write the code snippet for that problem
SYSTEMTIME st; GetLocalTime(&st); now in st all values of date time Use CString Format function to convert in stinrg