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
J

Jens Kreiensiek

@Jens Kreiensiek
About
Posts
21
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Sexy Computer Case
    J Jens Kreiensiek

    Cool! Hopefully no cd gets ejected when the door is closed... ..have fun.. jk :cool:

    The Lounge com

  • Windows standards?
    J Jens Kreiensiek

    with W2k you can use SHGetFolderPath() with CSIDL_LOCAL_APPDATA and place you application data there. ..have fun.. jk :cool:

    The Lounge help question

  • Thank god, it's friday!!!
    J Jens Kreiensiek

    ...or should I say: Thank Bill, it's Friday.NET (tm) ? ..have fun.. jk :cool:

    The Lounge csharp question

  • Blasphemous question
    J Jens Kreiensiek

    www.MyCustomersAreMasochists.com? Hmmm it's redirected to www.microsoft.com ... any hints? :-P ..have fun.. jk :cool:

    The Lounge question java

  • Blasphemous question
    J Jens Kreiensiek

    Blasphemous question: what's the 'java' opposite to CodeProject? ..have fun.. jk :cool:

    The Lounge question java

  • How I know CD-ROM's door is Opened or Closed?
    J Jens Kreiensiek

    mciSendCommand() or DeviceIOControl(). There's no Function like Is_Drive_A_CDRom_And_If_Its_So_Is_The_Tray_Open(LPCTSTR pszDrive). RTFM :-D ..have fun.. jk :cool:

    C / C++ / MFC question

  • How I know CD-ROM's door is Opened or Closed?
    J Jens Kreiensiek

    hi there, a good starting point is to search the MSDN for MCI. Another (but much harder) way is the function DeviceIoControl(). ..have fun.. jk :cool:

    C / C++ / MFC question

  • CPP question
    J Jens Kreiensiek

    hi, what about this approach:

    class CBuffer
    {
    public:
    virtual void Set() = 0;
    virtual void Get() = 0;
    ...
    };

    template<class TBuffer>
    class CUndoBuffer
    {
    public:
    ...
    void SomeFunc()
    {
    m_theBuffer.Set( whatever );
    m_theBuffer.Get( whatever );
    }

    private:
    TBuffer m_theBuffer;
    };

    class CConcreteBuffer : public CBuffer
    {
    public:
    virtual void Set();
    virtual void Get();
    ...
    };

    CUndoBuffer<CConcreteBuffer> AConcreteUndoBuffer;
    etc..

    ..have fun.. jk :cool:

    C / C++ / MFC question c++

  • Help on obtaining a pointer to my CDocument derived class
    J Jens Kreiensiek

    you can use the following function to get your document from any place in your app (just replace 'CMyDocument')...

    CMyDocument* DangerousGetDocument()
    {
    CWinApp* pApp = ::AfxGetApp();
    POSITION p = pApp->GetFirstDocTemplatePosition();
    ASSERT(p);

    CDocTemplate* pTmp = pApp->GetNextDocTemplate(p);
    p = pTmp->GetFirstDocPosition();
    ASSERT(p);

    CDocument* pDoc = pTmp->GetNextDoc(p);
    ASSERT(pDoc);

    return reinterpret_cast<CMyDocument*>(pDoc);
    }

    ..have fun... jk :cool:

    C / C++ / MFC help tutorial question

  • Unicode (on Win9x)
    J Jens Kreiensiek

    Hi Oz, 1) you should select the appropriate font for the respective language. "Arial" covers the most eastern and western languages including cyrillic, greek, and turkish. For asian languages you have to use different fonts: japanese - "MS Gothic", chinese - "MS Hei", korean - "GulimChe"... As far as I know, there's no font that covers all unicode languages at once. 2) I guess you have no chance to retrieve a specific language from a unicode string by comparing the character values. There are too many characters which are used in more than one language. Just think about an 'e' ... 3) I haven't much experience with the rich edit control, sorry. But I remember that one must at least set the right font codepage for a proper display... have fun... jk :cool:

    C / C++ / MFC html help tutorial question

  • Reading files without MFC
    J Jens Kreiensiek

    ...maybe the problem is your structure... Use the following pragma's around your definition:

    #pragma pack(push, 1)
    ...
    #pragma pack(pop)

    have fun... jk :cool:

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

  • Unicode (on Win9x)
    J Jens Kreiensiek

    hi, make your button ownerdraw and use TextOutW() to draw the text... have fun... jk :cool:

    C / C++ / MFC html help tutorial question

  • DoEvents Equiv in VC++
    J Jens Kreiensiek

    the mfc-way:

    void DoEvents()
    {
    MSG m;
    while(::PeekMessage(&m, 0, 0, 0, PM_NOREMOVE))
    AfxGetApp()->PumpMessage();

    LONG lIdle = 0;
    while(AfxGetApp()->OnIdle(lIdle++ ))
    	;  
    

    }

    have fun... jk :cool:

    C / C++ / MFC c++ question

  • Disabling default share (NT/W2K)
    J Jens Kreiensiek

    REGEDIT4 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters] "AutoShareServer"=dword:00000000 "AutoShareWks"=dword:00000000 have fun... JK :cool:

    The Lounge com help question

  • Std - Handles
    J Jens Kreiensiek

    ...sure, but my problem is the strange behavior. I don't know whether I start a gui- or console application, so I can't differentiate between them. If a gui applicaton doesn't touch the std-handles, why do they behave in such a strange fashion?

    System Admin question

  • Std - Handles
    J Jens Kreiensiek

    Hi All, I'm writing a service, that spawns several new processes. These new procs can either be gui apps or console apps. I redirect the std handles (stdout/stderr/stdin) via anonymous pipes as seen in well known msdn articles. After creating the new processes I wait for all my pipe-handles to become signaled. So far so good. Everything works fine with console apps, but if I start a gui app (e.g. notepad.exe), the pipe handle (stdout) gets signaled and a following ReadFile() blocks forever!. Okay, I tried to check for available data with PeekNamedPipe(). It's return value is always 0 (zero), so I skip the ReadFile(). But now the pipe handle becomes signaled ever and ever again and my cpu is at 100% with peeking the stdout pipe... I'm lost. What does Notepad.exe do with the std - handles? Any hints would be very appreciated!!! Frozen greetings from Germany, Jens :suss:

    System Admin question

  • The XP Problem
    J Jens Kreiensiek

    take a look here to get information about fast user switching...

    C / C++ / MFC design help tutorial question

  • CP Store
    J Jens Kreiensiek

    ...30 DEM, sorry...

    The Lounge question

  • CP Store
    J Jens Kreiensiek

    ...and only $30 deliver to germany. $40.99 for a code project mug, that's kinda cheap :laugh:

    The Lounge question

  • <font color="#ff0000">VB to VC GUI conversion tool?</font>
    J Jens Kreiensiek

    There's no need for a conversion tool. Just import the *.frm files to your resource script. Be sure to insert all ActiveX/OCX to your project first. Than right click the resource script, select import and file type *.frm. Thats all. Hope this helps.. Jens

    The Lounge sales tools question learning
  • Login

  • Don't have an account? Register

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