|
Ok, no matter what you're trying to do, it'll be easier if you can determine the command ID of the specific button. Since i don't know what you're doing, i can't really suggest anything other than using Spy++ to watch the messages sent when you press the button.
Once you have the command ID, you can activate the function by simply sending the toolbar's owner a WM_COMMAND message.
--------
This is what we've waited for
This is it boys, this is War! --Shog9 --
|
|
|
|
|
Well thanks a lot. I really appreciate your help. I think I have solved the problem. Here is the procedure.
I get XY of button when user releases mouse over the button.So I also get the Handle to toolbar.To click on button i need handle of button that i can get through
gChildHwnd=::ChildWindowFromPoint(gHwnd,m_stBull.m_point);
this way I get its handle and then send messages WM_LBUTTONDOWN and WM_LBUTTONUP.This works just fine and clicks on the button.Thanks again for your support.
In my dream, I was dorwning my §orrow§
But my §orrow§, they learned to §wim
|
|
|
|
|
How do i make a true DOS program that can be run in DOS (not in a dos shell like MS-DOS but when you boot the computer into DOS)?
And can i still use libraries like stdlib and iostream or do i need an entirely different approach? I dont so much need an answer for Visual C++ but more in general...
Thanks
Kuniva
|
|
|
|
|
First of all you need a DOS compiler, VC++6 can't create DOS executables. When you have the right compiler, you can use all its features.
|
|
|
|
|
Depends the operating system.....
If you are using Win98 or win95, when you boot in DOS mode, you are using the Kernel, in that mode you can use a console project, but if you are using a operating system like MSDOS, you need a old compiler like Turbo C or the Visual C++ 1.0
Regards
Carlos Antollini.
www.wanakostudios.com
Sonork ID 100.10529 cantollini
|
|
|
|
|
I suggest that you get a copy of Turbo C++ for DOS. It's a free download from Borland's site
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Just found this site. It has lots of stuff for MSDOS
http://www.programmersheaven.com/
|
|
|
|
|
Hi.
I have release one MFC program at my website. I am prepare a second program. In both cases, users that do not have the correct Visual C++ install with the right version of MFC dll cannot run the programs. I have tried compiling a "shared" and "static library" MFC program properties. Users not not having the correct version of MFC dlls on their system cannot run the programs.
What is the best solution such that any user with or without the required MFC dll can run any MFC programs?
Thanks,
Kuphryn
|
|
|
|
|
You're allowed to redistribute the MFC dll. There is, however, no reason why a statically linked program should load the MFC dll - are you *sure* that is the problem ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Yeah. The program was compiled using the "static library" property for the *release*. The reason I could not get Visual C++ to include the MFC dlls inside the executable was because I have set the static library property for the debugger.
Here is my website with the programs I have been working on. I want to thank everyone for giving me pointers to problems and giving me solutions to more difficult ones.
http://www.dslextreme.com/users/kuphryn/
Thanks so much!
Kuphry
|
|
|
|
|
Just link MFC statically and you'll be fine
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Yeah. The program was compiled using the "static library" property for the *release*. The reason I could not get Visual C++ to include the MFC dlls inside the executable was because I have set the static library property for the debugger.
Kuphryn
|
|
|
|
|
Hi folks-
I have a CMDIChildWnd based class that has a lot of controls on it. All these controls are "hand-coded". I create them in response to WM_CREATE, resize them in response to WM_SIZE. I am not using a dialog resource for it. (The controls change at runtime based on the state of the application, therefore I dont want to use the Dialog resource)
One problem is: I have lost the ability to tab/shift-tab between the child controls. I have used the WM_TABSTOP style on all the child controls.
After searching all nite in google,cp,cg,msdn,etc..I cant find a way to do it . Can anyone help me with this ??
Thanks-
Vivek
|
|
|
|
|
If you call IsDialogMessage for your window, that function will do the dialog control processing for your window. If the message turns out that it is not related to dialog controls, it will automatically call your WindowProc for you.
You should do this in the message pump, or even in the pretranslate message. The point is, you do not want to dispatch the message if you send it to this function.
Good Luck.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
kilowatt-
Thanks a lot !!
-Vivek
|
|
|
|
|
Hi, I dont know how to find out:
is my CDialog in foreground already?
is my CDialog partly visible or completly covered by other application(s)?
Thx for help
|
|
|
|
|
BOOL CMyDialog::IsForeground()
{
if(GetForegroundWindow() == this)
return TRUE;
return FALSE;
}
Maxwell Chen
Lets make bugs better!
|
|
|
|
|
GetForegroundWindow(), thx!
mea culpa for not finding this in MSDN, must been blind.
Any idea how to find out if a window is (at least) partly visible - or completly covered by other windows?
|
|
|
|
|
I have never tried this before in C++, anyone know some api calls (not MFC)?
Thanks
|
|
|
|
|
Handle the NM_RCLICK message.
Best regards,
Alexandru Savescu
|
|
|
|
|
That's not really the problem, it's more how to display the popup menu.
|
|
|
|
|
Look up TrackPopupMenu(..) in MSDN!
Rickard Andersson@Suza Computing
ICQ#: 50302279 (Add me!)
E-mail: nikado@pc.nu
I'm from the winter country SWEDEN!
|
|
|
|
|
Thanks, works like a charm!
|
|
|
|
|
I am a learner of OpenGL,and use it to write a full-screen programme with big scene,in which user can walk around.Now I want to add a compass(A box and Needle)at the right-top conner of the screen to indicate the direction(just as game "Dngeon Siege").I known how to draw the appearance of the compass but do not known how to make some setting before drawing the compass.
Can you give me some code or advice?Any help are appreciated!
C/C++ code fans
|
|
|
|
|
I don't know what you really want,but have you check this site?
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|