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
J

jazzkiller

@jazzkiller
About
Posts
9
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Access to its caller from a Dialog
    J jazzkiller

    Hi K, I finally passed a MyView pointer to CDialog through constructor. Thus, I can access MyView member functions from CDialog. However, when I clicked OK on the Dialog, the program crashed. My guess is that I don't know how to delete the *pView that I passed to Dialog. I delete it in the contructor Dialog destructor). Any thought? By the way, it is a Modal dialog. Thanks,

    C / C++ / MFC question graphics

  • Access to its caller from a Dialog
    J jazzkiller

    Thank you K, I finally passed a pointer of MyView to Dialog and access functions in MyView such as Invalidate and other member functions through this pointer. Thanks,

    C / C++ / MFC question graphics

  • Access to its caller from a Dialog
    J jazzkiller

    Do I define WM_APP message in View and from Dialog I do: this->SendMessage(WM_DO_STUFF,0,0)? I did that, but it didn't work out. Thanks

    C / C++ / MFC question graphics

  • Access to its caller from a Dialog
    J jazzkiller

    Hi all, Inside a View class (CChildView), I call CDialog. The Dialog pops up. Now, how can I talk to the CChildView while the Dialog still shows? Say CChildView display a bitmap; in my dialog, I change the zoom parameter to 2x, I want the image to reflex the change immediately in the CChildView. Thank you in advance,

    C / C++ / MFC question graphics

  • Image flickers when Invalidate() is called.
    J jazzkiller

    This is all in my OnPaint() of a CChildView: CPaintDC dc(this); // device context for painting CDC* pDC = &dc; // Convert to context device pointer HDC hdc = pDC->GetSafeHdc(); // Prepare Header for image BITMAPINFO *m_pBitmapInfo; m_pBitmapInfo = (BITMAPINFO*)new char[sizeof(BITMAPINFO) + sizeof(RGBQUAD)*256]; // Load header m_pBitmapInfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); m_pBitmapInfo->bmiHeader.biWidth = ImX; m_pBitmapInfo->bmiHeader.biHeight = -ImY; m_pBitmapInfo->bmiHeader.biPlanes = 1; m_pBitmapInfo->bmiHeader.biBitCount = 8; m_pBitmapInfo->bmiHeader.biCompression = BI_RGB; m_pBitmapInfo->bmiHeader.biSizeImage = 0; m_pBitmapInfo->bmiHeader.biXPelsPerMeter = 0; m_pBitmapInfo->bmiHeader.biYPelsPerMeter = 0; m_pBitmapInfo->bmiHeader.biClrUsed = 256; m_pBitmapInfo->bmiHeader.biClrImportant = 0; int i; for ( i = 0; i < 256; i++ ) { m_pBitmapInfo->bmiColors[i].rgbBlue = i; m_pBitmapInfo->bmiColors[i].rgbGreen = i; m_pBitmapInfo->bmiColors[i].rgbRed = i; m_pBitmapInfo->bmiColors[i].rgbReserved = 0; } // Stretch pixels out to screen StretchDIBits(hdc, xCord,yCord,ImX,ImY, 0,0,ImX,ImY, img, //------->>> Pointer to array of bits, a CChildView variable member. m_pBitmapInfo, DIB_RGB_COLORS, SRCCOPY);

    C / C++ / MFC data-structures business tutorial question

  • Image flickers when Invalidate() is called.
    J jazzkiller

    Hi, I have tried to override OnEraseBkgnd, the problem still occurs. I am writing and ViewLCD application for a camera (just like a digital camera with an LCD at the back to view the scene that the camera is pointing to). Thanks,

    C / C++ / MFC data-structures business tutorial question

  • Image flickers when Invalidate() is called.
    J jazzkiller

    Hi all, I was able to display an raw image (8bit per pixel) using StretchDIBits method. However, my OnPaint() is called alot so the image is flickering like crazy. How can I get rid of this flickering business. I've read tutorials on double buffering, however, I still don't understand how to apply it to this case where the image is from an array of bytes. Thanks,

    C / C++ / MFC data-structures business tutorial question

  • Get out of infinite loop question!
    J jazzkiller

    Hi all, I am writing a program that continuously stores data from an external memory. while(isConnected) { // Do stuff over here }// end while However, when it runs, it takes all the memory (program is not responded). I have another button (Stop) to call method to set isConnected to False in order to get out of the loop. However, I didn't even have a chance to hit that button because the program is freezed. Any suggestions? Thanks.

    C / C++ / MFC question performance

  • Display Raw Image on the fly
    J jazzkiller

    Hi all, I am capturing an image through a camera. The camera returns a pointer to a two dimensional array of pixels. How can I go about displaying these pixels into MFC? (Just like a webcam or a camera with an LCD does) I have read tutorials on displaying .bmp using CBitmap ... However, will MFC understands the raw image file (no header, each pixel has 8bit grayscale). I appreciate all of your help. Thanks, Beou

    C / C++ / MFC question c++ data-structures 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