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
B

balcn

@balcn
About
Posts
4
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • problem setting text in edit box
    B balcn

    Use SetDlgItemText(...) function in the OnInitDialog() handler of the dialog box. eg SetDlgItemText(IDC_E_DATA,string_data); R.Balachandran

    C / C++ / MFC help question

  • COM Client problem
    B balcn

    Here I have given a sample working code for a COM client // COMClientDlg.cpp : implementation file #include "stdafx.h" #include "COMClient.h" #include "COMClientDlg.h" #include "COMServer.h" #include "COMServer_i.c" ............................ ............................ ............................ HRESULT hr; IMessage *msg; hr = CoInitialize(0); //initialize COM if( SUCCEEDED(hr) ) { hr = CoCreateInstance( CLSID_Message, NULL, CLSCTX_INPROC_SERVER, IID_IMessage, (void **)&msg ); if( SUCCEEDED(hr) ) { msg->Show(); msg->Release(); } else { AfxMessageBox("Cannot create COM object"); } CoUninitialize(); //uninitialize COM } else { AfxMessageBox("Cannot initialize COM"); } This code worked fine when I tested under an MFC dialog project. The server was created as a DLL by the ATL wizard. While creating a simple object the following options were selected. Threading Model - apartment Interface - dual Aggregation - yes If you still have trouble you can mail your code to me R.BALACHANDRAN

    COM com help

  • COM Client problem
    B balcn

    Did you use the ATL wizard? What is the error yu get? R.Balachandran

    COM com help

  • how to load a jpg/bmp image ?
    B balcn

    The following example code can be used for loading a BMP file image in any vc++ application. HBITMAP hbitmap; hbitmap = (HBITMAP)LoadImage(NULL,"C:\\house.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE); HDC hmemdc; hmemdc = CreateCompatibleDC(pDC->m_hdc); SelectObject(hmemdc,hbitmap); BitBlt(pDC->m_hdc,0,0,image_width,image_height,hmemdc,0,0,SRCCOPY); For viewing as a background image in an SDI application the above code can be used inside the OnDraw(CDC *pDC) method of view class. For loading a JPEG file you can use external JPEG libraries such as the IJL15.DLL which is freely available. R.Balachandran

    C / C++ / MFC graphics help tutorial question
  • Login

  • Don't have an account? Register

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