<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>CodeProject Latest postings for C / C++ / MFC</title>
    <link>http://www.codeproject.com</link>
    <description>Latest postings for C / C++ / MFC from CodeProject</description>
    <language>en-us</language>
    <image>
      <title>CodeProject Latest postings for C / C++ / MFC</title>
      <url>http://www.codeproject.com/App_Themes/Std/Img/logo100x30.gif</url>
      <link>http://www.codeproject.com</link>
      <width>100</width>
      <height>30</height>
      <description>CodeProject</description>
    </image>
    <copyright>Copyright  CodeProject, 1999-2013</copyright>
    <webMaster>Webmaster@codeproject.com (Webmaster)</webMaster>
    <lastBuildDate>Thu, 23 May 2013 13:32:00 GMT</lastBuildDate>
    <ttl>20</ttl>
    <generator>C# Hand-coded goodness</generator>
    <item>
      <title>don't use the drive into Ring0</title>
      <description>Can anyone tell me how to drive is not used to enter Ring0?</description>
      <link>http://www.codeproject.com/Messages/4571512/dont-use-the-drive-into-Ring0.aspx</link>
      <author>SetHookCurrent</author>
      <pubDate>Thu, 23 May 2013 13:32:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>How to change bitmap dynamically</title>
      <description>Hi, I want to change the background bitmap of a dialog dynamically, for example, press button1, the background turn to image1, press button2, the background turn to image2.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I try to use a bool variable,like:&lt;br /&gt;
if (btnimg == 0) dlg.loadbitmap(image1); &lt;br /&gt;
else dlg.loadbitmap(image2);&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
it not work well.</description>
      <link>http://www.codeproject.com/Messages/4571484/How-to-change-bitmap-dynamically.aspx</link>
      <author>econy</author>
      <pubDate>Thu, 23 May 2013 12:52:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>CEdit control</title>
      <description>how to set char limit so that it should not exceed the 11 char .&lt;br /&gt;
after exceeding  11 char does not allow to press the key.&lt;br /&gt;
any example will helpful</description>
      <link>http://www.codeproject.com/Messages/4571160/CEdit-control.aspx</link>
      <author>sarfaraznawaz</author>
      <pubDate>Thu, 23 May 2013 06:12:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>Using MagSetImageScalingCallback</title>
      <description>Hi everyone,&lt;br /&gt;
I need to use &lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms692395(v=vs.85).aspx"&gt;MagSetImageScalingCallback&lt;/a&gt; to capture the desktop screen. But I cannot find out how to call it correctly. I know it's odd, but do you have any idea about this deprecated function?</description>
      <link>http://www.codeproject.com/Messages/4571075/Using-MagSetImageScalingCallback.aspx</link>
      <author>thanh_bkhn</author>
      <pubDate>Thu, 23 May 2013 01:55:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>any solution for WSAETIMEDOUT for CAsynSocket::OnConnect</title>
      <description>Hi&lt;br /&gt;&amp;nbsp;&lt;br /&gt;When I first got my laptop last august my application that I was developing (at least the TCP/IP code)&lt;br /&gt;was running fine about now my laptop runs a lot slower I tried to clean it up but it still doesn't&lt;br /&gt;run nearly as fast it did when I bought it&lt;br /&gt;&amp;nbsp;&lt;br /&gt;towards that end on My CAsyncSocket::OnConnect overridble I am getting the following nErrorCode&lt;br /&gt;&amp;nbsp;&lt;br /&gt;WSAETIMEDOUT&lt;br /&gt;&amp;nbsp;&lt;br /&gt;I am wondering what is the best approach to this is modifying a registry key for the TCP/IP time out value (I am running Windows 7)&lt;br /&gt;&amp;nbsp;&lt;br /&gt;Maybe start clean re-install of Windows &lt;br /&gt;&amp;nbsp;&lt;br /&gt;Any suggestion appreciated&lt;br /&gt;&amp;nbsp;&lt;br /&gt;Thanks</description>
      <link>http://www.codeproject.com/Messages/4570793/any-solution-for-WSAETIMEDOUT-for-CAsynSocket-OnCo.aspx</link>
      <author>ForNow</author>
      <pubDate>Wed, 22 May 2013 16:36:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>source code sudoku c</title>
      <description>does anyone have the source code of sudoku?, but that requires us to input numbers and and using C</description>
      <link>http://www.codeproject.com/Messages/4570651/source-code-sudoku-c.aspx</link>
      <author>Member 10069426</author>
      <pubDate>Wed, 22 May 2013 13:54:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>C++ Syntax failure ?</title>
      <description>Can anyone explain me why the following C++ snippet does compile and not end up in a compiler error ?&lt;br /&gt;
