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
G

gurucplusplus

@gurucplusplus
About
Posts
31
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how can I clear overlay after using transparentblt
    G gurucplusplus

    Yes, I draw to the screen. I add WM_PAINT message handler OnPaint() as you suggested as shown CMyView::OnPaint() { CPaintDC dc(this); // device context for painting OnPrepareDC(&dc); OnDraw(&dc); } And OnDraw(CDC pDC) I have GDI method to draw image on screen that always works. After I implement OnPaint(). It still doesn't redraw image underneath the red. Please Help!

    C / C++ / MFC question

  • how can I clear overlay after using transparentblt
    G gurucplusplus

    paintMemory is a memory DC. Let do an example. I implement the following: painMemory.FillSolidRect(0,0,BitmapWidth,BitmapHeight(),RGB(255,0,0)); ::TransparentBlt(pDC->GetSafeHdc(),m_upperLeftX, 0,BitmapWidth,0,BitmapHeight, paintMemory.GetSafeHdc(),0,0,BitmapWidth,BitmapHeight,RGB(0,0,0)); // At this point I see the overlay image is red. // Then next is try to clear this overlay painMemory from red to RGB(0,0,0) painMemory.FillSolidRect(0,0,BitmapWidth,BitmapHeight(),RGB(0,0,0)); ::TransparentBlt(pDC->GetSafeHdc(),m_upperLeftX, 0,BitmapWidth,0,BitmapHeight, paintMemory.GetSafeHdc(),0,0,BitmapWidth,BitmapHeight,RGB(0,0,0)); // At this point I still see the overly image is red instead of black I need solution for this ASAP. Thanks

    C / C++ / MFC question

  • how can I clear overlay after using transparentblt
    G gurucplusplus

    For my application, I display paintMemory using ::transparentBlt in red using paintMemory.SetPixel(point(x,y),RGB(255,0,0)) But I don't know how to clear this paintMemory to transparency by reseting paintMemory.SetPixel(point(x,y),RGB(0,0,0)). I have an greyimage display in the background and would like to paint an color image using paintMemory to paint a color on top of this image without destructing the content of the greyimage. Once I draw complete I would like to see this greyimage background back by clearing the painMemory by setting color of paintMemory pixel back to color RGB(0,0,0). But It doesn't work.

    C / C++ / MFC question

  • how can I clear overlay after using transparentblt
    G gurucplusplus

    I am not sure what you mean? Can you give me an example?

    C / C++ / MFC question

  • how can I clear overlay after using transparentblt
    G gurucplusplus

    I use transparentblt to display an overlay color image? ::TransparentBlt(pDC->GetSafeHdc(),upperLeftX, upperLeftY, width, height, paintMemory.GetSafeHdc(),0,0,width,height,RGB(0,0,0)) ; where paintMemory is contains color pixels using method call paintMemory.SetPixel(CPoint(x,y),RGB(255,0,0); the color image is display correctly. How can I clear this overlay?

    C / C++ / MFC question

  • create c++ class library DLL in visual studio 2005
    G gurucplusplus

    I am new ot visual studio 2005. I want to build c++ class dll. Can any one lead me to good example of how to? Thanks.

    Visual Studio tutorial csharp c++ visual-studio question

  • CDC DrawText
    G gurucplusplus

    Thanks.

    C / C++ / MFC question announcement

  • CDC DrawText
    G gurucplusplus

    So, If my text drawn changes I have to call invalidateRect to mark invalid for the next WM_PAINT message to update the text. Where should I call invalidaterect then? Not in ondraw()? thanks

    C / C++ / MFC question announcement

  • CDC DrawText
    G gurucplusplus

    How can I update this text to graphic without calling invalidateRect()?

    C / C++ / MFC question announcement

  • CDC DrawText
    G gurucplusplus

    Hi, I use CDC* pDC->DrawText(" number ") in OnDraw() to update text to a frame. I then call InvalidateRect(NULL,FALSE) to display the text. What is the better way of display text without calling InvalidateRect() because OnDraw() with InvalidateRect() slow down application quite a lot. Thanks.

    C / C++ / MFC question announcement

  • CFile to read binary file
    G gurucplusplus

    CFile::Read("test.bin",CFile::modeRead) is the mode to read a binary file? or different flag? Thanks

    C / C++ / MFC question

  • CFile to read binary file
    G gurucplusplus

    Does CFile::Read take a binary file?

    C / C++ / MFC question

  • Redraw a pane splitter window
    G gurucplusplus

    I create a SDI appication and split the main frame to rows and columns using CreatStatic()and CreateView() for each of the splitter frame. It works fine. In One of the pane frame, I display the graphic rectangle and text using FillSolidRect(), and DrawText(), and these rectangles and text need to redraw every time to update system status. To do that, I call InvalidateRect(NULL,FALSE) in OnDraw() to redraw this window frame. It is working fine also. But some how by calling InvalidateRect(NULL,FALSE) all of my modal dialogs in my application doesn't work any longer causing my application to hang ( no response from any buttons in toolsbar). If I commented InvalidateRect(NULL,FALSE) all of my modal dialogs work but then the graphic rectangles and text no longer redraw and update. Help!!!!

    C / C++ / MFC help announcement

  • AfxMessageBox stop working after split the frame
    G gurucplusplus

    Thanks for the suggestion. I debug the problem and found that I use InvalidateRect(NULL,FALSE) to redraw the graphic on the right pane in OnDraw(CDC *pDC) of CMyRightPaneView class causing all of my modal dialog to hang mh application. The question is how can I redraw both right and left panes of the splitter pane independently? Help!!!

    C / C++ / MFC c++ help

  • AfxMessageBox stop working after split the frame
    G gurucplusplus

    It's strange. Even the standard MFC "About" dialog box hang the program as well. Not just AfxMessageBox. I could conclude that any pop-up messages dialog hang the program. I did try MessageBox(), it still hang the program. I have a test condition if it's failed pop up the message using AfxMessageBox(). If I comment it out the program will not hang. Help!!!!

    C / C++ / MFC c++ help

  • AfxMessageBox stop working after split the frame
    G gurucplusplus

    Hang to me means the window application never come back and I can not access to any menu in main frame. The progam didn't throw an exception otherwise it should exist program in exception condition. I have to kill the application program through system processes. I am new to MFC. all the help is appreciated. Thanks.

    C / C++ / MFC c++ help

  • AfxMessageBox stop working after split the frame
    G gurucplusplus

    I have a SDI application in MFC. I split the main frame to 2 rows and 1 columm, then further split first row of the main frame to 1 row and 2 columns statically. the following code is added to OnCreateClient(). // split main frame m_mainSplitterFrame.CreateStatic(this,2,1); // further split top main frame to one row and 2 columns m_childSplitterFrame.CreateStatic(&m_mainSplitterFrame,2,1, WS_CHILD | WS_VISISBLE,m_mainSpitterFrame.IdFromColRow(0,0)); //Create view for sub frame m_childSplitterFrame.CreateView(0,0,RUNTIME_CLASS(CMyChildView),CSize(100,100),pContext); m_childSplitterFrame.CreateView(0,1,RUNTIME_CLASS(CMyChildView),CSize(100,100),pContext); // create bottom view m_mainSplitterFrame.createView(1,0,RUNTIME_CLASS(CMyMainView),CSize(100,100),pcontext); retrun TRUE; After I execute my program, all of my AfxMessageBox used to display in SDI frame now hang my program. Help!!!!!

    C / C++ / MFC c++ help

  • AfxMessageBox stop working after split the frame
    G gurucplusplus

    I have a SDI application in MFC. I split the main frame to 2 rows and 1 columm, then further split first row of the main frame to 1 row and 2 columns statically. the following code is added to OnCreateClient(). // split main frame m_mainSplitterFrame.CreateStatic(this,2,1); // further split top main frame to one row and 2 columns m_childSplitterFrame.CreateStatic(&m_mainSplitterFrame,2,1, WS_CHILD | WS_VISISBLE,m_mainSpitterFrame.IdFromColRow(0,0)); //Create view for sub frame m_childSplitterFrame.CreateView(0,0,RUNTIME_CLASS(CMyChildView),CSize(100,100),pContext); m_childSplitterFrame.CreateView(0,1,RUNTIME_CLASS(CMyChildView),CSize(100,100),pContext); // create bottom view m_mainSplitterFrame.createView(1,0,RUNTIME_CLASS(CMyMainView),CSize(100,100),pcontext); retrun TRUE;

    C / C++ / MFC question c++ help

  • AfxMessageBox stop working after split the frame
    G gurucplusplus

    After I split the main frame into 2 row x 1 column. Standard AfxMessageBox no longer displaying and hang the program in MFC. What is the problem?

    C / C++ / MFC question c++ help

  • splitterWnd in SDI MFC
    G gurucplusplus

    Is it true that m_childSplitterFrame.CreateView(0,0,RUNTIME_CLASS(CMyView),CSize(100,100),pContext) means create the view with minimum size of CSize()?

    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