|
Hello,
under Visual C++ there are numerous examples of hooking into
another application, i.e. adding one's own menus to Notepad etc.
Is there a similar thing available for Java?
A net search has not resulted in anything useful.
What I would like to do:
1) Programmatically access the menu functions of a swing GUI in another 3rd party Java App for which I just have compiled classes, no source.
I know that awt.robot can do a bit, but I am looking for more:
2) Automatically extracting text from a Java Text Field of the 3rd party app (to repeat: I have no source code for this, therefore have to "hook" into the app from outside).
I have seen examples for C++ on codeproject, but nothing for Java.
3) A final challenge: adding my own menus to this 3rd party swing app. Again, possible in C++. I think impossible in Java.
Thanks so much for your help!
You are my last hope, literally.
Kind regards,
Tony
|
|
|
|
|
I belive the menus work differently in JAVA, plus i dont know wheather its "easly" possible to hook it coz the JVM has control over it.
How do you want to hook it any way, from JAVA or from VC++
P.R.A.K.A.S.H
|
|
|
|
|
Hi all;
I need to execute a console program when the user in my application clicks a button on my SDI dialog. Can anybody please help me to find a way how.
Thank you
krugger
|
|
|
|
|
ShellExecute api will execute any executable, even console application.
P.R.A.K.A.S.H
|
|
|
|
|
ShellExecute(this->m_hWnd,"open","calc.exe","","", SW_SHOW );
or ShellExecute(this->m_hWnd,"open","notepad.exe",
"c:\\MyLog.log","",SW_SHOW );
|
|
|
|
|
You can also use CreateProcess() .
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi all;
I badly need a DialoogBar in my application. I have include the Dialog Bar included in "registered visual c++ components" to my project and it works just fine. The only problem is that i need to implement tab control on the DialogBar. In order to create, initialise and attach items to the tab control, i need to add a snippet. When i add the snippet in OnInitDialog for a modal dialog, it works fine. The problem is that the DialogBar is of style -> child (Not modal) and i really don't know which event to call to create the tabs on the DialogBar. Can somebody please help me on this thing. I really really need this very quick.
Thank you beforehand guys;
Krugger
|
|
|
|
|
In order to display a tab control, you must first construct a tab control object (CTabCtrl), then create the associated Windows tab control.
The easiest way to construct the object is to include it as a member variable into the CDialogBar-derived class you have made. As DialogBar's are pure child dialogs, you can use DialogDataExchange as well to bind a member variable to a control on the dialog layout resource.
Being dialogs (and dialogs being Windows windows), these toolbars implement the standard Windows window creation chain. For example, you could try writing a handler for WM_CREATE, then create and initialize the tab control in there. I'm pretty sure it should work ok.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
i have to splitter window in right spliter window their is CListview in taht view i need to create toolbar
Can anybody help me for that
thanx
|
|
|
|
|
My app can load lots of formats pictures, using IPicture. If I load two or three pictures, how can I print only specified rect in the clientrect. thanks!
I am a student from china.THX
|
|
|
|
|
i tried this code but it didn't work :
CWnd *pMain=AfxGetMainWnd();
CMenu * pMenu=pMain->GetMenu();
CMenu * pSubMenu=pMenu->GetSubMenu(3);
pSubMenu->EnableMenuItem( 1,MF_DISABLED|
MF_GRAYED | MF_BYPOSITION );
in spite of this the following code is working properlly:
CWnd *pMain=AfxGetMainWnd();
CMenu * pMenu=pMain->GetMenu();
pMenu->EnableMenuItem(3,MF_DISABLED|
MF_GRAYED | MF_BYPOSITION );
please any help, why this happen
Best Regards
|
|
|
|
|
Which menu item are trying to disable ???
P.R.A.K.A.S.H
|
|
|
|
|
hi
i try to disable an item like new in File->New
|
|
|
|
|
|
is it posible to catch some console input before drawing it on screen using some API functions?
thank u for help!
|
|
|
|
|
Certainly. Check here and here for details.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
How to get the size of CScrollView's scrollbar?
|
|
|
|
|
The scrollbars when visible has a computable size.
For the vertical:
Get the height of the client area
GetSystemMetrics(SM_CXVSCROLL); - width
For the horizontal
Get the width of the client area
GetSystemMetrics(SM_CYHSCROLL); - height
If both scroll bars are visible you have to adjust the width of horizontal and height of vertical by the height/width of the other.
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
Hi,
I had 24 edit box which I want to group it together and set it as array. Can this be done?
Siew Hoon
|
|
|
|
|
for (int i=0;i<24;i++)
{
hwndRadioButtons[i] = CreateWindow(
"BUTTON", // predefined class
"", // button text
WS_VISIBLE | WS_CHILD | BS_BITMAP|BS_OWNERDRAW , // styles
//WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON|BS_BITMAP , // styles for radio button
// Size and position values are given explicitly, because
// the CW_USEDEFAULT constant gives zero values for buttons.
128+35*i, // starting x position
20, // starting y position
26+2, // button width
24+2, // button height
hDlg, // parent window
(HMENU)(IDC_RADIO_DIALOG1+i), // No menu
(HINSTANCE) GetWindowLong(hDlg, GWL_HINSTANCE),
NULL);
}
|
|
|
|
|
Hi,
There are 3 errors after I had in this code.
1) hwndRadioButtons - undeclared identifier
2) subscript requires array or pointer type
3) unexpected end of file in macro expansion
How to solve this?
|
|
|
|
|
hi, can someone tell me where to find the value of ATTACH_PARENT_PROCESS witch used in BOOL AttachConsole(DWORD dwProcessId);??
thanks!!!!
|
|
|
|
|
I found this in WINCON.h, which is included automatically when you #include WINDOWS.h:
#if(_WIN32_WINNT >= 0x0500)
WINBASEAPI
BOOL
WINAPI
AttachConsole(
IN DWORD dwProcessId
);
#define ATTACH_PARENT_PROCESS ((DWORD)-1)
#endif /* _WIN32_WINNT >= 0x0500 */ According to the MSDN, this is only available in Windows XP and later. Note that you must have _WIN32_WINNT defined to a value greater than 0x0500 for the declaration to be present.
Software Zen: delete this;
|
|
|
|
|
I am wondering whether we can use ConvertSidToStringSid in Visual Studio 6.0 just by copy the needed Sddl.h and Advapi32.lib from Visual Studio .NET?
After "#define _WIN32_WINNT 0x0500" and "#include "Sddl.h""
in my source file and change the project's settings to link with "Advapi32.lib". The project compiled and linked without error.
But after execute, I get an error "Unhandled exception in SID.exe(ADVAPI32.DLL):0xC0000005: Access Violation."
What can I do?
|
|
|
|
|
If the function wasn't available, you would have seen a link error, or at best a runtime error about not finding the requested import in the DLL.
The access violation implies that the SID you are supplying is poorly formed in some fashion.
Software Zen: delete this;
|
|
|
|