|
You can try looking at the source code for TightVNC for some clues on how to do this.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hi,
How can a button press be simulated, so when you do the call you can see the button going down and up again, and the corresponding button handler gets called.
I use the following code now.
((CButton *) GetDlgItem(IDC_MOD))->SendMessage(BM_CLICK);
The button handler gets called, but the button doesn't go down and up again.
Is there any other way to achief this ?
Thx
|
|
|
|
|
Have you tried sending WM_LBUTTONDOWN+WM_LBUTTONUP (with proper point) ?
I haven't tried it, but it seems to be the starting point of a button press...
HTH
squidev
|
|
|
|
|
According to the MSDN documentation the BM_CLICK message generates a WM_LBUTTONDOWN and a WM_LBUTTONUP message.
See :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/buttons/buttonreference/buttonmessages/bm_click.asp
I figured out that when I shift the focus to a button on a regular dialog and I hit the <enter> key no down and up movement is seen. Could it be possible that everything goes so fast that you cann't see it ?
|
|
|
|
|
Why not just use Spy++ to see what messages are sent to the control and dialog? Once found, then it's just a matter of repeating them via code.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
try something like WM_GETDLGCODE , that might prevent the dialog from taking the focus from the controls ,and if it doesn't work then at design-time set the TAB order.
Regards
Farpointer
|
|
|
|
|
Dear All,
Programmatically I want to find the actual physical path of running process.
With Regards
Manoj Kumar Batra
|
|
|
|
|
Really easy. CreateToolhelp32Snapshot is your friend. Pass TH32CS_SNAPPROCESS, and use szExeFile of PROCESSENTRY32 structure.
|
|
|
|
|
Thanks you a lot for the Help.
can I find the running process is COM, DCOM? through CreateToolhelp32Snapshot?
With Regards
Manoj Kumar Batra
|
|
|
|
|
manojk_batra wrote: can I find the running process is COM, DCOM? through CreateToolhelp32Snapshot?
AFAIK, Nope that Not Possible...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
or use
EnumProcesses();
OpenProcess();
EnumProcessModules()
GetModuleFileName()
gabby
|
|
|
|
|
Dear One,
I am working in MFC Dialog application.I jump from Parent dialog to child dialogs.But when I close any child Dialog.I NEED TO KNOW THAT WHICH EVENT OF PARENT DIALOG IS CALLED SO I MAY DO SOME MANIPULATION OVER THERE.
Thanx in anticipation
asifrogers
|
|
|
|
|
Are the child dialogs modal or modeless?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Child dialogs are modal.
asifrogers
|
|
|
|
|
asifrogers wrote: Child dialogs are modal.
if your child dialog are Modal.. then you must be calling like this..
CChildDlg chdDlg;
chdDlg.DoModal();
As the DoModal call is Blocking Function.. thats mean your Parent dialog will be blocked till you childDialog is Visible/running.. so if you want to perfrom task after closing of Child dialog you can write after the DoModal call
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
"Child dialog" is nearly always used in a general sense, hence the question.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi ,
when the child gets destroyed it send a wm_destroy trap it and do what you want to do their ,or post a message to the parent with the help of sendmessage( or a user message), trap it at parent .
Regards
farpointer
|
|
|
|
|
I can't do that in WM_Destroy as it sends assert failure as the parent dialog is about to be closed because i need to do some manipulations on class member of Parent Dialog.
I make an object in the OnDestroy event of child to modify Parent's label control.But when destructors are called child destructor is called first and in that destructor (Parent object was created so it causes assertion failure).
If any other method to solve this please send some code snippet for that
Thanx alot
Asif Rogers
asifrogers
|
|
|
|
|
Thanx i have managed to make my self defined event.
So nice of you n God Bless You
asifrogers
|
|
|
|
|
Hi
Any pointers to set BMP/GIF image as a background image.
Regards
Anniyan
|
|
|
|
|
Hi..
I want to write one program search 10 numbers element. we are 100 numberal
Example number: 193493049139458195314951935................
Thanks.
|
|
|
|
|
I have two questions really bothers me.
1. Is it possible to have .Net assembly with global functions so that I can add reference and use them in my application by ::globalfunctions?
2. I have one small solution with two projects: one to create the dll and the other is to consume it. In the application, I can see the intellisense recognize the member in the namespace. But when I compile, I got error 2039 "something" is not a member of "namespace".
Any help will be greatly appreciated.
|
|
|
|
|
i'm just getting into programming and for one of my projects involves opening a file, but if it doesn't exist it is not supposed to create one, but rather output an error message. in some cases, if i give it a file location that doesn't exist, it outputs the message and doesn't create a file, but most of the time it creates the file and doesn't output the message. why is this?
any help would be much appreciated
thanks
-james
jnerv
|
|
|
|
|
jnerv wrote: most of the time it creates the file and doesn't output the message.
What function are you using?
You may try PathFileExists()
Regards,
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
If you're using MFC CFile class if you will pass only CFile::modeRead it won't create it if it doesn't exist (Open function).
If you're using fopen pass only 'r' to mode parameter and the function will fail if the file does not exist.
|
|
|
|