|
I Used ShowWindow(SW_HIDE) it hide the dialog but at the inital it popup
how to avoid this .
Thanks in advance
|
|
|
|
|
vicky00000 wrote: I Used ShowWindow(SW_HIDE) it hide the dialog but at the inital it popup
how to avoid this
According to MSDN, the SW_HIDE is ignored during the 1st call when the dialog is about to pop up.
ShowWindow[^]
The first time an application calls ShowWindow, it should use the WinMain function's nCmdShow parameter as its nCmdShow parameter. Subsequent calls to ShowWindow must use one of the values in the given list, instead of the one specified by the WinMain function's nCmdShow parameter.
As noted in the discussion of the nCmdShow parameter, the nCmdShow value is ignored in the first call to ShowWindow if the program that launched the application specifies startup information in the structure. In this case, ShowWindow uses the information specified in the STARTUPINFO structure to show the window.
Maxwell Chen
|
|
|
|
|
Is there any way to update STARTUPINFO structure ?
Thanks for your replay
|
|
|
|
|
And the reason is: If it worked, then no target window would receive messages.
There is a solution for this: To make your application hide to systray.
Maxwell Chen
|
|
|
|
|
vicky00000 wrote: I Used ShowWindow(SW_HIDE) it hide the dialog but at the inital it popup
how to avoid this .
don't call DoModal until you want it to show.
|
|
|
|
|
Override the OnWindowPosChanging() method with:
if (! m_bVisible)
lpwndpos->flags &= ~SWP_SHOWWINDOW;
CDialog::OnWindowPosChanging(lpwndpos); Just before calling ShowWindow(SW_SHOW) , set m_bVisible to true .
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thank you very much DavidCrow I solve my problem with the help of you
Thanks
|
|
|
|
|
please let me know how to open an .mdb (MS Access) file from a VC6.0 application .
thanks in advance .
aanandi
|
|
|
|
|
Use ShellExecute(..., "open", "file.mdb", ...) .
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Do you want to connect to an Access database?
Check in MSDN the following classes:
CDatabase
CRecordset
or
CDaoDatabase
CDaoRecordset
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
i just want to open an already created .mdb file from an application in VC6 .
anyways thank you .
|
|
|
|
|
If you want to read access files of your program did you see Database[^]?
|
|
|
|
|
Hi everybody,
I see how the messages travels down in the own application.
But a special key combination (Ctrl+Shift+R) should launch a tool into my application,
but it opens a functionality of another application ...
How can i route the message that it will directly traited by my own application?
Big thanks for any help
|
|
|
|
|
Use RegisterHotKey(HWND hWnd,int id,UINT fsModifiers,UINT vk) to register global hotkeys.
Then handle the message WM_HOTKEY to do what you want.
When you don't need your hotkey anymore, call UnregisterHotKey(HWND hWnd,int id);
rotter
|
|
|
|
|
Are you using an accelerator table to catch the Ctrl+Shift+R key?
If no then that's where I would start.
AliR.
Visual C++ MVP
|
|
|
|
|
Hello everyone,
The following code will result in C4373 warning message. In MSDN,
[url]http://msdn2.microsoft.com/en-us/library/bb384874.aspx[/url]
I do not quite understand the following statement,
1. What means "bind"? Putting function pointer into the vtable of the related class?
2. const is ignored in derived class?
--------------------
This means the compiler must bind a function reference to the method in either the base or derived class.
Versions of the compiler prior to Visual C++ 2008 bind the function to the method in the base class, then issue a warning message. Subsequent versions of the compiler ignore the const or volatile qualifier, bind the function to the method in the derived class, then issue warning C4373. This latter behavior complies with the C++ standard.
--------------------
class Base {
public:
virtual int goo (const int input) {return 200;}
};
class Derived : public Base {
public:
virtual int goo (int input) {return 200;}
};
int main()
{
Derived d;
const int a = 1000;
d.goo (a);
return 0;
}
Compile warning message,
1>d:\visual studio 2008\projects\test_overriding1\test_overriding1\main.cpp(8) : warning C4373: 'Derived::goo': virtual function overrides 'Base::goo', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
1> d:\visual studio 2008\projects\test_overriding1\test_overriding1\main.cpp(3) : see declaration of 'Base::goo'
regards,
George
|
|
|
|
|
"function arguments of a type modified by const or volatile are not treated differently
than the base type for the purposes of overloading." from msdn;
that is
"int goo (const int)" and "int goo (int)" are not considered as two overloaded function,
it causes redeclaration error. you cannot have two definitions for each of this.
So, while overriding, "virtual int goo (const int )" and "virtual int goo (int input)"
is not considered as two different functions and compiler prior to VS 2008 binds to the
method in base class and issues warning "C4301: 'Derived::goo': overriding virtual function
only differs from 'Base::goo' by const/volatile qualifier"
while VS 2008 bind the function to the method in the derived class, then issue
warning C4373 ignoring qualifiers. "This latter behavior complies with the C++ standard."
George_George wrote: 1. What means "bind"?
Putting function pointer into the vtable of the related class?
yes.
George_George wrote: 2. const is ignored in derived class?
explained above.
|
|
|
|
|
Thanks Rajkumar,
Your reply is so comprehensive covers not only overriding (my question) and overloading (which I do not know).
regards,
George
|
|
|
|
|
The bug in MCVC prior to 2008 is that the compiler doesn't recognise cv-qualifiers
(const and volatile or combination) as modifying the type in all cases. For example when matching template
parameters so int myfunc<volatile int=""> is the same function as int myfunc<int> in some circumstances but not
in others. This is part of the legacy of the almost completely broken template implementation in VC6. I'm
very glad to hear MS have finally fixed the last gits of this that I'm aware of. I would have helped if they'd
admitted to the full reality of how far out of spec their compiler was at some point in the past so we
could have predicted what would and would ot work rather than having to rely on trial an error but that
M$ for you.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Thanks Matthew,
I do not quite understand your sample below. Could you show some pseudo code please? Code clarifies everything.
Matthew Faithfull wrote: For example when matching template
parameters so int myfunc is the same function as int myfunc in some circumstances but not
in others.
regards,
George
|
|
|
|
|
Sorry George the template parameters got dropped, very .
what I meant was older MS compilers get int myfunc<const int> confused with int myfunc<int> and similar. Except that in some cases they get it right so it's very difficult to know exactly what will work and what won't.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Thanks Matthew,
I think you mean something like this? I have tested in Visual Studio 2008, it will result in compile error,
error C2995: 'int myfunc(T)' : function template has already been defined
template <class T> int myfunc (T a) {};
template <class T> int myfunc (const T a) {};
regards,
George
|
|
|
|
|
Yes, that's another case of the same thing. It looks like they still haven't fixed it properly
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Hi Matthew,
In your mind, you mean they will be treated as different thing? Does C++ Spec mention this?
regards,
George
|
|
|
|