|
Don't have an answer for you but you may want to just debug the app to see why the last cout doesn't do anything. Have you tried appending an "endl" to the "you"?
Alvaro
|
|
|
|
|
You need to flush "cout" before exiting the application. std::endl takes care of this, as in
cout << "d'tor" << endl;
|
|
|
|
|
I wonder why this compiles without an error :
m_nScrollPos-=nPos,1.0,2,3
(IMHO this is obviousely nonense)
|
|
|
|
|
> (IMHO this is obviousely nonense)
Grab any C/C++ book and learn about 'sequential-evaluation operator' or 'comma operator'. If you don't have one, read this excerpt from C++ Language Reference included in MSDN:
"Consider the expression
e1 , e2
The type and value of the expression are the type and value of e2; the result of evaluating e1 is discarded. The result is an l-value if the right operand is an l-value."
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
enlightened
|
|
|
|
|
Hi,
I have a small app that runs autonomously. It's dialog based, and has a button on the dialog. I set this button to Disabled in resource editor, cos i don't want the user hitting it until certain events occur. I also want it nicely greyed out.
Here comes the silly part... how do i reenable it when i'm ready?
Thanks
|
|
|
|
|
Make a member variable for the button then go
m_Button.EnableWindow(true);
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Hello,
I have written an app. that hooks the keyboard, I have used the AfxGetApp()->m_hInstance as a parameter in the HINSTANCE hMod parameter.
The effect of doing so is that I have locked all the keys choosen in all the OS. (perfect for me, that's what I wanted).
Now I'm trespassing that code into a Win2k service and what I've found is that i don't know the instance of it, how should I get it?
I've readed in the MSDN that if you want system scope, the code must be placed inside a DLL, if this is true, why it is working OK for me?
As you will have probably seen my english is not my best... sorry about that...
|
|
|
|
|
hi to all !
does anyone know how to save the dialog or any CDC device to bmp/jpg File?
pascal.
pascal
|
|
|
|
|
I answered this question about 5 questions down. If we ever get a FAQ, this has to be one of the top answers to put in it.
You can do it with GDI+ quite easily, my 'Doodle' tutorial shows you how. If you don't want to use GDI+, try paintlib ( www.paintlib.de ). They still haven't incorperated the code I submitted six months ago, but I have code to save Targa as well here if you get paintlib and want it. ( also lots of filters ).
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
I've just finished implementing a custom menu. When you open a menu, it goes modal. This means that the parent window appears inactive. While this doesn't affect how the menu works, it just doesn't look right.
So my question is, does anyone know how to parent make parent appear active, while a child window is modal?
Hygge
John
|
|
|
|
|
|
Yes I know, but the problem is that my menu is a com object. What you suggest would require that I subclass my parent window and I don't know if that is such a good idea. I was hoping that some sort of temporary style modification, would do the trick.
|
|
|
|
|
> I was hoping that some sort of temporary style modification,
> would do the trick.
AFAIK, there's no style controlling title bar status. The code lives in WM_NCACTIVATE part of DefWindowProc.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hmm, I was afraid of that, but I guess there's no way around it then.
Gotta go sub-class some parent windows then..
Thanks for your help
John
|
|
|
|
|
Hi everybody,
I would like to attach a dialog to the left side frame, I used something like CDialoBar class but unfortunatly I can't associate variables to the control interted.
How can I create something like that?
Best regards,
Giancarlo
|
|
|
|
|
You can do it by csplitterwnd and cformview.
You can split the frame by csplitterwnd,
and then on the left create a form view(dialog like).
|
|
|
|
|
I Create a new window in the client of Frame
how to only show the new window and hide the frame!!
thanks a lot!
|
|
|
|
|
Be a bit more detailed.
To hide a window:
ShowWindow(SW_HIDE)
|
|
|
|
|
Hi
I use the API call "ExitWindows" to exit the application & log off the current user . But due to some reason the process doesn't close & after a few seconds a dialog box pops up with the message - "Appln. Not Responding" - Click "Wait / EndTask / Cancel" - when I click "wait" the application closes & logs off the user. what's happening over here?? I observe that the message WM_QUERYENDSESSION gets executed successfully.
Also, If I override the function OnQueryEndSession() & I set a breakpoint inside this function :-
In the debug mode, when I step over the ExitWindows API - I get a message that "Exit the Microsoft Visual studio "???
So, i am not able to see wehat's happening after I pass over the ExitWindows API.
Pl. let me know what's happening??
Thanks
regards
Sankar
|
|
|
|
|
use ExitWindowsEx(EWX_LOGOFF | EWX_FORCE, 0)
|
|
|
|
|
Hi,
I have query regarding Dates/Time field in MS Access.In MS Access Database I am using one of the field is Date/Time.I am using "General Date" .(i.e)6/27/01 6:59:00 .I am using SQL Query to get all the Records within two date ranges.The query looks like this
SELECT * FROM <tablename> WHERE <datefield> BETWEEN <date1> And <date2>
I am getting all the records inclusive of lower bound but exclusive of the upper bound date.
What may be the problem.Have I to modify the query ?
Regards,
yamini.
|
|
|
|
|
between ? and ?
how do you declare the range?,it's very important.
|
|
|
|
|
I am giving the sql I used,
TableName is "LogTable"
DateField is "StationTime"
SELECT * FROM LogTable WHERE StationTime BETWEEN #6/25/2001# And #6/27/2001# .
In the DataBase I am having Records with Dates ranging from 6/25/2001 to 6/27/2001.I am getting Records with date 6/25/2001 .But could not get the Records with date 6/27/2001.
Hope I am clear.
Thanx for the Response.
Regards,
yamini
|
|
|
|
|
You can try #6/27/2001 23:59:59#.
I think the default value of time is 6/27/2001 0 .
|
|
|
|