Skip to content

C / C++ / MFC

C, Visual C++ and MFC discussions

This category can be followed from the open social web via the handle c-c-mfc@forum.codeproject.com

111.5k Topics 465.7k Posts
  • How do I DCOM?...

    question tutorial
    2
    0 Votes
    2 Posts
    0 Views
    A
    Hi! The problem is that Windows NT version 4.0 supports DCOM by default, but Windows 95 does not. To make it work on W95 you have to download DCOM95.EXE and DCM95CFG.EXE available from Microsoft Web Site at: http://www.microsoft.com/oledev Read more about it in MSDN "HOWTO: Use Win95 as a DCOM Server". Regards, Alex Gorev, Dundas Software. ================== The original message was: The MSDN code example "DCOM" states that it only works when both machines are running NT. Why will it not work if both machines are running Win9x?
  • hidding a dialog bassed app. at startup

    tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    L
    In the initinstance of the app it should be calling DoModal, you can just comment that out. C. Zieler ================== The original message was: Hi, Does anyone know how to hide a dialog based app. when it's started. I've tried to ShowWindow(SW_HIDE) in OnInitDlg(), but it doesn't work. Is there a way to hide the dialog? Would overloading the DoModal() be a solution? Or is there an easier way? Thanks in advance! Christian
  • modeless proerty sheet.

    tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • CEdit: how to cancel initial text selection in propPage?

    tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    A
    ================== 1.You may creaet a new control and invisible it. 2.open rc file with txt mode 3.move the new control line beyond CEdit Control. That's it.
  • Serial communication with Win32 API

    help question algorithms json
    2
    0 Votes
    2 Posts
    0 Views
    V
    I also use the ReadFile for serial comm and I found that the problem I was having was that I was using the same overlapped object for both Put and Get. If I did a Put while a Get was waiting for data, the stuff would get trashed. I made sure that only one was doing overlapped operation and the other was just doing a WaitCommEvent. I also found that the number of bytes read that ReadFile returns was not correct. I just figure out the length on my own with a strlen(). Vern ================== The original message was: Hello, I'm a software developer and have following problem with Win32 API and serial communication : In my protocol is a read thread to receive bytes. The function ReadFile() reads one Byte from serial interface (COM1 or COM2). I use an overlapped structure to receive data. If there is an error the function WaitForSingleObject() is called. Usually the receive is correct. Sometimes the function ReadFile() don't read a Byte although the InQueue has a byte. The function WaitForSingleObject() is called. This function returns with WAIT_TIMEOUT, the current Byte is lost. If I call in this case PurgeComm(), the lost Byte is in the buffer which was in ReadFile() the input buffer. But this algorithm don't works correct every time. How can I read the Byte in the InQueue if this byte can't read from a Win32 API function ? How can I avoid this problem ? Good buy Rico Salfer
  • The Shell Recycle Bin

    question linux announcement workspace
    4
    0 Votes
    4 Posts
    1 Views
    L
    ================== The original message was: Try looking at SHFileOperation Whoops! Thanks for your reply, but SHFileOperation is used to remove a file *into* the recycle bin, not query the state of the recycle bin. Thanks for your trouble anyway!
  • ATL-release problem

    help c++ com debugging question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • OnDrawItem / OnPaint problem...

    help com learning
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Pasting into another application.

    c++ question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • MFC Static Build for Ax controls

    c++ com question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Formatting double as currency?

    json tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    M
    Use wsprintf() to convert your value to a string, then call GetCurrencyFormat(). Simple! --Mike-- ================== The original message was: Hi All -- I'm probably overlooking a simple API or class, but: Does anyone have sample code for converting a double value to a formatted string using the currency format defined by the system? For example: double dValue = 1234567.89; CString sValue = FormatAsCurrency(dValue); // If we're in the USA, // sValue should be "$1,234,567.89". // If we're in the UK, // sValue should be "£1,234,567.89" I'd be grateful for any suggestions.
  • How to make a frame for an irregular shape ?

    c++ tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • how to serialise MFCGridCtrl

    question css hardware tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Composite Control

    tutorial c++ css question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Schedule and Gantt Diagramm

    c++
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Schedule and Gantt Diagramm

    c++
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • A CPropertySheet question

    question c++
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • implementing splitter windows

    c++ css help question announcement
    2
    0 Votes
    2 Posts
    0 Views
    L
    I just went through the same thing but as soon as I stopped calling the CFrameWnd::OnCreateClient function. So instead of this: return CFrameWnd::OnCreateClient(lpcs, pContext); just try: return TRUE;
  • Mircosoft Sample Downloads

    c++ help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Windows NT Symbols Setup

    question csharp visual-studio com tools
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied