Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: LifeIsSuffering

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Problem while overriding CChildFrame::PreTranslateMessage

    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...
  2. Re: GetTextExtentPoint32 is really slow on Windows Mobile, any alternative?

    @OReubens
    thx, I didn't realize how performance test is supposed to be so sophisticated. I'll try further test.
  3. Re: GetTextExtentPoint32 is really slow on Windows Mobile, any alternative?

    @olivthill2
    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.

    You all...
  4. GetTextExtentPoint32 is really slow on Windows Mobile, any alternative?

    I wrote a simple demo below to discover why GetTextExtentPoint32 is slow,



    void CSmartGetTextExtentDlg::OnBnClickedButton1()
    {
    // TODO: Add your control notification handler code here
    ...
  5. Re: How to optimize painting while scrolling (flickering problem)?

    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...
  6. How to optimize painting while scrolling (flickering problem)?

    To simplify scrolling operation, I built my own CScrollableWnd, which acted just as a container window, and took advantage of this CScrollHelper...
  7. Re: Question on CWnd::PreTranslateMessage

    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...
  8. Question on CWnd::PreTranslateMessage

    Here’s my code sample,



    BOOL XBaseWindow::PreTranslateMessage(MSG* pMsg)
    {
    // TODO: Add your specialized code here and/or call the base class
    switch (pMsg->message)
    {
    case...
  9. Confused with directly deleting CWnd-derived object

    I've read this post, "Destroying Window Objects"
    http://msdn.microsoft.com/en-us/library/5zba4hah.aspx

    But that got me more confused.

    As it said, if I add auto-cleanup to my own CWnd-derived...
  10. Re: How do I understand PreTranslateMessage

    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...
  11. How do I understand PreTranslateMessage

    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,
    1. does...
  12. Re: How to awake main UI thread from another thread?

    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...
  13. Re: How to awake main UI thread from another thread?

    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...
  14. Re: How to awake main UI thread from another thread?

    Hi Alex_F,

    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...
  15. How to awake main UI thread from another thread?

    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)
    {
    //...
  16. Re: Request an algorithm, convert a string to a unique int

    thanks Lindley and treuss, a hash algorithm may be what I'm looking for...
  17. Re: Request an algorithm, convert a string to a unique int

    I mean that convert a string to an int, which would be unique, different from other ints generated by different strings
  18. Re: Request an algorithm, convert a string to a unique int

    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...
  19. Request an algorithm, convert a string to a unique int

    I need to convert a string to a unique integer, and better it's thread safe. Is that possible? How to?

    Thanks.
  20. Re: How to choose, Dialog-based app, MDI app, or common window app?

    VC8. Any comment?

    Sorry for so late reply. I already got a working MDI app. It works well so far.
  21. Re: How to choose, Dialog-based app, MDI app, or common window app?

    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.
  22. Re: How to choose, Dialog-based app, MDI app, or common window app?

    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...
  23. Re: How to choose, Dialog-based app, MDI app, or common window app?

    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.
    ...
  24. Re: How to choose, Dialog-based app, MDI app, or common window app?

    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...
  25. How to choose, Dialog-based app, MDI app, or common window app?

    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...
Results 1 to 25 of 52
Page 1 of 3 1 2 3


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center