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
S

safigh

@safigh
About
Posts
6
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Displaying Bitmap on a button [modified]
    S safigh

    Adding these two line to the init dialog also doesnt show the picture???? m_opaque.ModifyStyle(0, WS_CHILD|WS_VISIBLE|BS_BITMAP); m_opaque.SetBitmap( ::LoadBitmap(NULL, MAKEINTRESOURCE(IDB_BITMAP1)) );

    C / C++ / MFC question c++ graphics learning

  • Displaying Bitmap on a button [modified]
    S safigh

    Hi all. I am using MFC, and I want to display a bitmap on a button. I created the resource and it appeared in the bitmap resources as IDB_BITMAP1. Now I added a button named m_opaque and added the followin code to the OnPaint function: void HelloDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this); // device context for painting SendMessage(WM_ICONERASEBKGND, reinterpret_cast(dc.GetSafeHdc()), 0); // Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2; // Draw the icon dc.DrawIcon(x, y, m_hIcon); m_opaque.ModifyStyle(0, WS_CHILD|WS_VISIBLE|BS_BITMAP); m_opaque.SetBitmap( ::LoadBitmap(NULL, MAKEINTRESOURCE(IDB_BITMAP1)) ); // UpdateData(FALSE); } else { CDialog::OnPaint(); } } The code compiles but the image doesnt appear. what is the reason? -- modified at 11:27 Tuesday 11th July, 2006

    C / C++ / MFC question c++ graphics learning

  • From .exe to .lib
    S safigh

    Dont take the "BIG" word to that extent. It is big in core not in interface. I'll check the links and go back to u soon. Thanks anyway.

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

  • From .exe to .lib
    S safigh

    I can't get you. This is complicated for me. I am a beginner. Can you explain in more details and easier steps?

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

  • From .exe to .lib
    S safigh

    DavidCrow wrote:

    Create a temporary DLL project and make a note of what linker options are used. Incorporate those into X.

    Do you mean that I should creat a DLL project that link to these libraries and then put this DLL in X, thus X is linked to the libraries? How to create this DLL project and how to link it to X?

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

  • From .exe to .lib
    S safigh

    Hello all, I have a working BIG MFC project X. Now I want to create a new project Y(or another interface) that will use the older MFC project X as a library from which classes and methods are called. I changed the general properties of the X from .exe to .lib and Linked Y to X in the linker properties. The problem is that I lost all linker options that were in X (I used to link X to other libraries). Whatis the solution for this? Thank you very much. Regards

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

  • Don't have an account? Register

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