Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

AslFunky

@AslFunky
About
Posts
8
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • weird behaviour with escape character
    A AslFunky

    Hi, I too dont have any correct idea, but you can try doing one thing. try clearing the output stream, perhaps using something equivalent to fflush(stdin) or a flushall before couting anything. Hope that helps. Bye. AslFunky

    C / C++ / MFC csharp c++ hardware lounge

  • Serialization
    A AslFunky

    HI people;), Please help me out with this one. I was working on a project for creating a Text Editor. Everything was going on fine, until i serialized my data. What i am doing is that i have an CArray of CString, so that a particular index in the array represents one line of the text-editor. While serializing, i have to use a loop to write the CString of every index of the array to a file. But the problem with serializing is that it breaks out of the loop, when it encounters a \n. In my program, each line is ended by a \r\n. I have even tried using Write of CArchive. But it doesn't work. Is there any way in which i could serialize my data to the file? :((Help.... SOS.....:(( :)Thanks in advance.:) AslFunky

    C / C++ / MFC help database data-structures json question

  • Key messages in Dialog app
    A AslFunky

    Oh, you got it all wrong. What i meant was, which class's PreTranslateMessage() should i override, since PreTranslateMessage() is a virtual function in three classes. Anyway, i have got the answer, we must override the CWnd class's function. ;) Thanx a lot for helping me out. That was a real relief ;) /--------\ |AslFunky| \--------/

    C / C++ / MFC game-dev help

  • Key messages in Dialog app
    A AslFunky

    Hi, thanx for replying. Yes, i have tried using SetFocus(), but that doesn't work. Anyway, Arsalan Malik has given the right solution. We must override the virtual function PreTranslateMessage() of the CWnd class. In this code we have to return a TRUE for the keydown messages if they are VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT. These are stored in the HIWORD and LOWORD of the message of the lpMsg paramater. Please refer to MSDN if you cannot get this. It is quite clear there. Thanx anyway. Bye /--------\ |AslFunky| \--------/

    C / C++ / MFC game-dev help

  • Key messages in Dialog app
    A AslFunky

    Thankx for replying. I think i am understanding what you are talking about. I have checked the MSDN and it has three versions of PreTranslateMessage(), namely: CWinApp, CWinThread and CWnd. It certainly cannot be CWinThread. Which of the remaining two should I handle? I hope it is the CWinApp! Can i do it as: BOOL bHandleNow = FALSE; switch (lpmsg->message) { case WM_KEYDOWN: switch (lpmsg->wParam) { case VK_UP: case VK_DOWN: case VK_LEFT: case VK_RIGHT: bHandleNow = TRUE; break; } if (bHandleNow) OnKeyDown(lpmsg->wParam, LOWORD(lpmsg ->lParam), HIWORD(lpmsg->lParam)); break; } return bHandleNow; Please, it would be a lot of help. ;)Thanx in advance;)! AslFunky

    C / C++ / MFC game-dev help

  • Key messages in Dialog app
    A AslFunky

    Hi guys :-O, the other day i was developing a game(the snake game, as in Nokia cellphones) in a dialog based application. I encountered a serious problem X| , when i wasn't able to track the keyoard events for the arrow keys(VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN). I have used all possible means, like OnKeyDown() and OnChar() but there is no result:eek:. Can anyone tell me where i am going wrong. ;)Thanx in advance.;) AslFunky

    C / C++ / MFC game-dev help

  • Multithreading
    A AslFunky

    Hi thanx for replying,;) Is it necessary to do my stuff in a worker thread? Actually i am a little nervous in creating a worker thread. i always have one confusion, how will i assign any job to a function which is not a member of my class. I mean, how will this function UINT threadproc(void* para) be able to access the members of my class when it is not a member of my class. Can you please elaborate on this point. Thanx in advance. AslFunky

    C / C++ / MFC c++ help

  • Multithreading
    A AslFunky

    Hi guys, i am new to multithreading in MFC. I have gone through many of the examples posted on CodeProject, but i am still not satisfied. What i want to know is that, suppose i have my window, and i want to create a thread which, say, takes care of all the keyboard inputs, another thread which takes care of all the mouse inputs. So far whatever examples and tutorials i have gone through first create a new window using a thread and then control all the operations. I want my parent window to have a thread to do all those stuff. Can anyone help me out. :)Thanx in advance!:) AslFunky

    C / C++ / MFC c++ help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups