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

Barm

@Barm
About
Posts
28
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Extracing data from word document to notepad or edit box
    B Barm

    I suggest you use MS Word automation to extract the content of the doc file before writing the information to an edit box or notepad. http://msdn.microsoft.com/office/understanding/word/default.aspx[^] Thomas

    C / C++ / MFC question c++ help

  • how can i connect MsAccess
    B Barm

    Hi use CDatabase .Open() to open database .ExecuteNonQuery() to execute insert, update, delete statements use CRecordset to execute select statements Hope this helps Thomas

    C / C++ / MFC question csharp c++ database help

  • "Got Focus" on a tab page
    B Barm

    Hi I have done something like that before... the information on the previous tab needs to be save when another tab is selected.. this is what i have done... 1. Create a variable to store the selected tab... 2. Use OnClickTab to find out which is the newly selected tab... 3. Check if different from last selected tab - if true... prompt save and save previous tab... 4. Refresh the information on the new tab... 5. Save new tab selection to variable I hope this helps... Thomas

    C / C++ / MFC question

  • Datagrid row colouring
    B Barm

    I have the following inside one of my programs. where I have alternate colours for the datagrid rows. I donno if this would help, hope it does. if(i%2 == 0) { DataGrid1.Items[i].ForeColor = System.Drawing.Color.Black; DataGrid1.Items[i].BackColor = System.Drawing.Color.LightBlue; } else { DataGrid1.Items[i].ForeColor = System.Drawing.Color.Black; DataGrid1.Items[i].BackColor = System.Drawing.Color.LightSteelBlue; } Thomas

    C# database tutorial

  • Reading Excel files in VC
    B Barm

    use Excel automation CApplication app; CRange range; CWorkbook book; CWorkbooks books; CWorksheet sheet; CWorksheets sheets; VARIANT ret; COleVariant covTrue((short)TRUE),covFalse((short)FALSE),covOptional((long)DISP_E_PARAMNOTFOUND,VT_ERROR); try { CoInitialize(NULL); if(!app.CreateDispatch("Excel.Application")) { AfxMessageBox("Cannot start Excel"); return; } books = app.get_Workbooks(); book = books.Open(fname,covOptional,covOptional,covOptional,covOptional ,covOptional,covOptional,covOptional,covOptional ,covOptional,covOptional,covOptional,covOptional ,covOptional,covOptional); // different for different ver of Excel // check msdn website sheets = book.get_Worksheets(); sheet = sheets.get_Item(COleVariant((short)1)); sprintf(cell,"%c%d",alpha[k],j); // eg A1, A2, etc range = sheet.get_Range(COleVariant(cell),COleVariant(cell)); ret = range.get_Value2(); CString t = ret.bstrVal; // t will hold the value of the cell books.Close(); app.Quit(); // close excel application remember to close application } catch(COleException *e) { char buf[1024]; sprintf(buf, "COleException %081x.", (long)e->m_sc); } catch(COleDispatchException *e) { char buf[1024]; sprintf(buf, "COleDispatchException %081x.", (long)e->m_wCode); } catch(...) { char buf[1024]; sprintf(buf, "General Exception"); } hope tis helps Thomas

    C / C++ / MFC tutorial

  • Creating outlook template
    B Barm

    Edbert P. wrote: If you're also using Exchange Server you might be able to store the data in Exchange (e.g. bind the value to the particulare e-mail address). hi thanks... but just need to ask... how do you bind the data to exchange end extract it to your desired position (i'm totally clueless regarding exchange) eg of mail template Ref: (Running number) 20/09/2005 content...... ............. Regards XXX how to make sure that the number appears at the correct spot. Thomas

    Visual Basic beta-testing question code-review

  • Creating outlook template
    B Barm

    Hi all I have a client recently who wants to create a template for outloof with a reference number (auto-increment) whenever he sends out mail to a particular person. From outlook one can create a template but not the auto number. Anyone have any idea on using VB or any other languages to construct this auto running number template? I have not use VB before but understand from feedback that programming for outlook using VB is the simplest. Thanks in advance. Thomas

    Visual Basic beta-testing question code-review

  • CTabCtrl help
    B Barm

    Hi I have a problem re tab control. I use onClick to detect a user selection but onClick gives me the last tab and not the selected tab. I have tried using TCN_SELCHANGE but this one does not reflect any changes. I have actually used this method with vc6 and it works. But its not working on the VS2003. UpdateData(TRUE); ctab = m_tab.GetCurSel(); // ctab is to display the selected tab id // refreshing of the appropriate tab details is done here switch(ctab) { case 0://refesh tab 0 break; case 1;// refresh tab 1 break;// ...etc } UpdateData(FALSE); anyone know what might be the problem? Thanks. Thomas

    C / C++ / MFC help question

  • vb to c++
    B Barm

    hi all I have an application that creates a ms word document. I need to include the page number. I have posted a similar question last week but this one is more to the point. I have done my research and according to msdn, the function to use is expression.Add(PageNumberAlignment, FirstPage) WdPageNumberAlignment constants: wdAlignPageNumberCenter, wdAlignPageNumberInside, wdAlignPageNumberLeft, wdAlignPageNumberOutside, or wdAlignPageNumberRight I have no problem calling out the header and footer pop up... navigating between header and footer but I am still unable to add the page number. The above function uses the vb constants. Anyone know the c++ equivalent for these? I tried using it in C++ but its a undeclared identifier. Thanks in advance. Thomas

    C / C++ / MFC question c++ help

  • Adding page number to word doc
    B Barm

    Hi anyone have any idea on how to insert page number into ms word doc. I have an application that creates a report, now I need to include the page number as well. I tried HeaderFooter class and PageNumbers class but ends up with illegal operation msg. Anyone have any idea? :confused: Thanks in advance. :) Thomas

    C / C++ / MFC tutorial question

  • Change Font of caption of dialog box ??
    B Barm

    u could try the following CFont font; font.CreateFont(0,0,0,0,FW_NORMAL,FALSE,FALSE,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH | FF_SWISS,"MS Shell Dlg"); ((CEdit*)GetDlgItem(IDC_EDIT1))->SetFont(&font); this will change the font in that particular edit box

    C / C++ / MFC c++ tutorial question

  • OLAP examples(vc++)
    B Barm

    you might want to try this[^] site... its all abt msolap

    C / C++ / MFC c++ tutorial

  • Password Policy
    B Barm

    tks a lot... don't think I'm able to do it though... guess I'll have to talk to the client again... maybe other alternatives...

    .NET (Core and Framework) tutorial sales question

  • What can I do if I want the CEdit box only receive the numbers?
    B Barm

    set the property of your editbox Number - True

    C / C++ / MFC question

  • SHUTDOWN
    B Barm

    maybe you can use myProcess.CloseMainWindow(); but this only works with application with user interface. It behaves the same as selectign close from the application interface. There will be a user prompt for any unsaved data. but for applications without user interface, you will need to use myProcess.Kill() hope this helps

    C# csharp visual-studio help

  • "Time bomb" (trial version-like)
    B Barm

    Hi... just a small suggestion... maybe you can build your application to do a date check upon every execution... as long as there is a difference between this captured date and the saved date... increase your counter by the difference (x) ... take it as the application has been running for x numbers of days... then save this new date... thus even if i were to set the date back 1 week... the program will acknowledge this as the program being used for 1 week... thus when the counter reaches, say 30... the trial period will end... make sure to encrypt the counter value... there is a way to tamper though... that would be for the user to set the date to the same as the first launch date everytime before starting the program... or they found a way to tamper with your counter value... just a suggestion... :)

    C# question announcement sales collaboration

  • SHUTDOWN
    B Barm

    you can try using kill() to kill the processes you can try searching msdn for "C# kill process"

    C# csharp visual-studio help

  • How can I shutdown my computer in my VC++ program?
    B Barm

    refer to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/shutting_down.asp[^]

    C / C++ / MFC question c++

  • Error
    B Barm

    check your declaration in the .h file most probably you have a different declaration there. void CTCPTestDlg::OnBtnstart(LPVOID lParam) in .cpp afx_msg void OnBtnstart(LPVOID lParam) in .h (if function is auto-generated) void OnBtnstart(LPVOID lParam) in .h (if function is manually generated)

    C / C++ / MFC help tutorial

  • Password Policy
    B Barm

    Hi all I have a customer who wants to implement all the password policy available. According to microsoft password policy settings, there's only enable or disable. :confused: - English uppercase characters (A through Z) - English lowercase characters (a through z) - Base 10 digits (0 through 9) - Non-alphabetic characters (for example, !, $, #, %) Is there a guide I can refer to to create a bypass so as to build in all 4 policy settings? :~ Thanks in advance. Thomas

    .NET (Core and Framework) tutorial sales 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