|
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 .
|
|
|
|
|
Yes.Thanx for the idea.I included the time along with date.Now it works perfectly.I am getting all the required records with the lower and upper date bound.The problem is solved.
Regards,
yamini
|
|
|
|
|
I have made a cursor with cursor editor and the device is 32*32,256 colors. but it can't use. why?
thanks.
|
|
|
|
|
What is the easiest way to convert a HBITMAP to JPEG file in C/C++?
Thanks,
Regards,
Xavier
|
|
|
|
|
I don't know why that didn't post - I'll try again. Use GDI+, read the Doodle article on this site.
Jonathon
|
|
|
|
|
Hi everyone! This is my first foray into 'The Code Project'.
I learned windows programming through MFC and I'm just now going back and trying to relearn it without MFC (so that presumably when I return to using it I will have a much higher appreciation.) Anyway, I have a simple problem and I would be grateful for help with it.
I made the default MSVC 6.0 SDK 'Hello World' project. Then I put some controls on it using CreateWindow("EDIT"...) and "STATIC" and "BUTTON". Now I want a window that simply sends a message to the parent giving client x,y coordinates when it is clicked on. The way I used to do this was just to capture the clicks in the main window and do the calculations to see whether the click was in any of the child windows. I tried subclassing (I just learned what subclassing is) a "STATIC" window to handle the WM_LBUTTONDOWN, but it acts like it's not even there . I know the subclassing worked though because it handles WM_PAINT fine.
Thank you!
|
|
|
|
|
When you create the static control add the SS_NOTIFY style. This will make the control send the STN_CLICKED notification message when the window gets clicked on.
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
I saw that option while I was poking around (though it doesn't help that SS_NOTIFY isn't in the MSDN help index ) and I dismissed it after looking at the scant offerings of STN_* (I think they were 'click' 'dblclick' 'enable' and 'disable' or something) since I needed more information (like *where* they clicked and which button) which is why I decided to learn about subclassing.
Anyway, I tried the SS_NOTIFY style just for the hell of it, and lo and behold all of the subclassing stuff I was trying to do started working! I guess the subclassing doesn't work unless you have SS_NOTIFY on, though I can't find that in the help anywhere.
Thank you, Benner!
|
|
|
|