Cool! Hopefully no cd gets ejected when the door is closed... ..have fun.. jk :cool:
Jens Kreiensiek
Posts
-
Sexy Computer Case -
Windows standards?with W2k you can use
SHGetFolderPath()
withCSIDL_LOCAL_APPDATA
and place you application data there. ..have fun.. jk :cool: -
Thank god, it's friday!!!...or should I say: Thank Bill, it's Friday.NET (tm) ? ..have fun.. jk :cool:
-
Blasphemous questionwww.MyCustomersAreMasochists.com? Hmmm it's redirected to www.microsoft.com ... any hints? :-P ..have fun.. jk :cool:
-
Blasphemous questionBlasphemous question: what's the 'java' opposite to CodeProject? ..have fun.. jk :cool:
-
How I know CD-ROM's door is Opened or Closed?mciSendCommand()
orDeviceIOControl()
. There's no Function likeIs_Drive_A_CDRom_And_If_Its_So_Is_The_Tray_Open(LPCTSTR pszDrive)
. RTFM :-D ..have fun.. jk :cool: -
How I know CD-ROM's door is Opened or Closed?hi there, a good starting point is to search the MSDN for
MCI
. Another (but much harder) way is the functionDeviceIoControl()
. ..have fun.. jk :cool: -
CPP questionhi, 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:
-
Help on obtaining a pointer to my CDocument derived classyou 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:
-
Unicode (on Win9x)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:
-
Reading files without MFC...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:
-
Unicode (on Win9x)hi, make your button ownerdraw and use
TextOutW()
to draw the text... have fun... jk :cool: -
DoEvents Equiv in VC++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:
-
Disabling default share (NT/W2K)REGEDIT4 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters] "AutoShareServer"=dword:00000000 "AutoShareWks"=dword:00000000 have fun... JK :cool:
-
Std - Handles...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?
-
Std - HandlesHi 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:
-
The XP Problemtake a look here to get information about fast user switching...
-
CP Store...30 DEM, sorry...
-
CP Store...and only $30 deliver to germany. $40.99 for a code project mug, that's kinda cheap :laugh:
-
<font color="#ff0000">VB to VC GUI conversion tool?</font>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