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

Andrebon

@Andrebon
About
Posts
4
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Clpping Region is Not Operate with Printpreview
    A Andrebon

    Drawing Bitmap on view(DC) with Clipping Region Operate well. But, Drawing On PrintPreview(DC) Don't operate. Please See My Code. CBitmap Bitmap, *pOldBitmap; Bitmap.LoadBitmap(IDB_BITMAP1); CDC MemDC; MemDC.CreateCompatibleDC( pDC ); pOldBitmap = MemDC.SelectObject( &Bitmap ); pDC->SetMapMode( MM_TEXT); CPoint pt[3]; pt[0] = CPoint( 0, 0 ); pt[1] = CPoint( 0, 480); pt[2] = CPoint( 640, 480); CRgn ClipRgn; CRgn rgnRect; rgnRect.CreateRectRgn( 0, 0, 640, 480 ); pDC->BeginPath(); pDC->Polygon( pt, 3); pDC->EndPath(); pDC->StrokePath(); ClipRgn.CreatePolygonRgn(pt, 3, ALTERNATE); ClipRgn.CombineRgn( &ClipRgn, &rgnRect, RGN_AND ); if( pDC->IsPrinting() ) { pDC->SelectClipRgn( &ClipRgn ); pDC->StretchBlt( 0, 0, 1000, 1000, &MemDC,0,0,640,480, SRCCOPY ); } else{ pDC->StretchBlt( 0, 0, 1000, 1000, &MemDC, 0, 0, 640,480, SRCCOPY ); } MemDC.SelectObject(pOldBitmap); MemDC.DeleteDC(); Bitmap.DeleteObject(); I want know How to use SelectClipRgn() function with printpreview state thanks

    C / C++ / MFC graphics tutorial

  • Splash screen on dialog-based?
    A Andrebon

    Hello? First, Make Bitmap Resource, for example IDB_SPLASH Second, Add Next Class to your Project(Dialog-Based) ///////////////////////////////////////////// MySplashWnd.h #if !defined(AFX_MYSPLASHWND_H__08C608F3_1FB3_11D1_830E_58A47E000000__INCLUDED_) #define AFX_MYSPLASHWND_H__08C608F3_1FB3_11D1_830E_58A47E000000__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 // MySplashWnd.h : header file // ///////////////////////////////////////////////////////////////////////////// // CMySplashWnd window class CMySplashWnd : public CWnd { // Construction public: CMySplashWnd(UINT nBitmapID, UINT nDuration = 2500); // Attributes public: BOOL Create(); // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMySplashWnd) public: virtual BOOL PreTranslateMessage(MSG* pMsg); //}}AFX_VIRTUAL // Implementation public: // Generated message map functions protected: //{{AFX_MSG(CMySplashWnd) afx_msg void OnPaint(); afx_msg void OnTimer(UINT nIDEvent); //}}AFX_MSG DECLARE_MESSAGE_MAP() protected: BOOL GetBitmapAndPalette(UINT nIDResource, CBitmap &bitmap, CPalette &pal); protected: UINT m_nBitmapID; UINT m_nDuration; UINT m_nTimerID; CBitmap m_bitmap; CPalette m_pal; CWnd m_wndInvisible; }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. #endif // !defined(AFX_MYSPLASHWND_H__08C608F3_1FB3_11D1_830E_58A47E000000__INCLUDED_) MySplashWnd.cpp // MySplashWnd.cpp : implementation file // #include "stdafx.h" #include "RichEdit.h" #include "SplashWnd.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CMySplashWnd CMySplashWnd::CMySplashWnd(UINT nBitmapID, UINT nDuration /*= 2500*/) { m_nBitmapID = nBitmapID; m_nDuration = nDuration; } BEGIN_MESSAGE_MAP(CMySplashWnd, CWnd) //{{AFX_MSG_MAP(CMySplashWnd) ON_WM_PAINT() ON_WM_TIMER() //}}AFX_MSG_MAP END_MESSAGE_MAP() BOOL CMySplashWnd::Create() { if( !GetBitmapAndPalette(m_nBitmapID, m_bitmap, m_pal) ) { TRACE1( "Could not load bitmap resource - %d\n", m_nBitmapID ); return FALSE; } BITMAP bm; m_bitmap.GetObject(sizeof(BITMAP), &bm); // First create an invi

    C / C++ / MFC tutorial question

  • Implementation Magnetic effect to ControlBar
    A Andrebon

    I wanna implement magnetic effect to ControlBar. So, I override OnWindowPosChanging() member function. But WM_WINDOWPOSCHANGING Message did not enter. that is, the message entered to CMiniDockFrameWnd, but did not ControlBar class. I want another method... thanks for read this message...

    C / C++ / MFC

  • Removing caption bar in toolbar
    A Andrebon

    I want remove caption bar in Toolbar(Floating). I try to modify stlyle of Toolbar with ModifyStyle() method but, failed. ModifyStyle( WS_CAPTION, NULL ) -> this is I called Method Thanks for reading this message!

    C / C++ / MFC
  • Login

  • Don't have an account? Register

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