&lt;pre lang="c++"&gt;
&lt;span class="code-keyword"&gt;int&lt;/span&gt; main()
{
  &lt;span class="code-keyword"&gt;double&lt;/span&gt; d;
  d = &lt;span class="code-digit"&gt;0&lt;/span&gt;,&lt;span class="code-digit"&gt;2&lt;/span&gt;;      &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; WHY IS THIS NOT A COMPILER ERROR ?
&lt;/span&gt;
  &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-digit"&gt;0&lt;/span&gt;;
}
&lt;/pre&gt;
I would expect the double assignment should be&lt;br /&gt;
&lt;pre lang="c++"&gt;
  &lt;span class="code-keyword"&gt;double&lt;/span&gt; d;
  d = &lt;span class="code-digit"&gt;0&lt;/span&gt;.&lt;span class="code-digit"&gt;2&lt;/span&gt;;
&lt;/pre&gt;
Because I couldn't believe it, I tried VisualStudio 2010, -2005 AND -6, all three compiled with 0 errors, 0 warnings...</description>
      <link>http://www.codeproject.com/Messages/4570641/Cplusplus-Syntax-failure.aspx</link>
      <author>Engeltje</author>
      <pubDate>Wed, 22 May 2013 13:40:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>error handling in c++ dll</title>
      <description>Hi,&lt;br /&gt;
I have one function which is return string array in my C++ dll .from this function how can return error .please help me .&lt;br /&gt;
Thanks</description>
      <link>http://www.codeproject.com/Messages/4570185/error-handling-in-cplusplus-dll.aspx</link>
      <author>venkatesh52867</author>
      <pubDate>Wed, 22 May 2013 05:39:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>MFC SetTimer()  question</title>
      <description>In a dialog, WM_PAINT message handler, I set a  timer.&lt;br /&gt;
&lt;pre lang="c++"&gt;&lt;span class="code-keyword"&gt;void&lt;/span&gt; CXYZDlg::OnPaint()
{... SetTimer(&lt;span class="code-digit"&gt;12&lt;/span&gt;, &lt;span class="code-digit"&gt;2500&lt;/span&gt;, NULL);} &lt;/pre&gt;
&amp;nbsp;&lt;br /&gt;
in the OnTimer(),I found I have to set it again, then it goes into&lt;br /&gt;
the breakpoint in OnTimer() repeatedly. otherwise, it only goes into the OnTimer() function once.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre&gt;&amp;lt;pre lang=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;c++"&lt;/span&gt;&amp;gt;void CXYZ::OnTimer(UINT_PTR nIDEvent)
{
&lt;span class="code-keyword"&gt;if&lt;/span&gt; (g_Scroll == &lt;span class="code-digit"&gt;1&lt;/span&gt;) {
		&lt;span class="code-keyword"&gt;if&lt;/span&gt; ( sc&amp;lt; &lt;span class="code-digit"&gt;16&lt;/span&gt; ){
			BuzzerOnce(&lt;span class="code-digit"&gt;1&lt;/span&gt;);
			SC++;
		}
		&lt;span class="code-keyword"&gt;else&lt;/span&gt;
			sc = &lt;span class="code-digit"&gt;1&lt;/span&gt;;
	}
&amp;nbsp;
	...
	SetTimer(&lt;span class="code-digit"&gt;1361&lt;/span&gt;, &lt;span class="code-digit"&gt;2500&lt;/span&gt;, NULL);  &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;Have to set this, other wise OnTimer only runs once. I am confused with this statement.
&lt;/span&gt;	CDialog::OnTimer(nIDEvent);
}&lt;/pre&gt;</description>
      <link>http://www.codeproject.com/Messages/4569833/MFC-SetTimer-question.aspx</link>
      <author>econy</author>
      <pubDate>Tue, 21 May 2013 17:13:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>Compressing Data for Transmission - Compression API Windows 7</title>
      <description>I am building an application that needs to compress data before being sent via socket. Performance is very very critical and I want to make use of native functions i.e. no interop calls into .net libraries. I am building it as a C++ application.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I did find Compression API that will take an input and provide a compressed output. PLEASE BEAR THE FACT THAT I AM NOT USING ANY FILES (DISK FILES). Instead I am just dealing with raw stream.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
