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
K

Killen

@Killen
About
Posts
13
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Access violation trying to use ActiveX dll
    K Killen

    Oh, I'm sorry! I only removed the other variables from the code presented to you, to make it more readable! :-O "Time to give a Newtonian demonstration, of a bullet, its mass and its acceleration." -Stephen Hawking the gangsta rapper

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

  • Printing trouble once again
    K Killen

    Although probably not solving your problem, it should probably be: m_prtDC.StartDoc("Doc"); m_prtDC.StartPage(); StretchDIBits(m_prtDC.m_hDC,...); m_prtDC.EndPage(); // switched place m_prtDC.EndDoc(); // switched place "Time to give a Newtonian demonstration, of a bullet, its mass and its acceleration." -Stephen Hawking the gangsta rapper

    C / C++ / MFC question performance

  • Event or Mutex
    K Killen

    Events can be fired by lots of different threads at the same time, I think, whereas a mutex is something owned by one thread only. So when a thread is waiting for an event, it can be fired by more or less any other thread, whereas if it is waiting for a mutex, it is one specific thread that releases it. "Time to give a Newtonian demonstration, of a bullet, its mass and its acceleration." -Stephen Hawking the gangsta rapper

    C / C++ / MFC tutorial question

  • C++ Question: const Qualifier or Modifier
    K Killen

    Are qualifier and modifier really c++ syntax? I don't think so. If they're not it's perhaps just names used for functions with a special purpose. "Time to give a Newtonian demonstration, of a bullet, its mass and its acceleration." -Stephen Hawking the gangsta rapper

    C / C++ / MFC c++ question

  • CSocket problem connecting with remote computer
    K Killen

    Do you have a fixed IP-address for your home computer? Do you have a firewall on it? "Time to give a Newtonian demonstration, of a bullet, its mass and its acceleration." -Stephen Hawking the gangsta rapper

    C / C++ / MFC game-dev sysadmin help

  • Access violation trying to use ActiveX dll
    K Killen

    Hi! I'm trying to use an ActiveX dll in my C++ program. The dll is written in VB (not by me), so I generated a h-file from the idl. Everything compiles, but when I run the test program I get an error at the line with a :confused: below. The code is really simple, but I don't know what is causing the error. Anyone familiar with what might be wrong here? Thanks... void TestDlg::OnOK() { HRESULT hRes; _cTheObj *pTheObj = NULL; UpdateData(TRUE); // Init COM hRes = CoInitialize(0); if (SUCCEEDED(hRes)) { // Create object hRes = CoCreateInstance(CLSID_cTheObj, NULL, CLSCTX_INPROC_SERVER, IID__cTheObj, (LPVOID *)&pTheObj); if (SUCCEEDED(hRes)) { SHORT ret; VARIANT l1; VariantInit(&l1); l1.vt = VT_BSTR; l1.bstrVal = m_logon1.AllocSysString(); hRes = pTheObj->Logon(l1, &ret); :confused: The definition of the Logon funcition in the h-file for the dll looks like: virtual /* [id] */ HRESULT STDMETHODCALLTYPE Logon( /* [in] */ VARIANT arg1, /* [in] */ VARIANT arg2, /* [in] */ VARIANT arg3, /* [retval][out] */ VARIANT_BOOL __RPC_FAR *__MIDL_0014) = 0; Thanks for any help!

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

  • Disappearing images
    K Killen

    Yeah, it was a call to GetIconInfo which caused the bug. The received bitmaps were never deleted :| Thanks for all your assistance!

    C / C++ / MFC help question lounge

  • Disappearing images
    K Killen

    Thanks! There was a GDI leak allright. The leak occurs in my drawing function for the ImageButton. Now I only need to figure out what is causing it. Do you know of any 'typical' pitfalls leading to this kind of leakage?

    C / C++ / MFC help question lounge

  • Disappearing images
    K Killen

    I have a really irritating problem. In my program, a user can browse images by clicking on two buttons (one going forward and one backwards). After a while the images are no longer displayed. The area is updated, but instead of displaying the image, the area is white. The shape is still visible though (and updated if I continue browsing) and it is correct. Also the image data to be displayed is correct, as I have seen when debugging the application. But there is no real image displayed to the user, only a white rectangle of the image. The buttons that I use are of a CButton-derrived class that I call ImageButton. At the same time as the image dissapears, the images dissapear from the buttons too! This occurs after browsing about 200 images, the exact amount is random. What could be the problem? I am thankful for all comments! /Killen

    C / C++ / MFC help question lounge

  • Compiling an idl?
    K Killen

    Thanks! I also tried not including the c-file in my project which got rid of problem no 1... "Time to give a Newtonian demonstration, of a bullet, its mass and its acceleration." -Stephen Hawking the gangsta rapper

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

  • Compiling an idl?
    K Killen

    Hello! I'm trying to use an ActiveX dll written in VB from my VC++ program. After reading the article http://www.codeproject.com/com/vb\_from\_vc.asp I still have some problems.:( I thought the compiler would generate error-free files for me to use! In the project settings I have made the compiler create a h-file and a c-file when compiling the idl-file, which works just fine. Those files are included in my project, but then these errors occur when I try to build it. 1. In my generated c-file I get this error: fatal error C1010: unexpected end of file while looking for precompiled header directive 2. I include my generated h-file in my dialog, but I get an error: error C2061: syntax error : identifier '_sockdata' The declaration in the h-file looks like this: virtual /* [id] */ HRESULT STDMETHODCALLTYPE SendToServer( /* [in] */ /* external definition not present */ _sockdata __RPC_FAR *MySesH) = 0; Please, if you have any idea what I could do to solve the problem, give me a reply! Thanks!!

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

  • Using VB dll in C++
    K Killen

    Thanks for the answer. The codeproject article was really great! /Killen

    C / C++ / MFC help c++ tutorial

  • Using VB dll in C++
    K Killen

    Hi! I'm trying to use some functions in a dll written in VB 6.0. I have sample code for using the dll from VB (se below) but I don't really know how to go about using it from my C++ app. Any help would be very much appreciated! VB code exemple: 'Declaration: Private MyVBObject As New TheVBObject.cTheVBObject 'Startup: If Not MyVBObject.Init("Arg1","Arg2","Arg3") Then MsgBox "Init Fail!", vbCritical & vbOKOnly, "Init" End End If 'Use: MyVBObject.Var1 = " " If MyVBObject.DoStuff("Arg1","Arg2") Then If MyVBObject.Error > 3 _ And (MyVBObject.Error <> 4) Then MsgBox MyVBObject.ErrTxt frmObject.MousePointer = vbNormal Exit Sub End If Else MsgBox "Error using it", vbCritical & vbOKOnly, "Using" End If 'Read the properties... 'Dim MyProp = MyVBObject.Prop1 '... or something like that...

    C / C++ / MFC help c++ tutorial
  • Login

  • Don't have an account? Register

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