|
this code would not budge because you are trying to add the strings to some objects which aren't even created, forget about the initialization which is manatory for the working of the gui object
The Debugger
|
|
|
|
|
I thought I read somewhere (yeah I know, real scientific.....) that static controls are available as soon as the dialog box they live in is instantiated. Combo boxes call malloc when they are created and contain pointers internally. Trying to call them before they are properly initialized will crash you.
I'm going to live forever or die trying!
|
|
|
|
|
I am looking for a way to get the mouseleave/mouseout method
for my activex control. When I test with ActiveX container tester
mousemove can get the event when it is on the control.
However, once the mouse is out of control, i don't get anything.
Thank you for help
Shin
|
|
|
|
|
You can use the TrackMouseEvent[^] API.
It only works on Win98 or above, so if you need Win95 compatibility, you'll have to simulate MouseLeave using a timer: Start the timer when the mouse is first moved into the control. In the timerproc, use GetCursorPos to see if the cursor is outside of the window. If it is, fire a MouseLeave event, and stop the timer.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Cool! I wish I'd known about that. The number of times I've used SetCapture() and tested the location of the mouse cursor...
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Thanks for the helpfull post
How to use this TrackMouseEvent?
I have been looking for and
they said I have to add
#define _WIN32_WINNT 0x0400
this line. Still said TrackMouseEvent
is not defined. So I added #include <winuser.h>
the result is the same....
|
|
|
|
|
Hi, all
I am planning on an http web server, and I have read some of the I/O completion and multithread server articles, but I really don’t understand why anyone would develop a multithread server? Would it just make it more difficult and slow, because of all the critical sections that have to be thread-safe? Why use worker threads that loops until a service is requested. Can’t you just use completion callback and windows message-based notification of network events to serve connected users? What’s the point of using multiple threads in a server?
My server is going to run on older windows versions (95/98/ME) so I have to handle the worker threads (if I should use them) and connection sockets by my self, and of course the server has to support at least 500 user connections simultaneously.
Anyway, I really don’t see any performance advantage by using multiple threads, so please tell me what I am missing because it seems like everyone is using it.
Thanks in advance
Aidman » over and out
|
|
|
|
|
Aidman wrote:
windows message-based notification of network events to serve connected users? What’s the point of using multiple threads in a server?
This is slooooow, and needs a Window which most servers dont have
Aidman wrote:
My server is going to run on older windows versions (95/98/ME) so I have to handle the worker threads (if I should use them) and connection sockets by my self, and of course the server has to support at least 500 user connections simultaneously.
500 users at the same time on Win9x, interesting
Aidman wrote:
Anyway, I really don’t see any performance advantage by using multiple threads, so please tell me what I am missing because it seems like everyone is using it.
Normally I use asynchronous socket, or if on NT based systems, IO Completion Ports.
A limited number of threads is a good thing, it makes the application scale on multi-CPU computers, a single threaded server only uses a single CPU.
And also, when a thread is "suspended" when waiting for IO like disk or network activity, it's good to have extra threads to keep the processor(s) working (if there is work to do, of course)
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Multiple threads buy you nothing as long as you don't have an extra CPU available.
Oh and if you are never waiting on resources.
Well, such as reading a file.
Then multiple threads buy you everything.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Thanks for your replys, but I am still a bit confused
Are windows message-based notification of network events really slow? Can't they serve connected users, like reading from disk or sending data?
If I should have say up to 100 users connected to my server simultaneously, how is the best way to serve them? worker threads, windows message-based notification or somthing else?
And also, is it better to let threads loop until data is recieved or to use windows message-based notification?
Aidman » over and out
We haven't inherited Earth from our parents, instead we have borrowed her from our children; an old Indian saying.
|
|
|
|
|
forget window-message notification for a number of users up 100. It`s going to kill you machine
Sincerely yours, Ilya Kalujny.
|
|
|
|
|
Hello all
How to enable context sensitive help button(?) for CPropertySheet. I selected "Context Help" under Extended Styles for property sheet as well as property pages of that sheet. But when I ran the application the help button is not shown.
If anyone knows how to enable it, pls help me.
Thanks for your help.
Hari.
|
|
|
|
|
CPropertyPage DlgProperties;<br />
DlgProperties.m_psp.dwFlag |= PSH_HASHELP | PSP_HASHELP;
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
Hello Ted
Thanks for the reply. I have five property pages added to property sheet. I added <object>..m_psp.dwFlag |= PSH_HASHELP | PSP_HASHELP; for all the property pages but when I ran the app the help button(?) is still not showed up.
I selected system menu, context help properties for all the property pages and property sheet also.
Any clue on how to get this help button to show up.
Thanks for your help
Hari.
|
|
|
|
|
propSheet.m_psh.dwFlags |= PSH_NOAPPLYNOW | PSH_PROPTITLE | PSH_HASHELP ;
I forgot to add this line
That should make it work, I hope
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
Hi,
Did you get this working, ive got the same problem.
Cheers,
Andy.
|
|
|
|
|
I need to create flat looking dialog box with close button and caption.
It is Pop up window. I tried creating it with Border option "None" but then it does not give close button and caption? What do I do to get completely flat dialog box (No 3D look)?
|
|
|
|
|
Are you calling Enable3dControls() or Enable3dControlsStatic() in your CWinApp's code?
|
|
|
|
|
I am using this...
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
I have linked MFC statically...
To understand what kind of dialog box i need please see screen shot http://www.bitdefender.com/bd/site/support.php?menu_id=13&f_id=1
I need dialog box something like these
|
|
|
|
|
mfclearner wrote:
I am using this...
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
So remove it.
|
|
|
|
|
Removing above statements did not make any difference
|
|
|
|
|
The screenshots from the link you gave look absolutely like an owner drawn window.
So, for example you can remove the regular borders and caption and painting your own non-client area. For sure you must simulate the non-client events so your "skinned" app behaves like a regular app (e.g. moving the window around by clicking and holding the LButton on the caption,...).
Looking at bit more at the screenshots, the background of the dialog and the buttons are also skinned. Skinning the background is easy and for the buttons you can use e.g. http://www.codeproject.com/buttonctrl/cxskinbutton.asp?target=cxskinbutton[^]
In a few weeks, I will release a small shareware app, that also uses this owner drawn technique (combined with regions)... if you want to see a sample screenshot to see what can be done go to: http://www.oddgravity.de[^] (Sorry, until now I had no time for building my site )
|
|
|
|
|
Windows won't do that for you. You will have to do all the drawing yourself.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
DavidCrow wrote:
Are you calling Enable3dControls() or Enable3dControlsStatic() in your CWinApp's code?
David
I believe both of those calls are now obsolete and are now left only for backwards compatibility. I do not think they have any actual effect on what your windows and dialogs look like
Nish
"I'm a bit bored at the moment so I'm thinking about writing a new programming language" - Colin Davies
My book :- Summer Love and Some more Cricket [New Win]
Review by Shog9 Click here for review[NW]
|
|
|
|
|
With VS6, they have a major effect. Leave 'em out and you get a pretty vanilla dialog.
|
|
|
|