But this Compression API is available only from Windows 8 onwards and Windows Server 2012. How do I go about finding a solution if I were to do this on Windows 7 and and a server that is say 2008 or 2003&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;b&gt;Hickups:&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Cabinet API does not help as it always does it thru files?&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Explored the option of CMemFile and see if I can break the ice but the m_handle is of no use nor will there be a need to open or close files as I am just dealing with raw bytes.</description>
      <link>http://www.codeproject.com/Messages/4569825/Compressing-Data-for-Transmission-Compression-API-.aspx</link>
      <author>Vasudevan S</author>
      <pubDate>Tue, 21 May 2013 17:00:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>Splitter view using template</title>
      <description>Hi,&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I am trying template for splitter view but getting error in IMPLEMENT_DYNCREATE_T.&lt;br /&gt;
I am using VS2008. Plz help</description>
      <link>http://www.codeproject.com/Messages/4569730/Splitter-view-using-template.aspx</link>
      <author>john5632</author>
      <pubDate>Tue, 21 May 2013 15:26:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>PCI Printer Ports?</title>
      <description>New motherboards do not have built in printer ports. There are many devices that used these ports. I have several chip programming adapters.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I would like to be able to read and write the LPT ports directly. Not using the Windows print spooler.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Does anyone know where to get the port information for PCI parallel port?&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Bob Macklin&lt;br /&gt;
Seattle, Wa</description>
      <link>http://www.codeproject.com/Messages/4569724/PCI-Printer-Ports.aspx</link>
      <author>macklinbob</author>
      <pubDate>Tue, 21 May 2013 15:19:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>'System' : is not a class or namespace name</title>
      <description>Hi guys,&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
i'm creating an app in c++ that uses the FileSystemEventArgs.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
In my code i added the namespace System::IO;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
My problem is, the System Namespace will work if in my configuration&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;u&gt;Common Language Runtime Support = /clr&lt;/u&gt;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
but it produces an error if&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;u&gt;Common Language Runtime Support = No CLR Support&lt;/u&gt; &lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Need you ideas guys what to do. I need my app to be configured with &lt;u&gt;No CLR Support&lt;/u&gt;. &lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Thanks</description>
      <link>http://www.codeproject.com/Messages/4569680/System-is-not-a-class-or-namespace-name.aspx</link>
      <author>bugwee</author>
      <pubDate>Tue, 21 May 2013 14:49:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>Disabling cut,copy,paste,rename and delete operation</title>
      <description>hello,&lt;br /&gt;
Is there way to disable Cut,Copy,Paste,Rename and Delete operation for a particular file with (.extension)&lt;br /&gt;
in windows ...&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
please Reply me ....</description>
      <link>http://www.codeproject.com/Messages/4569276/Disabling-cut-copy-paste-rename-and-delete-operati.aspx</link>
      <author>sarfaraznawaz</author>
      <pubDate>Tue, 21 May 2013 07:42:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>multi platform applications</title>
      <description>Is it possible to develop a multi platform applications in vc++. If yes then what i have to do for that.</description>
      <link>http://www.codeproject.com/Messages/4569251/multi-platform-applications.aspx</link>
      <author>vr999999999</author>
      <pubDate>Tue, 21 May 2013 07:23:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>Handle enter key in Edit control MFC</title>
      <description>I was asked to build a MFC appliation, which will execute a window Command line when you type a window  Command line &amp; press "Eter".&lt;br /&gt;
But i don't know how to handle Enter key event in multiline Edit control.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Please help me! Thanks so much!</description>
      <link>http://www.codeproject.com/Messages/4569243/Handle-enter-key-in-Edit-control-MFC.aspx</link>
      <author>Member 10036414</author>
      <pubDate>Tue, 21 May 2013 07:18:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>how to hook WM_CLOSE message on all process</title>
      <description>can you give me a project of VS 2010 C++ to hook WM_CLOSE message on all process?&lt;br /&gt;
