|
As far as I know, there's no other way to achieve this than ownerdrawing the menu, which is no easy task. Look around the net for Ownerdraw menu controls (For one I found ShuiGui Lu's Owner Drawn Menu With Free Color & Font.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Is there a way to remove the 'cancel' button from the property page? I've used the 'CPropertyPage::CancelToClose' method to disable the'cancel' button on the page. Is there a way to remove the 'cancel' button instead of disabling it?
Any help would be much appreciated.
Robert
|
|
|
|
|
You need to inherit a class from CPropertySheet and in your own OnInitDialog for it remove the Cancel button.
Heres an example of what I did in an app:
BOOL CMyPropertySheet::OnInitDialog()
{
BOOL bResult = CPropertySheet::OnInitDialog();
CRect rect ;
GetDlgItem(IDCANCEL)->ShowWindow(SW_HIDE) ;
GetDlgItem(IDHELP)->GetWindowRect(&rect) ;
ScreenToClient(&rect) ;
GetDlgItem(IDOK)->MoveWindow(&rect) ;
GetDlgItem(IDHELP)->ShowWindow(SW_HIDE) ;
return bResult;
}
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
The cancel button does not belong in the property pages, but rather in the enclosing property shhet. From there, you can get to the button with GetDlgItem(IDCANCEL) , and hide it with ShowWindow .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Can anyone tell me if MFC provides any support for converting a file format, say, Microsoft Word Document format into TIFF format or atleast into raw data stream . I am told that most file formats have ActiveX event libraries which provide the interfaces to the file format. But i am still not very clear on this. If somebody could throw some light on this.
Acer
|
|
|
|
|
no, it doesn't. you can use some of the system COM stuff to read a few image formats (there are plenty of articles here on how to do that).
you'll find many image file format readers, but i'd be very surprised if you found any .Doc reading components.
-c
There ain't no second chance
Against the thing with the forty eyes
|
|
|
|
|
Thanx Chris,
So how is it possible that certain applications convert any file format into TIFF format. More specifically , i thought that for any given file format it should be possible to retrieve the raw data stream. Can u tell me more about file format conversions.
PS: I found image file format readers as u said. But my interest lies in Text based files.
Acer
|
|
|
|
|
Acer wrote:
So how is it possible that certain applications convert any file format into TIFF format
read it, render it, output as TIFF.
the format for .Doc files i not public knowledge - MS doesn't publish the specs. so, there are few apps that even attempt to read .Docs. part of the reason is that, even if you know the data format, writing the code to display the document as Word would is just about the same as writing Word itself - no small task.
-c
There ain't no second chance
Against the thing with the forty eyes
|
|
|
|
|
Thanx again,
If u could be a little more elaborate abt that line
"read it, render it, output as TIFF".
I didnt really get this.
Acer
|
|
|
|
|
1) read it - this is where you read the input data.
2) render it - draw it in some context (maybe on-screen, maybe in memory, maybe to a DIB, whatever). this is where you interpret the data and make a visual representation.
for .Doc files, this is the hard part because you would have to write code to handle all of the things that Word can do (tables, formatting, effects, columns, etc.). for something like a photoshop file, this is where you take all the layers, paths and blending options and combine them to form the final image. for 3d packages, this is where you read all of the object shapes, shading, colors, motions, etc. and render them using the 3d engine.
3) output as TIFF. take whatever you drew in step 2, convert it to a form that your TIFF writer understands and output it.
There ain't no second chance
Against the thing with the forty eyes
|
|
|
|
|
Thanx a lot Chris..
I'll look into this and get back to u if i have more queries..
Acer
|
|
|
|
|
Have you considered asking that the Word files be saved as Rich-Text-Format (.rtf), which you could read quite easily using RichEdit controls, including all the formatting and embedded objects. If anyone is creating Word compatible documents, there is a good chance they creating them using Rich-Text-Format, which I believe is a publicly available format. (my guess)
Gaulles
|
|
|
|
|
StarOffice on Linux generates Microsoft Office compatible .DOC files.
Maxwell Chen
People say "No news is good news". Then, no code is good code!?
|
|
|
|
|
writing is much easier than reading because you can always stick to a known subset of features. reading requires that you handle any number of features (none of which are documented, in the case of .Doc files)
-c
There ain't no second chance
Against the thing with the forty eyes
|
|
|
|
|
If i write a program in UNMANAGED VC++ 7.0 using ATL 7.0 and\or MFC 7.0, do I have to install the .Net framework or can I just supply the required ATL\MFC DLL's to the users machine?
Is installing the framework just for Microsoft's CLR?
|
|
|
|
|
You only need the framework for Managed C++ and for VB.NET and C#. Your ATL and MFC code will run without the framework, you'll just need to distribute the new DLLs.
Michael
Communication is the first step towards enlightenment.
|
|
|
|
|
My Shortcut Keys are not shown on the main menu. I've put in the '&' before the relevant letter, but the letter is not underlined.
If I use the shortcut it does work, and strangely if there is a sub menu (like 'Alt+F' for File) then the shortcuts do appear on that and the main menu until I go back to just the 'normal' main menu, then the shortcuts have gone again.
I'm sure its something stupid I have done, but I cannot think what.
Any ideas?
ali p
|
|
|
|
|
ali p wrote:
Any ideas?
Did you check your menu or resource file for SS_NOPREFIX? *wild guess*
|
|
|
|
|
Keep ALT key pressed and you'll see the underlined short cuts
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|
|
Thats it, what a complete idiot I am!
Thanks Nish
ali p
|
|
|
|
|
You'd be amazed how many people didn't know this. I have a whole host of bug reports from testers saying that the shortcut keys weren't working right.
Michael
Communication is the first step towards enlightenment.
|
|
|
|
|
Adding to Nish's response, this is a particular annoying new feature of XP.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
this is a particular annoying new feature of XP
You can disable it using XP powertoys I think
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|
|
this is a particular annoying new feature of XP.
It's nothing new to NT5.1, it's been there since NT5.
|
|
|
|
|