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

Ben M Stokland

@Ben M Stokland
About
Posts
11
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • using namespace std ?
    B Ben M Stokland

    ex: namespace mynamespace { void DoThis(void* p) { ...} } namespace mynamespace2 { void DoThis(void* p) { ...} } //you can use it like this mynamespace::DoThis(myPointer); mynamespace2::DoThis(myPointer); //or using namespace mynamespace; DoThis(myPointer); //using namespace mynamespaces Does this make sense? Recommend you check up on namespaces. :)

    C / C++ / MFC question

  • Abstract Template Classes?
    B Ben M Stokland

    It is poosible to create abstracet template classes (just give it a try :) You inherit from them as you would a normal class. template class CBaseClass { //ex: virtual int DoIt() = 0; .... }; template class CDerive : public CBaseClass { }; //an instance: CDerive MyIntclass; shouldn't be all that difficult?

    C / C++ / MFC question

  • how to enumerate all the .txt files in some directory?
    B Ben M Stokland

    FindFirstFile(...) --requires CE 1.0 or higher _findfirst(...)

    C / C++ / MFC tutorial question

  • I need to disable ESC key in ATL COM CAxDialogImpl...
    B Ben M Stokland

    GetAsynchKeyState(VK_ESKAPE); (in your OnCancel(...) to check the state)

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

  • How can i register a .dll or .ocx file in my program similar register it using regsvr32.exe?
    B Ben M Stokland

    That might have been me..:eek: http://www.codeproject.com/script/comments/forums.asp?forumid=1647&select=55401&tid=55395#xx55401xx :-D

    C / C++ / MFC question

  • Time and date
    B Ben M Stokland

    The time and date for the threads are a bit confusing. How can someone figure out what time of day the posting was done, if they don't know what timezone the web-server is in?? How about calculating all the time/date to local time/date for the client accessing the pages. Or adding a line wich states what timezone the server is using, and maybe the current time on the server?:confused: :suss:

    Site Bugs / Suggestions sysadmin question

  • Linking error when using template class from MFC Extension DLL
    B Ben M Stokland

    It shouldn't make any difference if the implementation is in the header or in the cpp. The linker doesn't care. It's just a matter of making readable code. Doing all your implementation in the header, just makes the code harder to maintain than necessary.:suss: The key point is that the linker can't find the implementation of that method.

    C / C++ / MFC c++ visual-studio help question

  • Linking error when using template class from MFC Extension DLL
    B Ben M Stokland

    Have you tried to implement a method int IsEmpty(void) { ... return n; } ??? Seems like the linker can't find the body of this function... Is it a virtual class you are inheriting from? Or is int IsEmpty(void) defined as: in IsEmtpy(void) = 0; ??:confused:

    C / C++ / MFC c++ visual-studio help question

  • Load DLL in program
    B Ben M Stokland

    LoadLibrary, just load's the dll, so you can call functions in it. You need to have a function prototype to call a function in a dll. Lets make a function that will register a com-dll (just like regsvr32.exe does): typedef void (*f)(void); BOOL MyFuncCallsADLL(TCHAR* szDll) { f pf; // our function pointer HINSTANCE hDll = LoadLibrary(szDll); if(hDll == NULL) return FALSE; // we couldnt load library //get function address pf = (f)GetProcAddress(hDll, _T("DllRegisterServer")); if(pf == NULL) { FreeLibrary(hDll); return FALSE; //we couldn locate the function } //lets call that method pf(); FreeLibrary(hDll); return TRUE; } ;P

    C / C++ / MFC help

  • MSDN Search
    B Ben M Stokland

    hmmmm..... Yupp, but now it seems to be up and running again... :rolleyes:

    The Lounge com question

  • Difference !!!
    B Ben M Stokland

    E_FAIL will also throw an exception if you use Visual Basic, and S_FALSE will not.

    COM game-dev question html database com
  • Login

  • Don't have an account? Register

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