|
Not really, I`m looking more for a straight conversion from a CString class to a CPoint class if its possible, by thanks for taking to the time to have a go, I appreciate that Paolo.
Alan.
AEGC
|
|
|
|
|
I'm not sure of what you're trying to do, but if you want to know where an item is, just call GetItemRect().
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Hello,
I'm searching the last free version of the BCGControlBar.
I think it is the 4.7
Can somebody send it to me ?
thanks,
Stephane
|
|
|
|
|
I think the last free version was 4.75. I should have it somewhere on my disk, but do not know exactly where. However, I could easily fetch 4.73/4.74 for you.
You may however use the 5 series for the cool new features, and be supported too.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
Hi!
How do I make an edit box only validate it's contents when
hitting the enter key? The edit box is attached to a
variable, and I only want the variable to get updated when
I hit enter.
Something that's not necessary, but a "nice to have" would be
doing the same thing for the tab key. Besides doing the
validation, it would also tab over to the next control.
Steve
|
|
|
|
|
You need to use the OnKeyDown. When you detect the Enter, you can validate the Edit.
Cheers!!!
Carlos Antollini.
|
|
|
|
|
The usual way of doing this is to handle validation in the OnKillFocus method call for that object. Then, hitting Enter (which will submit the dialog if the edit control is on a dialog) or hitting Tab (which will go to the next field in the tab order if if the edit control is on a dialog) will both kick-off that event.
If you're rolling your own interface in a non-dialog setting, you should be subclassing the parent window to pre process all the messages that come through your main window proc, and that would be where you would do Enter and Tab key handling (and other key for that matter).
|
|
|
|
|
Does anyone know of a technique to "raise events" between two class objects? For example I have class A and Class B, I make a change to one of the member variables in class B, could be 20 of them, how do I notify class A of the change so it can see what has changed and act accordingly? Sort of of like Windows WinProc?
Here are some simplistic ideas I have come up with
1. Create a system timer within class A and have it poll a "isDirty" variable in B and that is when it knows something is amiss.
2. Create a message queue in class A that B would send things too, and when A has a chance respond to the message.
3. Give up C++ programming and go back to Visual Basic (Not that I can do what I need to do within VB)
I don't prefer C because that might weigh heavily on system performance, and 2 seems more complex than it should, and I am definitely trying to avoid 3 !
So if any C++ gurus can give me a hint or point me in the right direction I would be mighty appreciative of yous. <g>
Sam C
----
Systems Manager
Hospitality Marketing Associates
|
|
|
|
|
Don't use the timer for such thing. It is bad .
Take a look at the "Observer" design pattern (I think there is an article on it on CodeProject). This is the way to go. Basically, you subscribe objects ("event sinks") to an object that raises events.
I vote pro drink
|
|
|
|
|
Dang that was a fast response
I can see not many people want me to go with option 3 either <g>
Let me take a look at the observer design pattern. Thanks again for the quick response.
Sam C
----
Systems Manager
Hospitality Marketing Associates
|
|
|
|
|
|
Thanks for the respone and the URL I'll take a look at it, and thanks for helping me avoid option 3!
Sam C
----
Systems Manager
Hospitality Marketing Associates
|
|
|
|
|
The only way is to go with (3). Give up this C++ thing and code in VB. If you care for performance, implement time-critical things in assembly
I've heard that there's a group of open source programmers working on porting VB to Linux, so you'll be able to quickly adapt your app to this wonderful OS.
I think now I'm going to reply to my own posts
To Chris Maunder - do I qualify for 'The Most Stupid Post in VC++ Forum' award? Like CP Mug with Bob?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Actually, you qualify for the 'Most clever post in VC++ forum' award
Now, let's be serious. I've read that in VC++ 7.0 we have new keywords ( _event, I think) that enables "unified event handling". Of course, it is a non-standard extension. How do you like that?
I vote pro drink
|
|
|
|
|
Is this keyword usable outside of .NET world? I mean, they have something called Managed C++ which introduces new keywords like __gc and others.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
As far as I know, it has nothing to do with MC++. It is for the "native" code.
I vote pro drink
|
|
|
|
|
I know MC++ supports __event keyword (not _event as you said) to declare events through delegates, but I'm not aware that any such keyword exists in native C++.
// Fazlul
Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com
|
|
|
|
|
If you have VS .NET Beta 2, take a look into documentation (I found this info there). I'm pretty sure, they added this "unified" event approach to native C++.
I vote pro drink
|
|
|
|
|
I knew I should've stuck with Visual Basic it rules!!! None of the complexities that are associated with C++ and chicks love it :-P
Yeah right!
Sam C
----
Systems Manager
Hospitality Marketing Associates
|
|
|
|
|
As for complexities, I don't think VB is much simpler than C++, when you have "big" projects (I've tried both).
As for chicks, I'm happily married, so this argument is also not valid for me.
I vote pro drink
|
|
|
|
|
Actually the comment was directed towards Tomasz, but since you replied...
We'll I have developed a ColorFORTH version of Internet Explorer and I'm happily divorced! Take that!
(gg)
Sam C
----
Systems Manager
Hospitality Marketing Associates
|
|
|
|
|
I give up. VB is definitely better.
I vote pro drink
|
|
|
|
|
Hello everyone,
Does anyone know if there is any simple way to change the font for menus from MS Sans Serif to Tahoma, as is done in Office 97?
If it is necessary to use owner-drawn menus, is there any way I can just change the font and then let default drawing take place?
Thanks very much,
Stephen Wilson
|
|
|
|
|
|
I posted a question a few days back about WM_COPYDATA.. I have a console app that needs to send CString data to several other apps with the same .exe name.. When I do the WM_COPYDATA I need all the other dialogs to look at the CString data and determin if the msg was intended for it (is this possible?).. I tried changing the window text name of the dialogs using ::SetWindowText("blahblah").. but when I send the msg to "blahblah" unless it is the first opened dialog box he will not see the msg.. is there a way to WM_COPYDATA from one app to several apps with the same .exe name?
Thanks,
Mike
|
|
|
|