Type: Posts; User: LifeIsSuffering
Search took 0.01 seconds.
November 23rd, 2010, 02:09 AM
In a simple MDI application, I tired to override CChildFrame::PreTranslateMessage to pre-process some events or just drop them if meet some condition. However, I found that all events were received...
November 18th, 2010, 09:04 PM
thx, I didn't realize how performance test is supposed to be so sophisticated. I'll try further test.
November 17th, 2010, 08:36 PM
Caching a table of widths of characters didn't include inter-spacing and others like what @OReubens said. But it would be a simple way and probably fit for many cases.
November 17th, 2010, 02:32 AM
I wrote a simple demo below to discover why GetTextExtentPoint32 is slow,
// TODO: Add your control notification handler code here
October 27th, 2010, 03:51 AM
I did set WS_CLIPCHILDDREN, not really helped.
Actually I don't care how many WM_PAINT was sent there, WM_PAINT is lowest priority message and is supposed to be combined by system.
Now I got...
October 25th, 2010, 01:25 AM
To simplify scrolling operation, I built my own CScrollableWnd, which acted just as a container window, and took advantage of this CScrollHelper...
June 18th, 2010, 08:43 PM
You are correct. I know that's expected behavior.
However, what I'd like to do is to handle mouse & kb messages before they get dispatched to target window and optionally determine if they should...
June 18th, 2010, 02:30 AM
Here’s my code sample,
BOOL XBaseWindow::PreTranslateMessage(MSG* pMsg)
// TODO: Add your specialized code here and/or call the base class
April 21st, 2010, 07:56 AM
I've read this post, "Destroying Window Objects"
But that got me more confused.
As it said, if I add auto-cleanup to my own CWnd-derived...
April 1st, 2010, 10:25 PM
So PreTranslateMessage for app class gets higher priority than which for each CWnd, right?
Suppose that I write a PreTranslateMessage for app class and a PreTranslateMessage for one CWnd, they will...
April 1st, 2010, 09:33 PM
My intention is to intercept some messages and to determine if it should be dispatched to window.
Then I chose PreTranslateMessage.
Still I'm a little suspicious if I got it right,
February 23rd, 2010, 08:14 PM
The cost required to change my application to multi-thread mode.
Sure. Essentially, running my event loop in OnIdle was really bad design.
Now, I must think about refactor app structure as...
February 23rd, 2010, 01:00 AM
OnIdle gets its returned value, from MSDN,
That's the reason why I have to wake up main thread.
I can't return TRUE all the time, that made 100% CPU.
On the other side, running my own loop...
February 22nd, 2010, 09:00 PM
My point is that after my main thread sent a http request and then it went into suspended state, since there's no any input event, next, when http thread notified main thread via an...
February 22nd, 2010, 02:40 AM
Briefly, my application contains a main UI thread, and an internal event loop. I overrode CWinApp::OnIdle to run my own event loop, it looks like,
BOOL CMyApp::OnIdle(LONG lCount)
January 10th, 2010, 08:21 PM
thanks Lindley and treuss, a hash algorithm may be what I'm looking for...
January 8th, 2010, 04:49 AM
I mean that convert a string to an int, which would be unique, different from other ints generated by different strings
January 7th, 2010, 11:43 PM
thanks, but I didn't think that work for my case.
I mean "unique", that means the resulting integer should be unique from different strings, even from different character sequence.
I know it may...
January 7th, 2010, 09:13 PM
I need to convert a string to a unique integer, and better it's thread safe. Is that possible? How to?
December 1st, 2009, 12:12 AM
VC8. Any comment?
Sorry for so late reply. I already got a working MDI app. It works well so far.
November 25th, 2009, 12:04 AM
Thanks JohnCz and all.
That's right, in any option, I should try further to manage all views, layout, msg handling, maybe still other things, override default framework functionality.
November 23rd, 2009, 11:31 PM
Thanks your lenthy reply.
Now I selected MDI architecture, since I do really need multiple frames, and further multiple views co-exsited under same frame (views coexist in some pattern). There's...
November 20th, 2009, 11:39 PM
Not yet. There would be an external data source which I could read, parse and generate views accordingly, but I don't need to save them. I'm sure that won't be single-doc/multi-views relationship.
November 20th, 2009, 01:56 PM
Thanks a lot.
For item 3, sure, I won't make my wheels all from scratch. If I need a custom editbox, I could have CEdit-derived control, but if there's no appropriate common control, I have to build...
November 20th, 2009, 01:06 PM
I'm designing my app by using of MFC, I'm not quite familiar with MFC framework, my background is some Win32 and WinForms experience. Right here I got some designing issue, and I'm trying to get help...
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.