 |
|
 |
HWND vl_hWnd = ::FindWindow(0,"TrickBtnDemo");
HWND vl_hChildWnd = ::FindWindowEx(vl_hWnd,0,0,"Click Me!");
::PostMessage(vl_hWnd,WM_COMMAND,::GetDlgCtrlID(vl_hChildWnd),0);
|
|
|
|
 |
|
 |
Hehe... but please, don't say the unspokable!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
 |
|
 |
It's a good idea, I just wouldn't recommend using it too often,
|
|
|
|
 |
|
 |
It's a ridiculous idea and should never be used.
I'm amused at your vote of 3. I wish you had been amused by the article. Ah well
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
 |
|
 |
I have been amused!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
 |
|
 |
On some versions of this program/joke you can read "Click here to watch some pr0n."
|
|
|
|
 |
|
 |
Is it possible to create a button (just because we can control the look and feel ) and use it as edit box because edit box regtangular shape is too ugly.
any idea?
thanks
|
|
|
|
 |
|
 |
Hello
I am trying to implement a button, on my MainFrame view – NOT in a dialog (so that I don't require a resource).
I am displaying a Bitmap on the view and I need to have a button on top of that
Any help will be appreciated
Thanks
Alex
aevans@microknox.com.au
|
|
|
|
 |
|
 |
Hi, i also tried it and i got it
In your CMainFrame::OnCreate add following to then end (before the return
CButton* einButton = new CButton();
einButton->Create("text", WS_CHILD | WS_VISIBLE | WS_PUSHBUTTON | BS_FLAT , CRect(10,40,100,70), this, 1);
this means the CMainFrame CWnd. I don't realise yet hot to become the button clickable. but ill go on.
If've become him clickable: add einButton->BringWindowToTop();
Then you can use the ON_BN_CLICKED in the MessageMap
if you have a status bar you should add
m_wndStatusBar.BringWindowToTop(); because if you don't the button is painted over the statusbar. Hope i could help
(excuse the bad englisch.)
MfG
Christian
|
|
|
|
 |
|
 |
Thanks for that - works just fine.
Regarding your English, I wish I could say all that in your language
Cheers
Alex
|
|
|
|
 |
|
 |
I have written a program for a customers machine tool with a million bugs in it (Planned on the back of the boarding card, written on the plane).
I placed your control on the logon page, --- since then , not one error has occured, program complete! Thanks
|
|
|
|
 |
|
 |
The demo exe needs MFC70.dll.
I suppose you can compile it in "old" VC++6.
I just wanted to play a bit and try the tricks given here, so I just deleted the demo and walked away
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
|
|
|
|
 |
|
 |
The new demo includes a statically built exe.
cheers,
Chris Maunder
|
|
|
|
 |
|
 |
Thank to be nice with guys having obsolete systems (because of money or work rules or lack of interest, etc.).
Not to complain again but for information, my old NT4sp5 with VC++6sp3 don't have the OLEACC.dll file...
I fear that the list will go on
Thanks for trying.
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
|
|
|
|
 |
|
 |
Ah - AFAIK this is because MS hardwired the OLEACC dependancy into MFC. Please someone correct me if I'm wrong (say it isn't so!). I think the word for that is "Lame".
cheers,
Chris Maunder
VC++ - the language that doesn't say 'no'
|
|
|
|
 |
|
 |
I saw an april fools program that displayed a very convincing dialog that notified the user of a system error, then asked them if they wanted to format their harddrive. There was either a yes or a no button to click.
After the user clicked the no button, the program switched to the two buttons to make the user think that they clicked on the yes button. Then it displayed a progress bar and started opening and reading files like mad to work the harddrive, and make the user think that they were formatting their harddrive.
One guy didn't stick around long enough to figure out that it was a joke, picked up his mouse, smashed it on his desk, and went home for the day. I think that he had an anger management problem.
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!
|
|
|
|
 |
|
 |
Here's the trick:
- Start the app
- Place the mouse cursor anywhere on the dialog that won't move the button. I placed mine over the static text control
- Invoke the system menu with Space
- Click the letter M (for Move)
- Using the arrow keys move the dialog until the button will be positioned below the mouse cursor
- Click the Enter key to stop the dialog move operation
- You should not have the mouse cursor directly atove the Click Me button
- Click the button
Cheers,
Tom Archer
Author - Inside C#, Visual C++.NET Bible
Warning: The deadline in your mirror is much closer than it appears.
|
|
|
|
 |
|
 |
Tom Archer wrote:
Click the button
You'll be able to click it. But you'll not be able to bring up the message box. The moment you click it, the button will get the WM_SETFOCUS message (before it gets the mouse click message) and it's been handled to set focus back to the previous control. Thus even if you click it, the messagebox won't pop up.
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
 |
|
 |
Yep. I said that in a post further down. The point being that I still technicaly clicked it!
Cheers,
Tom Archer
Author - Inside C#, Visual C++.NET Bible
Warning: The deadline in your mirror is much closer than it appears.
|
|
|
|
 |
|
 |
To me the challenge was clicking it; not getting the message box. To get the message box, I'd just send a message to the dialog from another app
Cheers,
Tom Archer
Author - Inside C#, Visual C++.NET Bible
Warning: The deadline in your mirror is much closer than it appears.
|
|
|
|
 |
|
 |
Tom Archer wrote:
I'd just send a message to the dialog from another app
What a geek you are!
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
 |
|
 |
whats there to be geek in it....
people do it all the time....
try sending WM_CLOSE to a password field in a dialog... and see what happens...
|
|
|
|
 |
|
 |
Hmm, doesn't work for me?! Enter exits the app because it presses the ok button. If I click move in the system menu with the mouse, the mouse moves also if I press the cursor key (all with W2K)
|
|
|
|
 |
|
 |
Just what I was looking for.
|
|
|
|
 |
|
 |
Mark Nischalke wrote:
Just what I was looking for
Oh, that's nice
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
 |