Click here to Skip to main content
15,922,696 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to change mouse cursor when move mouse pass the button? Pin
Comp-devz4-Dec-99 21:02
sussComp-devz4-Dec-99 21:02 
AnswerRE: How to change mouse cursor when move mouse pass the button? Pin
Jeremy Davis6-Dec-99 2:43
Jeremy Davis6-Dec-99 2:43 
AnswerRE: How to change mouse cursor when move mouse pass the button? Pin
Gary Menzel8-Dec-99 12:42
Gary Menzel8-Dec-99 12:42 
GeneralQuestion about dll Pin
Roy Xu3-Dec-99 17:13
Roy Xu3-Dec-99 17:13 
GeneralRE: Question about dll Pin
Alex Gorev6-Dec-99 7:10
Alex Gorev6-Dec-99 7:10 
QuestionHow to make StatusBar tooltips? Pin
Stefan3-Dec-99 8:21
Stefan3-Dec-99 8:21 
AnswerRE: How to make StatusBar tooltips? Pin
Member 3646-Dec-99 6:47
Member 3646-Dec-99 6:47 
AnswerRE: How to make StatusBar tooltips? Pin
ac2718-Dec-99 4:07
sussac2718-Dec-99 4:07 
Generalwildcard matching with strings Pin
Thomas2-Dec-99 6:34
Thomas2-Dec-99 6:34 
GeneralRE: wildcard matching with strings Pin
Alex Gorev2-Dec-99 8:35
Alex Gorev2-Dec-99 8:35 
GeneralRE: RE: wildcard matching with strings Pin
Thomas3-Dec-99 0:19
Thomas3-Dec-99 0:19 
GeneralRE: RE: RE: wildcard matching with strings Pin
Alex Gorev3-Dec-99 3:31
Alex Gorev3-Dec-99 3:31 
GeneralRE: RE: RE: wildcard matching with strings Pin
Serguei Velikevitch3-Dec-99 4:07
sussSerguei Velikevitch3-Dec-99 4:07 
GeneralRE: wildcard matching with strings Pin
Member 4043-Dec-99 4:48
Member 4043-Dec-99 4:48 
GeneralRE: wildcard matching with strings Pin
Thomas3-Dec-99 12:32
Thomas3-Dec-99 12:32 
Generalmoving caret in CEditView Pin
hhuynh011-Dec-99 10:27
hhuynh011-Dec-99 10:27 
GeneralRE: moving caret in CEditView Pin
rkm1-Dec-99 14:31
rkm1-Dec-99 14:31 
GeneralRE: moving caret in CEditView Pin
Dean Edmonds8-Dec-99 13:53
sussDean Edmonds8-Dec-99 13:53 
QuestionMemory Leak ??? Pin
Anonymous1-Dec-99 5:42
suss Anonymous1-Dec-99 5:42 
AnswerRE: Memory Leak ??? Pin
John M. Drescher5-Dec-99 4:51
John M. Drescher5-Dec-99 4:51 
Generalnetwork monitor 2.0 SDK Pin
Anonymous1-Dec-99 4:20
suss Anonymous1-Dec-99 4:20 
GeneralDB grid control problem Pin
shahzad30-Nov-99 5:30
shahzad30-Nov-99 5:30 
QuestionWhat do I get back from OLEFormatPtr::GetObject() ? Pin
postgress@hotmail.com30-Nov-99 3:47
susspostgress@hotmail.com30-Nov-99 3:47 
Hi,

The following code snippit, produces an embeded excel object. My question is how do I manipulate it?


#import "C:\Program Files\Microsoft Office\Office\EXCEL9.OLB" rename ("DialogBox", "DialogBoxXL") rename("RGB", "RBGXL") rename ("DocumentProperties", "DocumentPropertiesXL") no_dual_interfaces//, raw_native_types


snip.....




WORDLib::_ApplicationPtr pWrd = m_pParentApp;
pWrd->Visible = VARIANT_TRUE;

WORDLib::_DocumentPtr pDoc = pWrd->ActiveDocument;
COleVariant vClassType = "Excel.Sheet";

WORDLib::InlineShapePtr pShp = pDoc->InlineShapes-
>AddOLEObject ( vClassType );
WORDLib::OLEFormatPtr pFmt = pShp->OLEFormat;

_bstr_t bTyp = pFmt->ClassType;

/*
** pFmt->ClassType == "Excel.Sheet.8"
**
** pFmt->Object returns an IDispatch -- but to what ????
*/

Excel::_WorksheetPtr pSheetptr = pFmt->GetObject(); // pFmt-
>Object;


pSheetptr->Range["A1"]->Font->Bold = VARIANT_TRUE; // This fails with Code = 80020003 ( Member not found. )

The functions do exist.

If I do this by creating an excel app ptr, then get active worksheet()

I can then call these functions to manipluate the work sheet.

What I suspect is the GetObject is returning something that can be used to get the app ptr or wrksheet ptr.

Regards


Ian G




/*
Object Property
Returns the object that represents the specified OLE
object's top-level interface.
This property allows you to access the properties and
methods of the application in
which an OLE object was created. Read-only.

Remarks
Use the TypeName function to determine the type of
object this property returns for a
specific OLE object.

Object Property Example
This example displays the type of object contained in
shape one on slide one in the
active presentation. Shape one must contain an OLE
object.

MsgBox TypeName(ActivePresentation.Slides(1) _
.Shapes(1).OLEFormat.Object)

This example displays the name of the application in
which each embedded OLE object
on slide one in the active presentation was created.

For Each s In ActivePresentation.Slides(1).Shapes
If s.Type = msoEmbeddedOLEObject Then
MsgBox
s.OLEFormat.Object.Application.Name
End If
Next

This example adds text to cell A1 on worksheet one in
the Microsoft Excel workbook
contained in shape three on slide one in the active
presentation.

With ActivePresentation.Slides(1).Shapes(3)
.OLEFormat.Object.Worksheets(1).Range
("A1").Value = "New text"



This would indicate that its of type Excel application ?

*/

GeneralBeginer ques on programmng practice Pin
Anonymous30-Nov-99 3:31
suss Anonymous30-Nov-99 3:31 
GeneralRE: Beginer ques on programmng practice Pin
Jesse Ezell14-Dec-99 14:56
Jesse Ezell14-Dec-99 14:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.