|
And you need help, you're losing it fast.
.net is a box of never ending treasures, every day I get find another gem.
|
|
|
|
|
Hi,
I want to have a toolbar button with features and exact look as is found in microsoft word font color toolbar button. The toolbar button should have a text "A" written as is there in MS Word.
When clicked, it should drop a menu with available colors. If I select one of the colors the color should come as an underline mark under the letter "A".
How do I do this in VC++.
Barna
|
|
|
|
|
The menu of available colors is also a tool window. You need to create this kind of customized toolbar which has a list of menu. (If not necessary, better use color Dialog Box)
Call ShowControlBar(&m_colorToolBar, TRUE, FALSE); in your toolbar buttn click event handler.
//m_colorToolBar should be of CToolBar Type.
This will show your color toolbar.
Now on each button(better to create colored button dynamically) click event handler, call ShowControlBar(&m_colorToolBar, FALSE, FALSE); at the end of the handler.
Anurag Gandhi
Bangalore, India.
|
|
|
|
|
I need to display data( only text data ) from a pdf file on an edit box / rich edit control in a dialog based application. Is there any API available for doing this?
|
|
|
|
|
|
GeorgeVN wrote: I need to display data( only text data ) from a pdf file on an edit box / rich edit control in a dialog based application. Is there any API available for doing this?
look at api provoded by ADOBE.. but that not free i believe
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
How can get the path of a database(.mdb)and name of the tables in that .mdb file?
thanks
|
|
|
|
|
Could you be more specific on your question ?
Regards,
Paresh.
|
|
|
|
|
|
WhiteSky wrote: ...and How to Get the Name and Path of the Current Database
[^] if helpfuls
A VBA solution?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I think I need to long rest and far computer!
|
|
|
|
|
hai,
I am working on VC6.
I have three projects let say A,B and C. i want to delete the project A . the dialog which i created in the project A should be included in the project C.
please guide me the steps to do the above task(what all files i need to included).
Help Ever Hurt Never
|
|
|
|
|
Combining dialogs (I'm assuming you mean to take a dialog from one project and include it in another project, not making one dialog from two dialogs) involves 4 files:- The project's .rc file, where the dialog template is defined;
- the project's resource.h file, where the resource constants are #define'd;
- the dialog .h header file, which defines the C++ class for the dialog, and which references the
IDD_XXXX for the dialog;
- the dialog .cpp file, which contains the message handlers, etc., for the dialog.
You might want to take a look at my article XDialogImport for more details.
Best wishes,
Hans
|
|
|
|
|
Hello, does anybody ever tried to automate Excel in VC++ and want to show the autofilter programmatically. I saw Range.AutoFilter() function, however, I cannot make it work for me. I just want to get the drop-down arrow show up for me (similar to Data->AutoFilter menu in Excel).
Thanks for any help.
haiying
|
|
|
|
|
Hope somebody can help as I'm pulling my hair out here
I normally code in C# but have had to use C++ and STL for project and having difficulty in finding out how to combine enum values in C++.
In C# I'd | the values together e.g.
<br />
r = VALUE1; <br />
r = r|VALUE2;<br />
doing this then allows me to check the enum later to see what values it matches, an example of this would possibly be a validtion routing that returns a single enum value but that value could contain multiple values indicating multiple failures.
I've been googling and found code examples that show enum's being combined in the same way, but when I try to do it the compiler gives me the following error:
error C2676: binary '|=' : 'Contract::ValidInput' does not define this operator or a conversion to a type acceptable to the predefined operator
I've looked at operator overloading but to be honest overloading the | operator is beyond my C++ skills, which are limited at best.
Can anybody help me out whilst I still have some hair?
|
|
|
|
|
Something like this doesn't work?
enum TestEnum
{
Value1 = 0x00000001,
Value2 = 0x00000002,
Value3 = 0x00000004,
Value4 = 0x00000008,
Value5 = 0x00000010,
Value6 = 0x00000020,
Value7 = 0x00000040,
Value7 = 0x00000080
};
int r = Value1;
r |= Value2;
int r = static_cast<int>(Value1);
r |= static_cast<int>(Value2);
TestEnum r = Value1;
r = static_cast<TestEnum>(r | Value2);
-- modified at 11:18 Tuesday 8th May, 2007
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Ahh....
need to perform a cast.
Thanks for the help
|
|
|
|
|
Lowest of the Low wrote: need to perform a cast
If you look up the enum keyword (and toxxct's article I believe) it explains how enums can be
promoted to int (and ARE promoted implicitly when you do arithmetic/logical ops with them). But,
to assign an int to an enum, a cast is required.
The second example I posted was optional casts - since the result was being assigned to an int
variable anyway.
The third exaple shows where the cast is required.
Cheers!
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
try
int r = 1;
//if contains value1
r |= value1;
//if contains value2
r |= value2;
make sure r is an int, value1 and value 2 are defined in enum.
If value1 is the second item, value 2 is third item in enum, you should get r=7 (1+2+4)as a total.
|
|
|
|
|
have a read at this[^] little article
|
|
|
|
|
Hi All,
I am working on an ActiveX based project.
I am using AtlAxCreateDialog method to create a dialog whose resources have been specified in a RC file. The dialogue gets created perfectly fine but i have not been able to handle its events like OnSize, OnClose etc
It has taken me a while to solve this problem but didn't succeed. Kindly, help me.
Aamir Zia
|
|
|
|
|
Patience!
You must be willing to wait longer than 8 minutes for a reply before posting the same question again. This site is used by developers worldwide so it may take several hours for your question to be seen by all.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi All,
I am working on an ActiveX based project.
I am using AtlAxCreateDialog method to create a dialog whose resources have been specified in a RC file. The dialogue gets created perfectly fine but i have not been able to handle its events like OnSize, OnClose etc
It has taken me a while to solve this problem but didn't succeed. Kindly, help me.
Aamir Zia
Aamir Zia
|
|
|
|
|
aamir.zia wrote: The dialogue gets created perfectly fine but i have not been able to handle its events like OnSize, OnClose etc
Do you mean the WM_SIZE, WM_CLOSE, etc. messages? If so, don't they get sent to the dialog proc?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Calling AtlAxCreateDialog directly is unusual: normally it’s called for you in the implementation of the CAxDialogImpl::Create method.
Steve
|
|
|
|