|
Use the excel application inteface methods to perform the same actions as those on the menu.
e.g.
Implement Save on the File menu with
OnFileSave()
{
pWorkbook->Save();
}
where pWorkbook is a pointer to the workbook interface.
|
|
|
|
|
Thanks for the reply... I appreciate it although I expected
slightly different answer. If you open the MICROSOFT EXCEL
program, you can see the menu bar (File,Edit, View, Insert and so
on..)I want to have those specific menu clicked on my application.
You were talking about submenus. Any idea?
|
|
|
|
|
Sorry, I misunderstood you. Thought you wanted to go the other way. I don't think you can do what you're asking about.
|
|
|
|
|
Any Menu or Submenu is linked with Macros.
You need to use
Workspece-><macroname><code><br />
For example<br />
<pre>
hr = IWorkspace->SaveAs();
</pre><br />
<br />
Best Regards.... <br />
<br />
Carlos Antollini.<br />
<a href="http://www.sonork.com/">Sonork</a> ID 100.10529 cantollini
|
|
|
|
|
Hi there,
I have read bits and pieces of at least half a dozen C/C++ related books...anything from Deittel &Deittel, Jeff Prosise's MFC book, Charles Petzold's Win32 book, and books top 50 tips for C++ and others...However, I like to get a better understanding of C++ compilers/linkers and how they deal with stuff...for instance, why do you have set various options in Visual C++ in order to accomplish certain things and others...so, essentially something deep and hopefully platform independent...any suggestions?
|
|
|
|
|
Further to my post, just to clarify a bit..for instance, I want to see how a compiler deals with a case of forward declaration as opposed to header inclusion, or a case of dynamic_cast when the /Gy option is set in Visual C++ for instance or in other C compilers with their respective options and or even stuff like how a function declaration is defined in memory...
|
|
|
|
|
|
I'm tired and I don't know if i'm reading right, but it sounds like you want to know why VC++ works the way it does and C++ at the same time. Yet you also say you would like platform independance...???
That kind of book I am not aware of...Usually they cater to one or the other, but not both...that'd be a pretty big book.
Anyways...if you want an excellent book, "Thinking in C++ by Bruce"....shite I can't remember his name...but if you search around on google his second edition is availble online.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
It's Bruce Eckel. However, Bruce's book are plain vanilla C++ and Java and are more about how to propertly design and code applications using a given language. Therefore, unless I'm misunderstanding the original poster's query it's not what he's asking for, which is a book about a specific compiler.
Cheers,
Tom Archer
Author, Inside C#
|
|
|
|
|
Tom Archer wrote:
It's Bruce Eckel.
Thats it...couldn't remember his last name and i'm too lazy to dig through all my books to find just his full name.
Tom Archer wrote:
However, Bruce's book are plain vanilla C++ and Java
I have a hard copy of the first version and don't recall anything Java...is it really in there? I've only breifly glanced over the 2nd version, cuz most of it was a repeat of the first.
The impression I got from the original post was not clear...I didn't quite understand...basically I thought he was looking for a good platform independent type book. Bruce's book covers draft ANSI/ISO C++ which I thought was pretty platform independant. Plus IMO his book is the best i've ever read concerning C++.
In anycase the original post IMO wasn't very clear so I answered in a way I thought acceptable.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
>>>
I have a hard copy of the first version and don't recall anything Java...is it really in there? I've only breifly glanced over the 2nd version, cuz most of it was a repeat of the first.
<<<
He also wrote 'Thinking in Java'
>>>
The impression I got from the original post was not clear...
<<<
I could be wrong on the "specific to VC++" bit. However, I know that Bruce doesn't get into compiler options, which was one of the things the original poster was curious about.
>>>
In anycase the original post IMO wasn't very clear so I answered in a way I thought acceptable.
<<<
No problem. Heck, I could be the one misinterpreting the whole thing Wouldn't be the first time
Cheers,
Tom Archer
Author, Inside C#
|
|
|
|
|
Unfortunately I don't believe such a book exists. I think the closes thing you're going to get is are books that focus on illustrating how to write compilers. However, this is probably overkill for what you're looking for.
Cheers,
Tom Archer
Author, Inside C#
|
|
|
|
|
Has anyone come across code for a file/folder selector dialog?
I want to mimic the standard file open dialog, but want to also allow the user to end the dialog by simply selecting a folder. If I came across a tree combo box that displayed the shell's folder hierarchy, I'd craft the dialog myself. Imho, the hard part is implementing the tree combo.
Thanks,
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I normally don't like giving codeguru links but there are a bunch on codeguru on of them :-
http://www.codeguru.com/dialog/DirDialogPhillips.shtml
|
|
|
|
|
Thanks Rama! The sample was extremely close to what I wanted. Here's a link (an article by none other than good old PJL) that implements it completely:
http://msdn.microsoft.com/msdnmag/issues/02/01/c/c0201.asp
Thanks again!
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
Ravi,
I seriously think it's time to change your sig.
It's been here in its static I-won't-change manner for too long.
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
My good fellow, that .sig has been with me since 1987! How can I change it now?
<aside>
My car is 11 years old, my VCR is 17, and my speakers are 20. All the furniture in my house is 16+ years old. That being said, everything is of high quality, in mint condition and works flawlessly. The only thing that changes is my PC.
</aside>
Note to prospective geekette life partner:
Candidate is resistant to change (also see "obstinate", "pertinacious" and "mulish") and should only be experienced in small doses.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
|
Colin Davies wrote:
You realise that sig is older than some CPians now !
Frightening thought, wot?
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
|
Thanks Mike, I overlooked that! Unfortunately, the selection dialog I have to implement requires the functionality of the standard file open dialog (back, up, create new folder, etc.), so I think I'm going to go the PJL way.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Been reading up on doing a win32 skin, and I can do it great in a standard win32 app. But now I try to do it in an MFC doc/view app and it doesn't quite work the same. I have a bitmap in my resource file, and I create a CBitmap from it. I can BitBlt it from the OnDraw function, but it will only draw in the view area... Not the whole app. How can I get it to draw over the entire application? Here is my current code that I'm using:
void CSkinTestView::OnDraw(CDC* pDC)
{
CSkinTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CDC memdc;
memdc.CreateCompatibleDC(pDC);
memdc.SelectObject((HBITMAP)m_Skin);
pDC->BitBlt(0, 0, 200, 75, &memdc, 0, 0, SRCCOPY);
}
m_Skin is a CBitmap variable that is created and grabs the bitmap from the resource in PreCreateWindow(). What can I change? I tried putting this type of thing in the Mainframe's paint call, but get all kinds of fun errors... Any sugggestions?
Programming in binary is as easy as 01 10 11.
|
|
|
|
|
Perhaps GetWindowDC is what your looking for...?
The returned device context will let you draw on the entire window, not just client area.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
OnPaint and OnDraw are intended for drawing client windows only, and as such the DC's provided clip to the client window.
If you're skinning an app, you'll want to use a combination of handlers for the following messages:
WM_ERASEBACKGND
WM_NCPAINT
WM_NCSIZE
etc.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
First question is...when using malloc to allocate memory and _msize to retrieve the size in a Release build, the value _msize returns, and also the value stored in the memory block header is rounded up to the nearest multiple of 8 (i.e. 7 is rounded to 8, 100 is rounded to 104, etc). This is not the case in a Debug build. Is there any way to tell the heap manager not to round up? It wouldnt even be so bad if it allocated the rounded up number of bytes, but as it is, if I tell malloc to allocate 100 bytes, it allocates 100 bytes and then tells me it allocated 104, and that isnt good for so many reasons.
Next question is...when you use new to allocate an array of structures, such as...
CMyClass *pVar = new CMyClass[count]
I have one program which will add 4 bytes to the size passed to the new operator, and store count in those 4 bytes, and I have another program in which it does not do that. Is there a way to turn this functionality on or off? It must be some compile time setting, because in the program where it does that, there is an 'add 4' assembler instruction right before the call to new.
Thanks a bunch in advance to whomever can answer these 2
-Jesse
|
|
|
|