|
I have to enumerate all toolbars attached to a window and programatically launch them(clicking), Cld you suggest a way to do this?
Currently am using EnumChildWindows() to get handle of the respective control attached to the window and GetWindowText() and can enumerate and launch all buttons attached to the window but not a toolbar.
e.g spy++ shows a toolbar on wordpad having class name ToolbarWindow32 and Toolbar window caption as ""
so i can't identify the particular toolbar to retrieve the handle of the toolbar in question and launch it using ::PostMessage(hwnd, BM_CLICK, 0, 0) as i can do all buttons etc attached to the window.
Waiting for a response.
Thanks.
Sincerely
Giftsana
|
|
|
|
|
|
Thank you for the reply.
Let me try it, but how do i identify the toolbar because ::GetWindowText() returns "" for a toolbar. so there is no means of identifying which toolbar is this to launch it i.e. simulating a button press?
Sincerely
Giftsana
|
|
|
|
|
Hello Michael
Thanks for the suggestion.
I used ::SendMessage(hwnd, TB_PRESSBUTTON, (WPARAM) (int) 222, TRUE) for programatically launching individual toolbar buttons using their controlid in this case (WPARAM) (int) 222, but the button click does not happen and it does not launch the asssociated button window. it greys the corresponding buttons and i can see the effect on the toolbar.
after getting the toolbar handle and indvidual toolbar buttons control id i want to perform a click on each button and launch their resp window programatically one after the other?
Am i missing something.Waiting for a suggestion.
Thanks in advance.
Sincerely
Giftsana
|
|
|
|
|
Hi
My scenario is:
For example developing a big project.You divide project to some pieces.And start to writing components.And then coding UI and binding them with your components.
You must disturb you exe with your dll's.But how can we restrain that other coders to use our dll's in your application.
I mean for example i installed sygate firewall.In its directory there are some dll's like:
IdsTrafficPipe.dll,Netport.dll,PSSensor.dll etc...
1-)Here how can we use like these dll's methods?(We can use win32api:system32.dll, gdi32.dll...)
2-)If i develop my application and make dll files to store my methods, how can i avoid to using these dll's other's by binding runtime?
Thanks.
|
|
|
|
|
hi all,
i have to dynamically increase the Dialog and its controls when the Dialog Box is Dragged. Any Solution.
please let me know.
thanks,
uday.
uday kiran
|
|
|
|
|
Hi kiran janaswamy,
Whats question?
|
|
|
|
|
check here^
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
|
|
|
|
|
See the "Extras" section of this article.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
How can I start an external program - probably an .exe file - in a C++ program. And which would be the best way to be sure the external program has finished?
|
|
|
|
|
Create to process using CreateProcess or ShellExecute (there are other options). Use WaitForSingleObject on the process HANDLE to wait till process has exited.
Steve
|
|
|
|
|
Hi MrChefman,
maybe it is some helpful to you
if you run an application from your program use
PROCESS_INFORMATION l_ProcessInfo;
STARTUPINFO l_StartupInfo;
ZeroMemory(&l_StartupInfo, sizeof(STARTUPINFO));
l_StartupInfo.cb = sizeof(STARTUPINFO);
l_StartupInfo.dwFlags = STARTF_USESHOWWINDOW;
l_StartupInfo.wShowWindow = SW_SHOWMAXIMIZED;
CreateProcess(NULL,
"Notepad.exe",
NULL,
NULL,
FALSE,
CREATE_NEW_CONSOLE,
NULL,
NULL,
&l_StartupInfo,
&l_ProcessInfo);
}
|
|
|
|
|
To complete this example:
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
PROCESS_INFORMATION l_ProcessInfo;
STARTUPINFO l_StartupInfo;
ZeroMemory(&l_StartupInfo, sizeof(STARTUPINFO));
l_StartupInfo.cb = sizeof(STARTUPINFO);
l_StartupInfo.dwFlags = STARTF_USESHOWWINDOW;
l_StartupInfo.wShowWindow = SW_SHOWMAXIMIZED;
if ( CreateProcess(NULL,
"Notepad.exe",
NULL,
NULL,
FALSE,
0,
NULL,
NULL,
&l_StartupInfo,
&l_ProcessInfo))
{
CloseHandle(l_ProcessInfo.hThread);
WaitForSingleObject(l_ProcessInfo.hProcess, INFINITE); // Wait for it to finish.
CloseHandle(l_ProcessInfo.hProcess);
}
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Forgetting to close the handles is a common source of resource leaks.
Steve
|
|
|
|
|
|
Thanks a lot. But I still have a problem in Building the .exe file. Linking works but when trying to build the .exe there are errors:
unresolved external symbol _WinMain@16
I hope, my translation from the German version into English is right
I included both header-files windows.h and winbase.h into my win32-application-project.
Where is my mistake?
|
|
|
|
|
You must insert library Kernel32.lib to your project
-----------------
conglt
|
|
|
|
|
The linker is looking for the entry point for a console application, but the application is being compiled and linked as a windows application (i.e. not a console application).
This error has been observed after changing the project settings from using MBCS to UNICODE characters.
Under the project settings, under the ‘Link’ tab, category ‘output’, set the ‘Entry-point symbol’ to ‘wWinMainCRTStartup’.
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Thanks a lot. It works!
But there's still a little problem:
When I use the external thread, the command line interface appears for a short time. how can I suppress the command line?
|
|
|
|
|
MrChefman wrote: ...the command line interface appears for a short time.
You mean the console window? Have you tried using ShellExecute(..., SW_HIDE) , or setting STARTUPINFO.wShowWindow to SW_HIDE if using CreateProcess() ?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
It seems I come here with the strangest questions sometimes... but here goes.
Is there a way for my C++ app on my client to be recognized as present by my web app?
---
I install my app
I browse to my remote website
... can the web app detect that my app is installed?
... would prefer this not to be IE dependent....
Thanks for your thoughts!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
Peter Weyzen wrote: Is there a way for my C++ app on my client to be recognized as present by my web app? \
if you cpp application can send query the web app?
"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
|
|
|
|
|
I was kinda looking for a javascript-ish way or something like that....
but maybe communication from the client could be enough information to make the webserver know that "this machine" is where the client is installed?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
Peter Weyzen wrote: but maybe communication from the client could be enough information to make the webserver know that "this machine" is where the client is installed? .
I am afraid, i fail to understand you problem
"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
|
|
|
|
|
I want to be able to browse to my website -- and have the webpage behave differently if my application is installed on this machine. I would like additional links to show up when it's installed here... or have the webpage figure out this is my home machine....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|