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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
A

AglaiaMasaki

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

Posts

Recent Best Controversial

  • Is there a tool for simple multi user access test?
    A AglaiaMasaki

    I found the tool program I needed, and it's name was "Jmeter"
    :-D http://jakarta.apache.org/jmeter/ I could get multi access performance result report easily by using this. Thanks!

    May the sky bring you a full measure of health and prosperity.

    Web Development java csharp html apache com

  • Is there a tool for simple multi user access test?
    A AglaiaMasaki

    Hello. I have a web application which is based on JAVA/JSP, Apache Tomcat Server and this application is working fine. Now I have to test this for when many users visit this web site. There is no complex test condition, and I just need to open many web browsers(IE) and access this site at the same time. At the first time, I tried to do this test manually(using mouse and enter key), and soon found it's not a good idea. So I searched for hours and found some utility programs. But they are only for .NET project or too difficult and complex to use. I read some manuals but I couldn't find out how to solve my problem. Is there a tool for simple multi user access test? Or could you please tell me how I can use these tool programs for this case? Or please let me know the keyword I need to search / where I can visit. (I visited the site : http://www.softwareqatest.com/qatweb1.html#FUNC and if you know one of the list is suit for my case, please let me know.) Thank you for reading this. :)

    May the sky bring you a full measure of health and prosperity.

    Web Development java csharp html apache com

  • A dialog with button controls does not have focus OnKeyDown
    A AglaiaMasaki

    Your advice greatly helped me. I think you were busy, nevertheless, you helped me. Thank you very much. :) I am using the PreTranslateMessage method like this :

    #define SPACEBAR 32
    ...
    BOOL C~~Dlg::PreTranslateMessage(MSG* pMsg)
    {
    if(pMsg->message == WM_KEYDOWN) {
    if(pMsg->wParam == SPACEBAR)
    OnKeyDown(SPACEBAR, 1, 57);

    And when I press down spacebar, my OnKeyDown function is called. :-D Yet there remains a little problem that the button is still being clicked. I am trying to find the solution now. If I find good ideas, I will post it on this post. Have a nice day! :)

    May the sky bring you a full measure of health and prosperity.

    C / C++ / MFC

  • A dialog with button controls does not have focus OnKeyDown
    A AglaiaMasaki

    I tried and the button control seemed losing its 'focus', but when I pressed spacebar, the button was still clicked. (The problem is that my action(pressing the key) didn't call the OnKeyDown function because of the buttons. Once I removed the buttons for test, the program worked well. Yet I have to add buttons.) Anyway, thanks for your answer. If you have any ideas, please let me know. :)

    May the sky bring you a full measure of health and prosperity.

    C / C++ / MFC

  • A dialog with button controls does not have focus OnKeyDown
    A AglaiaMasaki

    Hello. At the first time, I made a dialog with OnKeyDown function and there was no control on the dialog. My OnKeyDown function worked well. I pressed a key(spacebar) and OnKeyDown function was called. :) Next, I made some CButton controls on the dialog. And I soon noticed something wrong, OnKeyDown had no effect. I found the reason. One of the button controls had focus automatically, and when I pressed spacebar that button was clicked. :omg: (If there was no control on the dialog, that action would call OnKeyDown function.) So I added the code "AfxGetApp()->m_pMainWnd->SetFocus();" in OnInitDialog, yet that seems ineffective. I want to make the dialog grab 'keydown' focus like the first time, not the button control. I need ideas and advice. Thank you for reading this.

    May the sky bring you a full measure of health and prosperity.

    C / C++ / MFC

  • Using DC in added class (outside CView class)
    A AglaiaMasaki

    What I meant was : In MFC single document, I want to show Text on main window. And I also want this function to be operated in my 'own' class(which is a derived class of CWnd), not in CView class. Pallini's answer is the best solution to my question (how nice of him/her :)). It works well. And now I've found another solution.

    void CMyclass::memfunc()
    {
    AfxGetApp()->m_pMainWnd->GetDC()->TextOut(x, y, "..");
    }

    Thank you for your kind answer.

    May the sky bring you a full measure of health and prosperity.

    C / C++ / MFC c++ help learning

  • Using DC in added class (outside CView class)
    A AglaiaMasaki

    Thank you so much! You saved me! :)

    May the sky bring you a full measure of health and prosperity.

    C / C++ / MFC c++ help learning

  • Using DC in added class (outside CView class)
    A AglaiaMasaki

    Hello. I can use CClientDC and its TextOut function in C~~View class. It's quite simple like this:

    void C~~View::OnLButtonDown(UINT nFlags, CPoint point)
    {
    CClientDC dc(this);
    dc.TextOut(x, y, "..");
    }

    Yet when I use this function in my 'added' class, which is not derived class of CView, an error occurs. like this:

    void CMyclass::memfunc()
    {
    CClientDC dc(this);
    dc.TextOut(x, y, "..");
    }

    So I changed the code like this:

    \[C~~View.cpp\]
    

    void C~~View::OnLButtonDown(UINT nFlags, CPoint point)
    {
    CClientDC dc(this);
    CMyclass myclass;
    myclass.memfunc(dc);
    }
    [CMyclass.cpp]
    void CMyclass::memfunc(CClientDC dc)
    {
    dc.TextOut(x, y, "..");
    }

    And errors still occur. Of course, I linked the header file of my class to C~~View.cpp. I want to display Text or Images on window with code in 'my class'. Please give me advice or ideas. Thank you.

    May the sky bring you a full measure of health and prosperity.

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

  • Don't have an account? Register

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