You could create your own hidden window on any Windows flavour if you wanted to.
You could question why 'no windows' is a requirement. Perhaps it is only 'no visible windows'.
Going with the stated requirement that 'no windows' are allowed. Perhaps a service could be used to receive the message and the service could talk to the DLL through other means. Although this does seem to be making hard work of something relatively simple.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
I`ve got kind off a complex situation here.
I have a class hierarchy that looks like
class aB:public A
class aC:public A
class cD:public C
with further derived classes, but for illustrating this`ll do.
in class A I define some constants like
#define CONST_A_1 1
#define CONST_A_2 2
if class aB needs to I should be able to define a series of constants there that continues where the series of #defines in class A stopped.
e.g. if last const in class A was #define CONST_A_X x (where x is a number)
then CONST_aB_1 should get value x+1.
Ok this is easy I could just define in class A #define CONST_A_LAST CONST_A_X
and set the definitions in class aB like
Now imagine that the constants defined in A are good enough for aC(no extra needed), but I need some more for cD...
I could define them in cD as i did in aB like #define CONST_cD_1 (CONST_A_LAST+1) and so on, but what if due to specifications I don^t have yet I will need to define a constant in aC later on? Then I will need to change the defines in class cD too (at least the first one,because I don^t want a constant with the same value in base-class)....
From the start I could define in aC something like #define CONST_C_LAST CONST_A_LAST
and use that CONST_C_LAST as a starting point in cD.
However I don^t like the above approach( although it might be the only one??)
The thing is each time I would derive a new class from one of these classes I would need to remember to define a new "CONST_..._LAST" constant (in case that I derive a class from that class and need to specify a new const).Which might lead to a lot of unused defined constants (doesn^t hurt, but I don^t li
Does anybody know how I could solve this issue here in such a way that I can remove/add new constants to a class without needing to worry about derived classes of that class. Or derive classes without having to remember adding a CONST_..._LAST if I don^t need it for that class, but still be able to derive a new class from that one and start with a correct constant without bothering base class, and in case base class suddenly needs a constant adding it there without bothering derived class.
I know sounds like a lot to ask for. But someone might know a solution....
Thanks for any insight you might provide.
I have a CString with numbers let's say 30 and I need to count down that so I get to zero. I cant use a int to start with it need to be a CString. But I need to convert that CString to a int? But how can I do that?
It can be a solution for all platforms, only you have to create a normal window - not message only - a bit more overhead, but should work.
If you want to receive a message, you need a window (WM_ stands for Window Message ) for window you need a message pump...
Or might be there will be a better way how to detect the windows shutdown, but I don't know them from the head now.
cau any one tell me, in VC++ what messege do i need to send in the button function so that when ever the user clicks the button on the dialog box which is created in an SDI application, the cursor moves up in the client area , where my button is member dialog class and object of button class
if( (TRUE && !(keyState & 1))||(!FALSE && (keyState & 1)) )
// Simulate a key press
// Simulate a key release
but this code dos't compelete my requirement
I am working with MDI application. I want to ovverwrite ID_APP_EXIT, File->Exit menu function of Mainframe menu. When I click on this menu option or on the close icon button of Main frame, I should check for a particular condition and then allow to exit the application if condition is true or else I should not allow the user to exit.
I am able to overwrite and check the condition, but unable to close the application if condition is met. If I used PostQuitMessage(0), it's getting closed but I'm getting lot of memory leaks due to this function.
Can anyone please help me to do this?
Last Visit: 31-Dec-99 19:00 Last Update: 28-Nov-15 20:44