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
M

Mardigin

@Mardigin
About
Posts
17
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MFC SeriesCollection question
    M Mardigin

    Disregard, I just solved this problem. Silly me. Here is the solution if anyone is interested. xlSeries = this->m_xlChart->SeriesCollection(COleVariant((short)1)); VARIANT vResult; // A Struct with a pdispVal member VARTYPE vType; DISPID dispID; // Temporary DISPID unsigned short *ucPtr; // Temporary name holder ucPtr = L"XValues"; HRESULT hr = xlSeries.m_lpDispatch->GetIDsOfNames( IID_NULL, &ucPtr, 1, ACCESS_PROPERTY_GUID, &dispID ); //CString result; CString lpszNewValue= "={""Label1"",""Label2""}"; if(hr == S_OK) { xlSeries.SetXValues(COleVariant(lpszNewValue)); } Sincerely, Mardigin

    C / C++ / MFC question c++

  • MFC SeriesCollection question
    M Mardigin

    How do I write ActiveChart.SeriesCollection(1).XValues = "={""Date 08102003"","" Date 08102003""}" in MFC? Here is my code for the chartwiz.. this->m_xlChart->ChartWizard(var, // Source. COleVariant((short)3), // Gallery: 2d Column. COleVariant((short)2), // Format. COleVariant((short)2), // PlotBy xlColumns. COleVariant((short)0), // CategoryLabels. COleVariant((short)1), // SeriesLabels. COleVariant((short)TRUE), // HasLegend. COleVariant("MyChart"), // Title. COleVariant("Date"), // CategoryTitle. COleVariant("UNITS"), // ValueTitles. covOptional ); Basically I want to change Category (X) axis labels to something other then 1, 2, 3... etc. Sincerely, Mardigin

    C / C++ / MFC question c++

  • COleDocObjectItem::OnPrint(this, pInfo, TRUE) ?
    M Mardigin

    Okay I was able to get the hdc in the following manner void CBPReportView::OnPrint(CDC* pDC, CPrintInfo* pInfo) { // TODO: add customized printing code here if(pInfo->m_bDocObject) { CDC * pOleDC = this->GetDC(); pDC->Attach(pOleDC->m_hDC); pDC->TextOut(100,100,"Muah ha ha h aa"); COleDocObjectItem::OnPrint(this, pInfo, TRUE); ReleaseDC(pOleDC); } else CView::OnPrint(pDC, pInfo); } Only trouble is that "muah ha ha h aa" never shows up on my printed page, only the excel spreadsheet shows up. Any ideas? Mardigin

    ATL / WTL / STL question

  • COleDocObjectItem::OnPrint(this, pInfo, TRUE) ?
    M Mardigin

    I have embed excel into my application and would like to overide my onprint function. Upon entry into this function pDC->m_hAttribDC; pDC->m_hDC; Are both NULL. the CDC* pDC however is not. If I try calling onPrint before an excel spreadsheet is open, then neither member is NULL. Only when I have an excel spreadsheet open are these members NULL. Why is this so? Sincerely, Mardigin

    ATL / WTL / STL question

  • EXCEL and MFC
    M Mardigin

    I am having the same problem. Augh. If you find any good documentation please let me know. Mardigin

    COM c++ com testing tools

  • How To Embed Excel and Remove Menu
    M Mardigin

    The following is a snippet is the code that actually embeds excel into my application and then attempts to remove the insert menuitem. I have read through more then one tutorial, but the most important one to note here is the following: http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q180/6/25.asp&NoWebContent=1 If anyone has anyideas of what is wrong with this code please reply. Note: The above tutorial instructs to create a dlg based application, Mine is an MDI application. The above tutorial controls excel, my application embeds and then attempts to control excel. It works fine right up until it calles cbPop.SetVisible(FALSE); Then it falls into the catch: CException e.m_bAutoDelete = 1 CException e.m_bReadyForDelete = 0 The code I have included here shows how I embed excel and display it on the screen. This is all that i do differently from the above tutorial. CBPReportCntrItem *pItem = NULL; CBPReportDoc *pDoc = NULL; CLSID clsid; TRY { //Get the document associated with this view, and be sure it's //valid. pDoc = GetDocument(); ASSERT_VALID(pDoc); //Create a new item associated with this document, and be sure //it's valid. pItem = new CBPReportCntrItem(pDoc); ASSERT_VALID(pItem); // Get Class ID for Excel sheet. // This is used in creation. if(FAILED(::CLSIDFromProgID(L"Excel.sheet",&clsid))) { AfxMessageBox("Failed to create Excel.sheet"); //Any exception will do. We just need to break out of the //TRY statement. AfxThrowMemoryException(); } // Create the Excel embedded item. if(!pItem->CreateNewItem(clsid)) { AfxMessageBox("Failed to create the excel embeded item"); //Any exception will do. We just need to break out of the //TRY statement. AfxThrowMemoryException(); } //Make sure the new CContainerItem is valid. ASSERT_VALID(pItem); // Launch the server to edit the item. pItem->DoVerb(OLEIVERB_SHOW, this); // As an arbitrary user interface design, this sets the // selection to the last item inserted. m_pSelection = pItem; // set selection to last inserted item pDoc->UpdateAllViews(NULL); //Query for the dispatch pointer for the embedded object. In //this case, this is the Excel worksheet. lpDisp = pItem->GetIDispatch(); app.AttachDispatch(lpDisp, TRUE);

    ATL / WTL / STL design tutorial question database com

  • Embed and Automate a Microsoft Excel Worksheet with MFC
    M Mardigin

    I was able to remove the formula bar and the Grid headings with the following code. app.SetDisplayFormulaBar(FALSE); Window win = app.GetActiveWindow(); win.SetDisplayHeadings(FALSE); I still want to remove the "Formatting Toolbar" and all of the menus associated with Excel. Anyideas. Classes of interest are --> Menu, MenuBar, MenuBars, MenuItem, MenuItems, Menus, Toolbar, ToolbarButton, ToolbarButtons, Toolbars Sincerely, Mardigin

    ATL / WTL / STL com c++ tutorial question

  • Changing Text
    M Mardigin

    I would like to change Text on a webpage on the fly. I know about the innerText property for ie. I cann't use this however becuase I am not using ie. Or netscape for that matter. I need a way that is very browser nonspecific. Is there anyway to do this using javascript or JSP. I want to be able to change the text on the screen without reloading the page. Thank you. Mardigin.

    Web Development java javascript

  • Embed and Automate a Microsoft Excel Worksheet with MFC
    M Mardigin

    I followed the tutorial at the following address... http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q184/6/63.asp&NoWebContent=1 It works great! But I would prefer if the excel menu did not merge with my apps menue. Is there anyway to keep the user from seeing and using the excel menu and tool bars? In truth what I would prefer to do would be to embed the excel worksheet or spreadsheet into a dialog box like you can with office xp by using the Microsoft Office Spreadsheet 9.0 activeX Control. Does anyone know if this is possible using office 97? I was able to do it in VB, but not in MFC. Thank you very much. Mardigin

    ATL / WTL / STL com c++ tutorial question

  • design-time license???
    M Mardigin

    Okay, I used the license key requestor to try and discover the license key for mschart.ocx This app can be downloaded at http://support.microsoft.com/default.aspx?scid=kb;en-us;Q151771 However it says that mschart.ocx does not have a license. This is basically what I wish to do. I wish to embed an excel spreadsheet and chart into an application build using MFC. I wish my users to only require office 97 at best installed. Is this a possability? Are there ActiveX controls compatible for excel97 spreadsheet and chart? Mardigin

    C / C++ / MFC help question com design

  • design-time license???
    M Mardigin

    Oops The link I meant to paste is: http://www.codeproject.com/useritems/MSFlexGrid\_In\_Cop\_Ctrl.asp Sorry about that. Mardigin

    C / C++ / MFC help question com design

  • design-time license???
    M Mardigin

    Could someone please explain to me how design-time license works. I have been doing a lot of research on the net regarding this, but am not satisfied with what I have found. There is an article on this website that talks about it briefly. http://www.codeproject.com/useritems/msflexgrid\_in\_cop\_ctrl.asp?target=design|time|runtime|license#xx460936xx Only this article the guy registers a license for his control in the code itself, but where did he get the license key? I would like to use mschart.ocx, but when I try to instantiate it in the code it says that I require a design-time license. Now currently I have office97 on my machine and so I did not have mschart.ocx. I downloaded it off the net and stuck it my my system32 directory and registered the ocx. Here is a question, lets say that at somepoint I do get the so called design-time license for mschart.ocx. Will I be able to use it since I am only running office97? or do I require office xp installed on my macine in order to use it? As you can see there is a lot I don't know. PLease help enlighten me. Thank you. Sincerely, Mardigin

    C / C++ / MFC help question com design

  • MS Office 97 ActiveX Control?
    M Mardigin

    There does not seem to be an ActiveX Control for MS Excel from office 97. Is this true? If so is there anyway of writing an app that uses an ActiveX Control for Excel from a later version of office, but that will still be compatible with office 97? Sincerely, Mardigin

    C / C++ / MFC com question announcement

  • ActiveX Excel?
    M Mardigin

    Thank you for your reply. I actually setup a windows 98 box without anything installed on it and wrote a quick little utility that had excel embeded into it. You are absolutely correct, when I try to execute it on the windows 98 box absolutely nothing happens. Thanks again for the feedback. Mardigin

    ATL / WTL / STL com question

  • ActiveX Excel?
    M Mardigin

    If I write an application that uses an ActiveX Control to embed a component from another application, does that application have to be installed on the computer that will be running my application for it to work. For instance if I embed an excel spreadsheet or chart into my application and then I install my application on a friends computer must he have Excel installed? Sincerely, Mardigin

    ATL / WTL / STL com question

  • Inserting ActiveX Control
    M Mardigin

    I am not entirely sure what the problem was here, but I rebuild the project and it works fine now. Hmm.. I think that I may not have build the correct type of project the first time around. At first I build a Win32 Application, the second time I used the MFC App Wizard. I realize now that the AtiveX Controls must be part of MFC and that explains Why I could not add them to my project. Thank you for your reply Mardigin

    C / C++ / MFC com help question learning

  • Inserting ActiveX Control
    M Mardigin

    I am trying to insert an ActiveX Control using the resource manager. As a quick test I have tried inserting it into the "help" dialog box from a simple hello world app. Once it is inserted however the dialog box will not appear when I select help from the menue. I added an item to the menue to open my own dialog box and the same thing happens, the dialog box just does not appear. It will appear again if I remove the activeX control from the dialog via the resource editor. Does anyone know what I am doing wrong? Thank you for any comments. Mardigin :confused:

    C / C++ / MFC com help question learning
  • Login

  • Don't have an account? Register

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