|
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
|
|
|
|
|
I have a MDI application where, i am using a picture control to load icons of leds. The goal is to load the picture control with ICON that look like leds green and red. However, I am getting a Debug Assertion Failed where i set the new icon value.
iconPitchActiveFault is CStatic control variable for a ICON
void Lenze8200_Dlg::OnShowWindow(BOOL bShow, UINT nStatus)
{
CFormView::OnShowWindow(bShow, nStatus);
//UpdateData(TRUE);
HICON Red_ON;
HICON Red_OFF;
HICON Green_ON;
HICON Green_OFF;
// TODO: Add your message handler code here
Red_ON = AfxGetApp()->LoadIcon(IDI_RED_ON_LED);
Red_OFF = AfxGetApp()->LoadIcon(IDI_OFF_LED);
Green_ON = AfxGetApp()->LoadIcon(IDI_GREEN_ON_LED);
Green_OFF = AfxGetApp()->LoadIcon(IDI_OFF_LED);
******** The exceptions shows up here **************
m_iconPitchActiveFault.SetIcon( Red_OFF );
}
Scott Dolan
Jernie Corporation
Engineering & Manufacturing
Software, Hardware, & Enclosures
|
|
|
|
|
Changing where the code is placed will make the fix the problem. Put the code in OnUdpated not in OnShowUpWindow
Scott Dolan
Jernie Corporation
Engineering & Manufacturing
Software, Hardware, & Enclosures
|
|
|
|
|
Is it an exception or an assertion?
"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
|
|
|
|
|
As soon as a window is created, many different messages, including WM_SHOWWINDOW will start flying. But just because the parent window is created, doesn't mean its children are also alive and well. You can avoid this problem by making liberal use of IsWindow() :
if (::IsWindow(m_iconPitchActiveFault.m_hWnd))
m_iconPitchActiveFault.SetIcon( Red_OFF );
Best wishes,
Hans
|
|
|
|
|
How do you make m_iconPitchActiveFault?
|
|
|
|
|
Hi everyone!
I am currently developing the new interface for a CAD program, my customer made me made with TRULY dynamic toolbars, dockbar, arbitrary positioning, locking, controls, multicolumn and wetheaver could come in mind.. everithing ok until one day...they needed a feature with toolbars for wich:
1st) You have 2 toolbars and you put them on the (e.g.) the left side, by code or dragging, now you have one column with the first and second toolbar
2nd) Now the fear begins: you slowly shrink the application mainframe. When the lowest toolbar become invisible... WM_WINDOWPOSCHANGING,WM_MOVE,WM_WINDOWPOSCHANGED and the hidden toolbar jumps on the right of the one still visible. Yes that's the standard way, i know,
3d) But they don't like it cuz they've seen a product that in this situation does not move anything!!! The toolbars stays where they are EVEN HIDDEN!!!!
The reason for this is that having several locked toolbar, and a pretty complex interface (wich saves the various position of everything is on the screen) they don't like that such a change could happen. I tried to look to get some idea with ProfUI but they don't have this option.
I now work by several years on C/C++/MFC but i'm really getting mad to get an idea of where i can put my hands, i tried the CDockBar, the CMainFrame, hanging around with the debugger, subclassing, but i seems not to be able to find where the MainFrame (or who?) decide arbitrarely where to put the XXX toolbars
Thank you for the help, and if u are interested into tips for toolbars i'm here
Enrico
-Yes, i don't write a good english-
Unlukily it's not a Joke...
Hope you'll understand!!
|
|
|
|