Thank you!&lt;br /&gt;
~Peter</description>
      <link>http://www.codeproject.com/Messages/4569213/how-to-hook-WM_CLOSE-message-on-all-process.aspx</link>
      <author>Member 10066523</author>
      <pubDate>Tue, 21 May 2013 06:34:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>Write Text on child window - SDI application</title>
      <description>Hello Everybody,&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I have created one SDI Application with one dialog - having some controls. In that, if I click a button, I want to show a child window and with the following code, I am getting that fine.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre lang="c++"&gt;CMainFrame *pMainFrm = ((CMainFrame*)(AfxGetApp()-&amp;gt;m_pMainWnd)); 
	CFrameWnd *pFrame = &lt;span class="code-keyword"&gt;new&lt;/span&gt; CFrameWnd;
	RECT rect;
	pFrame-&amp;gt;Create(NULL,_T(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Solution"&lt;/span&gt;), WS_OVERLAPPEDWINDOW ,rect,&lt;span class="code-keyword"&gt;this&lt;/span&gt;);
	pFrame-&amp;gt;ModifyStyle(WS_CAPTION + WS_OVERLAPPEDWINDOW , WS_BORDER,SWP_NOMOVE +SWP_NOZORDER );
&amp;nbsp;
	pFrame-&amp;gt;InitialUpdateFrame(pMainFrm-&amp;gt;GetActiveDocument(),TRUE);
	pFrame-&amp;gt;SetWindowPos(&amp;amp;CWnd::wndTopMost,&lt;span class="code-digit"&gt;100&lt;/span&gt;,&lt;span class="code-digit"&gt;200&lt;/span&gt;,&lt;span class="code-digit"&gt;1000&lt;/span&gt;,&lt;span class="code-digit"&gt;400&lt;/span&gt;,SWP_SHOWWINDOW);
	pFrame-&amp;gt;ActivateFrame(SW_SHOWNORMAL);&lt;/pre&gt;
&amp;nbsp;&lt;br /&gt;
Now, I would like to write some text on that child window. Any suggestions? I tried in google also.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Thanks in advance,&lt;br /&gt;
A. Gopinath.</description>
      <link>http://www.codeproject.com/Messages/4569179/Write-Text-on-child-window-SDI-application.aspx</link>
      <author>tagopi</author>
      <pubDate>Tue, 21 May 2013 05:43:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>VC++ Crashing?</title>
      <description>I have VisualC++ Ver 5. I have been using it for close to 20 years. I know it's old but so am I.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
My problem is that my version of VC++ crashes frequently when used on a WinXP computer.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
But on a Win2K computer it runs for hours before crashing.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Is there something I should know about running VC++ on a WinXP computer?&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Bob Macklin&lt;br /&gt;
Seattle, Wa.</description>
      <link>http://www.codeproject.com/Messages/4568934/VCplusplus-Crashing.aspx</link>
      <author>macklinbob</author>
      <pubDate>Mon, 20 May 2013 19:55:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
    <item>
      <title>Video output gets corrupted. Displays Grey colour instead of actual Video colors.?</title>
      <description>Hi,&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I am working on a project in which I am using DirectShow for Capturing and Displaying Videos.&lt;br /&gt;
It works fine for Windows XP and Windows 7, but when I try to play the same video on Windows 8, its output gets corrupted. It doesn't display the actual videos colors, instead the color turns into Grey for the whole video. I tried to update DirectShow for Windows 8, checked in the code also, but all in vein....Still the same issue.&lt;br /&gt;
I am trying to play a file of .wmv format. Issue persists for other formats also. &lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Do I need any missing codec in Windows 8 or any other solution for this problem.?&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
How it could be possible that a video displays fine for Windows XP, and 7 but not for Windows 8.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Anybody have any idea regarding this.?&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Any help will be appreciated.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Regards,&lt;br /&gt;
Mbatra</description>
      <link>http://www.codeproject.com/Messages/4568497/Video-output-gets-corrupted-Displays-Grey-colour-i.aspx</link>
      <author>mbatra31</author>
      <pubDate>Mon, 20 May 2013 12:06:00 GMT</pubDate>
      <subject>C / C++ / MFC</subject>
    </item>
  </channel>
</rss>