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
B

Bravoone_2006

@Bravoone_2006
About
Posts
245
Topics
85
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Print Preview problem
    B Bravoone_2006

    How can i do print preview for this : ((i have a CButton OnPrint(IDC_PRINT))CDialog Base aplication) void CMyPrintDlg::OnPrint(CDC* pDC, CPrintInfo* pInfo) { CPrintDialog dlgPrint(FALSE,PD_ALLPAGES,this); if (dlgPrint.DoModal()==IDOK) { // ** Attach the printer DC from the dialog // ** to a CDC object CDC dcPrint; dcPrint.Attach(dlgPrint.GetPrinterDC()); // ** Create and fill a DOCINFO structure DOCINFO myPrintJob; myPrintJob.cbSize = sizeof(myPrintJob); myPrintJob.lpszDocName = "printing..."; myPrintJob.lpszOutput = NULL; myPrintJob.lpszDatatype = NULL; myPrintJob.fwType = NULL; // ** Start the printing document if (dcPrint.StartDoc(&myPrintJob)>=0) { // ** Start a page dcPrint.StartPage(); CString sText; sText = "this :"; CString sText1; sText1 = "How ?"; //////////////////////////////////////////////////////////////////////////////////////// dcPrint.TextOut(2000,350,sText); dcPrint.TextOut(300,500,sText1) // ** Throw the page dcPrint.EndPage(); // ** Close the document dcPrint.EndDoc(); } dcPrint.DeleteDC(); } } Please help me !

    Bravoone

    C / C++ / MFC help question

  • CDialog
    B Bravoone_2006

    I have a CDialog base aplication and a dialog CFormView base in the same project from CDialog i want to start CFormView HOW ?

    Bravoone

    C / C++ / MFC question

  • CDialog
    B Bravoone_2006

    I have a CDialog base aplication and a button and i want to start (DoModal) but is not working for CFormView !? How can i start a CFormView ??from a CButton !

    Bravoone

    C / C++ / MFC question

  • print preview
    B Bravoone_2006

    i need some help over here please !

    Bravoone

    C / C++ / MFC

  • print preview
    B Bravoone_2006

    I dont have any solution for my problem please help me !if you can !

    Bravoone

    C / C++ / MFC

  • print preview
    B Bravoone_2006

    you see my code? i need print preview for this HOW?help me!

    Bravoone

    C / C++ / MFC

  • print preview
    B Bravoone_2006

    what is m_image ?! what control ?!

    Bravoone

    C / C++ / MFC

  • print preview
    B Bravoone_2006

    No i need something more easy...is to hard for me !you see my code for print ?! i need something like that ...easy not so complicate !can you help me ?!

    Bravoone

    C / C++ / MFC

  • print preview
    B Bravoone_2006

    i have a CDialog ,1 button for print i have a print but i need a button for print preview !How i have read all codeproject stuf but nothing ... this is my code for print : CPrintDialog dlgPrint(FALSE,PD_ALLPAGES,this); if (dlgPrint.DoModal()==IDOK) { // ** Attach the printer DC from the dialog // ** to a CDC object CDC dcPrint; dcPrint.Attach(dlgPrint.GetPrinterDC()); // ** Create and fill a DOCINFO structure DOCINFO myPrintJob; myPrintJob.cbSize = sizeof(myPrintJob); myPrintJob.lpszDocName = "MyPrintJob"; myPrintJob.lpszOutput = NULL; myPrintJob.lpszDatatype = NULL; myPrintJob.fwType = NULL; // ** Start the printing document if (dcPrint.StartDoc(&myPrintJob)>=0) { // ** Start a page dcPrint.StartPage(); CString sQuestion; m_question.GetWindowText(sQuestion); CString sText; sText = "Command"; CString sText1; sText1 = "Display :"; //////////////////////////////////////////////////////////////////////////////////////// dcPrint.TextOut(2000,350,sText); dcPrint.TextOut(300,500,sText1); // ** Throw the page dcPrint.EndPage(); // ** Close the document dcPrint.EndDoc(); } // ** Delete the printer device context dcPrint.DeleteDC(); }

    Bravoone

    C / C++ / MFC

  • CString::Format
    B Bravoone_2006

    ok but... : uSum += atof( csText); warning C4244: '+=' : conversion from 'double' to 'int', possible loss of data Why?

    Bravoone

    C / C++ / MFC question

  • CString::Format
    B Bravoone_2006

    How can i do that ? lets say in list i have 44.22+44.22 the result must be in csText 88.44 HOW can i do that? int nSum = 0; int uSum = 0; for( int nRow = 0; nRow < m_list1.GetItemCount();nRow++) { if(m_list1.GetCheck(/*index of item*/nRow)) { csText = m_list1.GetItemText( nRow, 2 ); uSum += atoi( csText); csText.Format("%.2f",uSum); m_sum.SetWindowText(csText); } } this code give the result : lets say i have in list 44.22+44.22 the result in csText is 88.00 but i need 88.44 HOW ?

    Bravoone

    C / C++ / MFC question

  • CString::Format
    B Bravoone_2006

    csText.Format("%.2f", nSum); is not working why? i have read documentation but is not working !any why ?

    Bravoone

    C / C++ / MFC question

  • CString::Format
    B Bravoone_2006

    "%g" is not working !How can i do that ?

    Bravoone

    C / C++ / MFC question

  • CString::Format
    B Bravoone_2006

    ok,but i need 2 digits 44.66 lets say... then what ?

    Bravoone

    C / C++ / MFC question

  • CString::Format
    B Bravoone_2006

    How can i make this : i have this code : csText.Format("%d", nSum); ok but my result is lets say 44,ok but if i have 22.3+22.3=44.6(nSum) this is not working : csText.Format("%d", nSum); How can i make this?(to have the result whit 44.6 lets say not 44)

    Bravoone

    C / C++ / MFC question

  • Again CListCtrl
    B Bravoone_2006

    THANKS GUYS ! EVERYTING IS OK ! THANKS !

    Bravoone

    C / C++ / MFC question

  • Again CListCtrl
    B Bravoone_2006

    ok but : error C2065: 'nColumn' : undeclared identifier its not right !something is wrong ! what ?

    Bravoone

    C / C++ / MFC question

  • Again CListCtrl
    B Bravoone_2006

    OK, but it works for col 2 but I WANT to select witch rows to sum HOW? i have try this but it sum all rows in column 2! : CString csText; for(int i=0; iBravoone

    C / C++ / MFC question

  • Again CListCtrl
    B Bravoone_2006

    How can i Sum Rows in column 3 i have selected ? ok,this code sum all rows in all columns : int nSum = 0; for( int nRow = 0; nRow < m_list1.GetItemCount();nRow++) { for( int nColumn = 0; nColumn < 3;nColumn++) { csText = m_list1.GetItemText(nRow ,nColumn ); nSum += atoi( csText); } } csText.Format("%d", nSum); m_sum.SetWindowText(csText); I have added Checkboxes to CListCtrl to select witch rows to Sum,ALL I WANT IS TO SUM ROWS IN COLUMN 3 THAT I HAVE SELECTED !!! HOW ?

    Bravoone

    C / C++ / MFC question

  • Again ,again CListCtrl !
    B Bravoone_2006

    ok,sorry

    Bravoone

    C / C++ / MFC question
  • Login

  • Don't have an account? Register

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