|
Have a look at Jonathan Craig's post above this one. If that doesn't help drop me an email [click on the email button at the bottom of this post] and I'll help you out.
Regards,
Brian Dela
|
|
|
|
|
When the secondary thread finishes up a work unit, it simply needs to post a message to the primary thread (i.e., the one that owns the UI).
|
|
|
|
|
I have a CSpinButtonCtrl control in a dialog box, and a corresponding CEdit control.
If I set the spin button to be "attached" to the CEdit control, the program asserts if I defined a variable associated with the attached CEdit control.
enum { IDD = IDD_MYDIALOG };
CSpinButtonCtrl m_ctrlSpinner;
CEdit m_ctrlEdit;
I looked all over MSDN and didn't see anything about this. Anyone have any clues/experience with this?
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
I've had to do this exact thing very recently, and I didn't have any problems. I have both a spin control and and edit control declared very much like you have them. I don't see any reason for that to assert.
I did find, through a roundabout way, that the edit control needs to follow the spin control in the tabbing order on the dialog. I'm not sure if this documented or not, but I hadn't seen it before. But, apparently, this is how the "attachment" works, by the edit immediately following the spin in tabbing order.
You might check that, and you might make sure exactly why the assertion is failing. I suspect the cause of the assertion isn't simply because of the edit declaration.
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
The spin control has to immediately follow the associated edit control. If I set "autobuddy" to true, the program asserts. If I set it to false, the program, doesn't assert, but I have to handle updting the field myself.
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
In my code, I have the DoDataExchange with both the spin and edit controls included with
DDX_Control (pDX, IDC_SpinControlName, var_name1)<br />
DDX_Control (pDX, IDC_EditControlName, var_name2)
but then also have a member variable in the class that creates the dialog for the edit control value. The DoDataExchange goes to/from the controls to the control variables, but then the owning class needs to go from the conrtol variable to a member variable to be used further (?).
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
That second part made no sense to me at all.
In order to do keep the program from asserting, I have to turn "autobuddy" off in the resource editor, and then call the spin button control "SetBuddy()" function to associate it with the desired edit control.
BTW, I guess I should mention that this is in PocketPC 2002...
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
John Simmons / outlaw programmer wrote:
BTW, I guess I should mention that this is in PocketPC 2002...
Oh, great!! Next you're going to tell me you're using VB!!
I don't have any calls to SetBuddy(), but in the .rc file, the line for the spin control is
CONTROL "Spin1",IDC_ELEV_SPIN,"msctls_updown32", UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS, 143, 212, 11, 14
The magic of dialog editors and wizards, I guess. To me, the connection between spin and edit controls comes from the tab order, and the use of UDS_AUTOBUDDY establishes the connection.
I know this probably isn't much help, and I'm sure it will turn out to be something pretty simple, but getting all those little details worked out is always a PITA.
Good luck.
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
I display popup menu when right clicked on list control. I do not want it in main menu. How to hide it.
I want to display toolbar on dialog box whose buttons map to popup menu . How to do this?
|
|
|
|
|
Read
Programming Windows, Fifth Edition by Charles Petzold
Introduction to MFC Programming with Visual C++ by Richard M. Jones
|
|
|
|
|
I want ot put toolbar on dialog box .
How to do this?
|
|
|
|
|
use a SDI application instead, toolbars are not meant for dialog apps, or for simple dialogs.
anyway, look around here on CP, you'll find what you're looking for.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
I have done database programming . Database used is MYSQL.
The Program updates the database. I want to make it multiuser i.e. In network, program is running on more than one machine. Changes made by
one user should be reflected at other user end.
How to do this?
|
|
|
|
|
Are you referring to a real-time update among all instances of the application? One solution is winsock and multicast.
Kuphryn
|
|
|
|
|
Yes, I am referring to real-time update of all instances of program. This is totally new for me. So can you give me more details or reference to learn this?
|
|
|
|
|
If you really want to learn winsock, I recommend Network Programming for Microsoft Windows, Second Edition by Anthony Jones and Jim Ohmund. There are several good references for winsock.
CodeProject
CodeGuru
Kuphryn
|
|
|
|
|
Hi all of u people
do anyone know what is Brute force algo.
some c++ code pl.
|
|
|
|
|
Its not an algorithm as such, just a name given to any algorithm that does a lot of work and isnt very smart. For example, a brute force password cracker would try every possible combination of letters to break a password, as opposed to a smarter algorithm that attempts to use some statistical method to reduce the actual work.
|
|
|
|
|
hi
do any one know how to code keylogger in c++?
|
|
|
|
|
Are you looking for code that will work in windows or any system that has a C++ compiler? Is MFC ok?
John
|
|
|
|
|
thanks John
MFC will do
yes looking for code
|
|
|
|
|
You need to use SetWindowsHookExA . Have a look in the MSDN for it. You can setup Mouse and Keyboard hooks. You pass it the type of Hook you require and a callback function... You code the Callback function and in there you can log all keyboard strokes.
Regards,
Brian Dela
|
|
|
|
|
thanks Brian Delahunty
what about the windows in which keys are pressed??
|
|
|
|
|
I wanted to receive notification when the tab was selected for this type of property page. Normally an OnSetActive handler could be used for a CPropertyPage, but the COlePropertyPage class doesn't support this method.
I have programmed around it for this particular implementation, but wondered what the "normal" way of detecting this is?
Thanks,
Debbie
|
|
|
|
|
Hi friends.
Is there any way that I can find out ,any running application is busy or hanged or idle?
vikram
|
|
|
|