<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>C++ MFC Forum RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest threads from the 'C++ MFC' forum at Programmer's Heaven, excluding replies.</description>
    <language>en</language>
    <copyright>Copyright 2012 Programmers Heaven</copyright>
    <pubDate>Thu, 09 Feb 2012 06:25:55 -0800</pubDate>
    <lastBuildDate>Thu, 09 Feb 2012 06:25:55 -0800</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>How to prevent resizing of column in CListCtrl</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/427294/427294/how-to-prevent-resizing-of-column-in-clistctrl/</link>
      <description>I am working on a CDHTMLDialog based application where I ahve added a CListCtrl as shown below.&lt;br /&gt;
&lt;br /&gt;
The list control has only one column.&lt;br /&gt;
&lt;br /&gt;
IDD_TEST_DIALOG DIALOGEX 0, 0, 419, 286&lt;br /&gt;
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME&lt;br /&gt;
EXSTYLE WS_EX_APPWINDOW&lt;br /&gt;
FONT 8, "MS Shell Dlg", 0, 0, 0x1&lt;br /&gt;
BEGIN&lt;br /&gt;
    CONTROL         "",IDC_LIST_TEXT,"SysListView32",LVS_REPORT | LVS_OWNERDATA | LVS_NOSORTHEADER | NOT WS_VISIBLE | WS_BORDER | WS_TABSTOP,20,143,397,136&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
The problem is that I can drag the colum header to extreme left and the column goes hidden. To bring it back I will have to again drag the column header to the right.&lt;br /&gt;
&lt;br /&gt;
I want to prevent resizing of this column so that the user cannot drag this completely to the left and make it hidden.&lt;br /&gt;
&lt;br /&gt;
I did try the following code but it is not working.&lt;br /&gt;
&lt;br /&gt;
void CMyTestDlg::OnHDNEndtrackListLog(NMHDR *pNMHDR, LRESULT *pResult)&lt;br /&gt;
{&lt;br /&gt;
LPNMHEADER phdr = reinterpret_cast&amp;lt;LPNMHEADER&amp;gt;(pNMHDR);&lt;br /&gt;
// TODO: Add your control notification handler code here&lt;br /&gt;
if(m_ListCtrl.GetColumnWidth(0) &amp;lt; 100)&lt;br /&gt;
{&lt;br /&gt;
m_ListCtrl.SetColumnWidth(0, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
*pResult = 0;&lt;br /&gt;
}&lt;br /&gt;
Since I have very less time to implement this, I request you kindly give me some examples from MFC Dialog based applications.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/427294/427294/how-to-prevent-resizing-of-column-in-clistctrl/</guid>
      <pubDate>Wed, 08 Feb 2012 01:01:24 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>How to prevent resizing of column in CListCtrl</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/427293/427293/how-to-prevent-resizing-of-column-in-clistctrl/</link>
      <description>I am working on a CDHTMLDialog based application where I ahve added a CListCtrl as shown below.&lt;br /&gt;
&lt;br /&gt;
The list control has only one column.&lt;br /&gt;
&lt;br /&gt;
IDD_TEST_DIALOG DIALOGEX 0, 0, 419, 286&lt;br /&gt;
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME&lt;br /&gt;
EXSTYLE WS_EX_APPWINDOW&lt;br /&gt;
FONT 8, "MS Shell Dlg", 0, 0, 0x1&lt;br /&gt;
BEGIN&lt;br /&gt;
    CONTROL         "",IDC_LIST_TEXT,"SysListView32",LVS_REPORT | LVS_OWNERDATA | LVS_NOSORTHEADER | NOT WS_VISIBLE | WS_BORDER | WS_TABSTOP,20,143,397,136&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
The problem is that I can drag the colum header to extreme left and the column goes hidden. To bring it back I will have to again drag the column header to the right.&lt;br /&gt;
&lt;br /&gt;
I want to prevent resizing of this column so that the user cannot drag this completely to the left and make it hidden.&lt;br /&gt;
&lt;br /&gt;
I did try the following code but it is not working.&lt;br /&gt;
&lt;br /&gt;
void CMyTestDlg::OnHDNEndtrackListLog(NMHDR *pNMHDR, LRESULT *pResult)&lt;br /&gt;
{&lt;br /&gt;
LPNMHEADER phdr = reinterpret_cast&amp;lt;LPNMHEADER&amp;gt;(pNMHDR);&lt;br /&gt;
// TODO: Add your control notification handler code here&lt;br /&gt;
if(m_ListCtrl.GetColumnWidth(0) &amp;lt; 100)&lt;br /&gt;
{&lt;br /&gt;
m_ListCtrl.SetColumnWidth(0, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
*pResult = 0;&lt;br /&gt;
}&lt;br /&gt;
Since I have very less time to implement this, I request you kindly give me some examples from MFC Dialog based applications.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/427293/427293/how-to-prevent-resizing-of-column-in-clistctrl/</guid>
      <pubDate>Wed, 08 Feb 2012 00:58:17 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>Unhandled Exception: Access Violation</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/426979/426979/unhandled-exception-access-violation/</link>
      <description>Hello Everyone,&lt;br /&gt;
 &lt;br /&gt;
Am working creating MFC DLL &amp;amp; am getting an error:Unhandled exception at 0x00000000 in Key_Testing.exe: 0xC0000005: Access violation.&lt;br /&gt;
 &lt;br /&gt;
The DLL Code is like this:&lt;br /&gt;
&lt;br /&gt;
//Demo.h&lt;br /&gt;
char*	GetDiskSerialNumber (char g_DiskLetter);&lt;br /&gt;
 &lt;br /&gt;
//Demo.cpp&lt;br /&gt;
char* DLLclass::GetDiskSerialNumber(char g_DiskLetter)&lt;br /&gt;
{&lt;br /&gt;
	CHAR SN[64];&lt;br /&gt;
	memset(SN,0,sizeof(SN));&lt;br /&gt;
		&lt;br /&gt;
	if(GetSerialNumber(SN,g_DiskLetter)){   // Error in this Line..&lt;br /&gt;
		return (char*)SN;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
This DLL am using in an application..&lt;br /&gt;
void CKey_TestingDlg::OnBnClickedgetserial()&lt;br /&gt;
{&lt;br /&gt;
	// TODO: Add your control notification handler code here&lt;br /&gt;
	DLLclass Dllobj;&lt;br /&gt;
	char ltr='h';&lt;br /&gt;
	char* ser=Dllobj.GetDiskSerialNumber(ltr);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Please,, Could anyone suggest where i gone wrong.. Any help will be appriciated..&lt;br /&gt;
 &lt;br /&gt;
Thank you.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/426979/426979/unhandled-exception-access-violation/</guid>
      <pubDate>Wed, 25 Jan 2012 01:27:05 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>static_cast int to CString</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/426629/426629/static_cast-int-to-cstring/</link>
      <description>I am converting some old VC-6 MFC code to VC-10 (64 bit) that was done by a previous employee and have a problem.  There is a template defined that uses a static_cast to convert an int to a CString.  The VC-6 compiler had no problem with it but the VC-10 compliler complains.&lt;br /&gt;
&lt;br /&gt;
template&amp;lt;typename T&amp;gt;&lt;br /&gt;
T Get( CGraphWnd&amp;amp; oGraph, GR_PARAM eparam, T* )&lt;br /&gt;
{&lt;br /&gt;
    int nValue;&lt;br /&gt;
    if( !ograph.GetIntParameter( eparam, &amp;amp;nValue ) )&lt;br /&gt;
        AfxThrowOleException( E_FAIL );&lt;br /&gt;
    return static_cast&amp;lt;T&amp;gt;( nValue );&lt;br /&gt;
}&lt;br /&gt;
CString Get( GraphWnd&amp;amp; ograph, GR_PARAM eparam, CString* );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The error is: "Error C2440: static_cast cannot convert from int to CString."&lt;br /&gt;
&lt;br /&gt;
I am suspecting there is a compiler option that needs to be done (or undone) but cannot find anything.  Any ideas?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/426629/426629/static_cast-int-to-cstring/</guid>
      <pubDate>Wed, 28 Dec 2011 07:50:45 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>www.airmaxtnskosalg.com-expedition parka 4565m black</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/426014/426014/wwwairmaxtnskosalgcom-expedition-parka-4565m-black/</link>
      <description>www.shoxskosalg.com   billige nike air max ltd&lt;br /&gt;
expedition parka 4565m navy  www.timberlandsalgs.com&lt;br /&gt;
www.airmaxtnskosalg.com   billige nike dunk sko&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/426014/426014/wwwairmaxtnskosalgcom-expedition-parka-4565m-black/</guid>
      <pubDate>Thu, 01 Dec 2011 04:21:15 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>How to get  controls information in a window.</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/425415/425415/how-to-get--controls-information-in-a-window/</link>
      <description>Can anyone help me to get the information about all the controls in a window.&lt;br /&gt;
For Ex: suppose if you are opening a properties window of a folder,there you can find textbox,button,tabs etc. so i need to get the information about all the controls in the window.please help me i am waiting.....&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/425415/425415/how-to-get--controls-information-in-a-window/</guid>
      <pubDate>Thu, 27 Oct 2011 22:33:15 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>How to get  controls information in a window.</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/425414/425414/how-to-get--controls-information-in-a-window/</link>
      <description>Can anyone help me to get the information about all the controls in a window.&lt;br /&gt;
For Ex: suppose if you are opening a properties window of a folder,there you can find textbox,button,tabs etc. so i need to get the information about all the controls in the window.please help me i am waiting.....&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/425414/425414/how-to-get--controls-information-in-a-window/</guid>
      <pubDate>Thu, 27 Oct 2011 22:29:50 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>Using Timer with non-dialog class</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/425381/425381/using-timer-with-non-dialog-class/</link>
      <description>Hello,&lt;br /&gt;
 &lt;br /&gt;
I have a class that doesn't connect to a dialog or window&lt;br /&gt;
and I need to do some operations on timer but the timers works only with dialogs ,&lt;br /&gt;
does anyone know another way I do it?&lt;br /&gt;
 &lt;br /&gt;
thank&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/425381/425381/using-timer-with-non-dialog-class/</guid>
      <pubDate>Tue, 25 Oct 2011 01:19:22 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>Please give me some idea 3D surface of revolution</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/424839/424839/please-give-me-some-idea-3d-surface-of-revolution/</link>
      <description>Dear Friends&lt;br /&gt;
I have a dataset like below. 1 means Straight line with startPointX,startPointY,endPointX,endPointY.&lt;br /&gt;
&lt;br /&gt;
//////////////////////////////////////////////////
////////////&lt;br /&gt;
1 0.000000 24.600000 -15.500000 28.575000&lt;br /&gt;
1 -15.500000 28.575000 -37.700000 28.575000&lt;br /&gt;
1 -37.700000 28.575000 -37.700000 36.515000&lt;br /&gt;
1 -37.700000 36.515000 -59.920000 36.515000&lt;br /&gt;
1 -178.200000 52.000000 -138.200000 52.000000&lt;br /&gt;
1 0.000000 24.600000 0.000000 19.000000&lt;br /&gt;
1 -125.421613 36.515000 -138.200000 52.000000&lt;br /&gt;
1 -123.421613 36.515000 -107.873000 36.515000&lt;br /&gt;
1 -100.000000 19.000000 0.000000 19.000000&lt;br /&gt;
1 -105.873000 36.515000 -94.557821 36.515000&lt;br /&gt;
1 -66.103821 36.515000 -88.374000 36.515000&lt;br /&gt;
1 -100.000000 19.000000 0.000000 19.000000&lt;br /&gt;
1 0.000000 19.000000 0.000000 24.600000&lt;br /&gt;
1 0.000000 24.600000 -15.500000 28.575000&lt;br /&gt;
1 -15.500000 28.575000 -37.700000 28.575000&lt;br /&gt;
1 -37.700000 28.575000 -37.700000 36.515000&lt;br /&gt;
1 -37.700000 36.515000 -59.920000 36.515000&lt;br /&gt;
1 -66.103821 36.515000 -88.374000 36.515000&lt;br /&gt;
1 -94.557821 36.515000 -105.873000 36.515000&lt;br /&gt;
1 -107.873000 36.515000 -123.421613 36.515000&lt;br /&gt;
1 -125.421613 36.515000 -138.200000 52.000000&lt;br /&gt;
1 -138.200000 52.000000 -178.200000 52.000000&lt;br /&gt;
1 -115.000000 0.000000 -115.000000 15.000000&lt;br /&gt;
1 -115.000000 15.000000 -100.000000 15.000000&lt;br /&gt;
1 -100.000000 15.000000 -100.000000 19.000000&lt;br /&gt;
1 -100.000000 19.000000 0.200000 19.000000&lt;br /&gt;
1 0.200000 19.000000 0.000000 19.000000&lt;br /&gt;
1 0.000000 19.000000 0.000000 24.574923&lt;br /&gt;
1 0.000000 24.574923 -0.000000 24.600000&lt;br /&gt;
1 0.000000 24.600000 -15.500000 28.575000&lt;br /&gt;
1 -15.500000 28.575000 -37.700000 28.575000&lt;br /&gt;
1 -37.700000 28.575000 -37.700000 36.515000&lt;br /&gt;
1 -37.700000 36.515000 -59.920000 36.515000&lt;br /&gt;
1 -59.920000 36.515000 -66.103821 36.515000&lt;br /&gt;
1 -66.103821 36.515000 -88.374000 36.515000&lt;br /&gt;
1 -88.374000 36.515000 -94.557821 36.515000&lt;br /&gt;
1 -94.557821 36.515000 -105.873000 36.515000&lt;br /&gt;
1 -105.873000 36.515000 -107.873000 36.515000&lt;br /&gt;
1 -107.873000 36.515000 -123.421613 36.515000&lt;br /&gt;
1 -123.421613 36.515000 -125.421613 36.515000&lt;br /&gt;
1 -125.421613 36.515000 -138.200000 52.000000&lt;br /&gt;
1 -138.200000 52.000000 -178.200000 52.000000&lt;br /&gt;
1 -178.200000 52.000000 -178.200000 52.500000&lt;br /&gt;
1 -178.200000 52.500000 -178.200000 55.000000&lt;br /&gt;
1 -178.200000 55.000000 -190.000000 55.000000&lt;br /&gt;
1 5.000000 0.000000 5.000000 55.000000&lt;br /&gt;
1 5.000000 55.000000 -190.000000 55.000000&lt;br /&gt;
//////////////////////////////////////////////////
////////////&lt;br /&gt;
&lt;br /&gt;
I have to construct a profile which I can easily do by making a GL_LINES.&lt;br /&gt;
&lt;br /&gt;
After that I need rotate the profile by x-axis and construct a surface of revolution. Please giveme some idea how can I achieve this. I have done something but I am not getting the surface.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Like I am storing the original startPoints and endPoints in an array with assuming z=0.&lt;br /&gt;
Then rotating each point by x-axis. so x-values will be same and y and z values I am calculating using this formula.&lt;br /&gt;
y = y cosq - z sinq;&lt;br /&gt;
z = ysinq + zcosq;&lt;br /&gt;
&lt;br /&gt;
Is this correct...?? Then I am defining a number of loops and in loop I am creating GL_QUADS for each startPoint and endPoint...&lt;br /&gt;
1st loop 1ststartPoint, 1stLoop 1stendPoint&lt;br /&gt;
2nd loop 1stStartPoint, 2nd loop 1stEndPoint...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But I am not getting any 3D surface. Please help me.........Check the code below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//////////////////////////////////////////////////
//////////////////////////////////////////////////
//////&lt;br /&gt;
typedef struct point3D{&lt;br /&gt;
float x;&lt;br /&gt;
float y;&lt;br /&gt;
float z;&lt;br /&gt;
}POINT3D;&lt;br /&gt;
&lt;br /&gt;
int count1;&lt;br /&gt;
POINT3D *startPoints, *endPoints;&lt;br /&gt;
&lt;br /&gt;
void CRevolutionProjView::drawProfile(CString filename)&lt;br /&gt;
{&lt;br /&gt;
pFrame-&amp;gt;m_wndStatusBar.SetPaneText(0,L"DrawProfile !!");&lt;br /&gt;
&lt;br /&gt;
// profile to be drawn&lt;br /&gt;
&lt;br /&gt;
GLfloat PI = 4 * atan(1.0);&lt;br /&gt;
&lt;br /&gt;
//file needs be open&lt;br /&gt;
double startPX, startPY, endPX, endPY;&lt;br /&gt;
double cenX, cenY, cenZ, rad, startA, endA;&lt;br /&gt;
ifstream indata; // indata is like cin&lt;br /&gt;
int id; // variable for input value&lt;br /&gt;
indata.open(filename); // opens the file&lt;br /&gt;
if(!indata) { // file couldn't be opened&lt;br /&gt;
cerr &amp;lt;&amp;lt; "Error: file could not be opened" &amp;lt;&amp;lt; endl;&lt;br /&gt;
exit(1);&lt;br /&gt;
}&lt;br /&gt;
count1=0;&lt;br /&gt;
while ( !indata.eof() ) { // keep reading until end-of-file&lt;br /&gt;
indata &amp;gt;&amp;gt; id;&lt;br /&gt;
cout &amp;lt;&amp;lt; "The id is " &amp;lt;&amp;lt; id &amp;lt;&amp;lt; endl;&lt;br /&gt;
if(id==1)&lt;br /&gt;
{&lt;br /&gt;
indata &amp;gt;&amp;gt; startPX &amp;gt;&amp;gt; startPY &amp;gt;&amp;gt; endPX &amp;gt;&amp;gt; endPY;&lt;br /&gt;
glBegin(GL_LINES);&lt;br /&gt;
glVertex2f(startPX, startPY); // origin of the line&lt;br /&gt;
glVertex2f(endPX, endPY); // ending point of the line&lt;br /&gt;
glEnd();&lt;br /&gt;
&lt;br /&gt;
if(count1==0)&lt;br /&gt;
{&lt;br /&gt;
startPoints = (POINT3D *)malloc(sizeof(POINT3D));&lt;br /&gt;
endPoints = (POINT3D *)malloc(sizeof(POINT3D));&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
startPoints = (POINT3D *)realloc(startPoints,sizeof(POINT3D)*(count1+1));&lt;br /&gt;
endPoints = (POINT3D *)realloc(endPoints,sizeof(POINT3D) * (count1+1));&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
startPoints[count1].x = startPX;&lt;br /&gt;
startPoints[count1].y = startPY;&lt;br /&gt;
startPoints[count1].z = 0.0f;&lt;br /&gt;
endPoints[count1].x = endPX;&lt;br /&gt;
endPoints[count1].y = endPY;&lt;br /&gt;
endPoints[count1].z = 0.0f;&lt;br /&gt;
count1++;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
indata.close();&lt;br /&gt;
cout &amp;lt;&amp;lt; "End-of-file reached.." &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void CRevolutionProjView::drawSurface()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
double PI = 4.0 * atan(1.0);&lt;br /&gt;
&lt;br /&gt;
//I have x and y points;&lt;br /&gt;
&lt;br /&gt;
//count1 = numberof points&lt;br /&gt;
&lt;br /&gt;
//theta = 0 to 360 degs.&lt;br /&gt;
&lt;br /&gt;
//nsweep = number of sweeps. 360/nsweep = each angle;&lt;br /&gt;
int nsweep=4;&lt;br /&gt;
&lt;br /&gt;
//no of profiles = nsweep + 1...&lt;br /&gt;
&lt;br /&gt;
//each profile will have count1 no of lines...so count1 startpoints and count1 endPoints...&lt;br /&gt;
&lt;br /&gt;
//so...total startPoints and endPoints for (nsweep+1) profiles = (nsweep+1) * count1...&lt;br /&gt;
&lt;br /&gt;
POINT3D *totalStartPoints, *totalEndPoints;&lt;br /&gt;
totalStartPoints = new POINT3D[(nsweep+1)*count1];&lt;br /&gt;
totalEndPoints = new POINT3D[(nsweep+1)*count1];&lt;br /&gt;
int cnt1=0;&lt;br /&gt;
double theta, inter;&lt;br /&gt;
inter = (360/nsweep) * (PI/180);&lt;br /&gt;
theta = 0;&lt;br /&gt;
for(int i=0; i&amp;lt;(nsweep+1); i++)&lt;br /&gt;
{&lt;br /&gt;
for(int j=0; j&amp;lt;count1; j++)&lt;br /&gt;
{&lt;br /&gt;
totalStartPoints[cnt1].x = startPoints[j].x;&lt;br /&gt;
totalStartPoints[cnt1].y = startPoints[j].y * cos(theta) - startPoints[j].z * sin(theta);&lt;br /&gt;
totalStartPoints[cnt1].z = startPoints[j].y * sin(theta) + startPoints[j].z * cos(theta);&lt;br /&gt;
&lt;br /&gt;
totalEndPoints[cnt1].x = endPoints[j].x;&lt;br /&gt;
totalEndPoints[cnt1].y = endPoints[j].y * cos(theta) - endPoints[j].z * sin(theta);&lt;br /&gt;
totalEndPoints[cnt1].z = endPoints[j].y * sin(theta) + endPoints[j].z * cos(theta);&lt;br /&gt;
cnt1++;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
theta = theta + inter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
cnt1=0;&lt;br /&gt;
glColor3f(1.0f,0.0f,0.0f);&lt;br /&gt;
for(int i=0; i&amp;lt;nsweep; i++)&lt;br /&gt;
{&lt;br /&gt;
for(int j=0; j&amp;lt;count1; j++) {&lt;br /&gt;
&lt;br /&gt;
GLfloat *v0, *v1, *v2, *v3;&lt;br /&gt;
&lt;br /&gt;
v0 = new GLfloat[3];&lt;br /&gt;
v1 = new GLfloat[3];&lt;br /&gt;
v2 = new GLfloat[3];&lt;br /&gt;
v3 = new GLfloat[3];&lt;br /&gt;
&lt;br /&gt;
v0[0] = totalStartPoints[cnt1].x;&lt;br /&gt;
v0[1] = totalStartPoints[cnt1].y;&lt;br /&gt;
v0[2] = totalStartPoints[cnt1].z;&lt;br /&gt;
&lt;br /&gt;
v1[0] = totalEndPoints[cnt1].x;&lt;br /&gt;
v1[1] = totalEndPoints[cnt1].y;&lt;br /&gt;
v1[2] = totalEndPoints[cnt1].z;&lt;br /&gt;
&lt;br /&gt;
v2[0] = totalEndPoints[cnt1+count1].x;&lt;br /&gt;
v2[1] = totalEndPoints[cnt1+count1].y;&lt;br /&gt;
v2[2] = totalEndPoints[cnt1+count1].z;&lt;br /&gt;
&lt;br /&gt;
v3[0] = totalStartPoints[cnt1+count1].x;&lt;br /&gt;
v3[1] = totalStartPoints[cnt1+count1].y;&lt;br /&gt;
v3[2] = totalStartPoints[cnt1+count1].z;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
glBegin(GL_QUADS); // draw a cube with 6 quads&lt;br /&gt;
glVertex3fv(v0); // front face&lt;br /&gt;
glVertex3fv(v1);&lt;br /&gt;
glVertex3fv(v2);&lt;br /&gt;
glVertex3fv(v3);&lt;br /&gt;
glEnd();&lt;br /&gt;
delete v0;&lt;br /&gt;
delete v1;&lt;br /&gt;
delete v2;&lt;br /&gt;
delete v3;&lt;br /&gt;
cnt1++;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//////////////////////////////////////////////////
//////////////////////////////////////////////////
////// &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/424839/424839/please-give-me-some-idea-3d-surface-of-revolution/</guid>
      <pubDate>Thu, 22 Sep 2011 07:14:08 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>MFC OpenGL Invalidate Flickering</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/424770/424770/mfc-opengl-invalidate-flickering/</link>
      <description>Dear Friends&lt;br /&gt;
I am wirting an application for drawing a rectangle on the screen using opengl and mfc. So I implemented the OnPaint function, OnDraw function is also giving the same problem. It's drawing fine. I want to implement pan, zoom, and rotate functionalities. Now everytime the mouse moves I am calling Invalidate() or otherwise I can call Invalidate() in the ::OnDraw function. Pan, zoom and rotate everything is happening but its heavily flickering. I have serached a lot and tried all means like return 1 in the OnEraseBackground() functio for WM_ERASEBACKGROUND etc. But I am getting still flickering . Please help getting rid of this problem. Check the code snippet below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void CRevolutionProjView::OnPaint()&lt;br /&gt;
{&lt;br /&gt;
CPaintDC dc(this); // device context for painting&lt;br /&gt;
// TODO: Add your message handler code here&lt;br /&gt;
CRect RectAff; &lt;br /&gt;
GetClientRect(RectAff);&lt;br /&gt;
glClearColor ( 0.0f, 0.0f, 0.0f, 0.0f ) ;&lt;br /&gt;
glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) ;&lt;br /&gt;
glPushMatrix( ) ;&lt;br /&gt;
glTranslatef(trans[0], trans[1], trans[2]);&lt;br /&gt;
glRotatef(rot[0], 1.0f, 0.0f, 0.0f);&lt;br /&gt;
glRotatef(rot[1], 0.0f, 1.0f, 0.0f);&lt;br /&gt;
drawcube();&lt;br /&gt;
glPopMatrix( ) ;&lt;br /&gt;
glFinish( ) ;&lt;br /&gt;
glFlush();&lt;br /&gt;
SwapBuffers(hDC);&lt;br /&gt;
Invalidate(false);&lt;br /&gt;
// Do not call CView::OnPaint() for painting messages&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void CRevolutionProjView::OnMouseMove(UINT nFlags, CPoint point)&lt;br /&gt;
{&lt;br /&gt;
newP = point;&lt;br /&gt;
// TODO: Add your message handler code here and/or call default&lt;br /&gt;
int dx = oldP.x - newP.x;&lt;br /&gt;
int dy = newP.y - oldP.y;&lt;br /&gt;
switch(STATE)&lt;br /&gt;
{&lt;br /&gt;
case PAN:&lt;br /&gt;
{&lt;br /&gt;
trans[0] -= dx/100.0f; &lt;br /&gt;
trans[1] -= dy/100.0f;&lt;br /&gt;
// Invalidate();&lt;br /&gt;
}&lt;br /&gt;
break;&lt;br /&gt;
case ZOOM:&lt;br /&gt;
{&lt;br /&gt;
trans[2] -= (dx+dy) / 100.0f;&lt;br /&gt;
// Invalidate();&lt;br /&gt;
}&lt;br /&gt;
break;&lt;br /&gt;
case ROTATE:&lt;br /&gt;
{&lt;br /&gt;
rot[0] += (dy * 180.0f) / 500.0f;&lt;br /&gt;
rot[1] -= (dx * 180.0f) / 500.0f;&lt;br /&gt;
#define clamp(x) x = x &amp;gt; 360.0f ? x-360.0f : x &amp;lt; -360.0f ? x+=360.0f : x &lt;br /&gt;
clamp(rot[0]);&lt;br /&gt;
clamp(rot[1]);&lt;br /&gt;
// Invalidate();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
break;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
oldP = newP;&lt;br /&gt;
&lt;br /&gt;
CView::OnMouseMove(nFlags, point);&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/424770/424770/mfc-opengl-invalidate-flickering/</guid>
      <pubDate>Wed, 14 Sep 2011 09:22:52 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>How to update text in CStatic without blinking</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/424653/424653/how-to-update-text-in-cstatic-without-blinking/</link>
      <description>Hi All.&lt;br /&gt;
&lt;br /&gt;
On a dialog I have a CStatic control which I want to refresh dynamically. I tried to use SetDlgItemText, SetWindowText and&lt;br /&gt;
some other functions, however whenever I update the control's text it blinks.&lt;br /&gt;
Can anyone help me how can I refresh the control's text without blinking?&lt;br /&gt;
&lt;br /&gt;
Thanks in advance.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/424653/424653/how-to-update-text-in-cstatic-without-blinking/</guid>
      <pubDate>Tue, 30 Aug 2011 22:50:11 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>Trying to use CTabCtrl - VS 2010</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/424402/424402/trying-to-use-ctabctrl---vs-2010/</link>
      <description>Am trying to place child dialogs inside a CTabCtrl, using the example/tutorial at &lt;a href="http://www.codersource.net/mfc-tutorials.ctabctrl.aspx"&gt;http://www.codersource.net/mfc-tutorials.ctabctrl.aspx&lt;/a&gt; .   I have now worked through the example twice and gotten it to build -- but it incurs an access violation on trying to Create my child dialogs, because GetParent() fails, because someone's (not sure whose) m_hWnd is NULL.  I am sort of new to all this, don't know the particular operations that have to happen, in what order, or how I make that happen, to get m_hWnd NOT to be NULL at that point in the program.&lt;br /&gt;
&lt;br /&gt;
Oddly, the downloadable .zip of source code linked from that site, after conversion to VS 2010, builds AND works, yet a diff between its files and mine shows only very minor differences, in areas that, as far as I can tell, don't seem to have any bearing on creating subclassed Dialog controls.&lt;br /&gt;
&lt;br /&gt;
I would very much appreciate any light anyone can shed.  Thanks in advance.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/424402/424402/trying-to-use-ctabctrl---vs-2010/</guid>
      <pubDate>Wed, 27 Jul 2011 06:41:54 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>convert CString Ascii to decimal from serial port</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/424365/424365/convert-cstring-ascii-to-decimal-from-serial-port/</link>
      <description>Hello...&lt;br /&gt;
I Have a MFC application and I want to convert CString Ascii to decimal from serial port. this my source code :&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;		
        int dcount=0;
	CString data[4];
		VARIANT in_dat;

	if(	m_comm.GetCommEvent()==2)
	{
			in_dat = m_comm.GetInput();
			CString strInput(in_dat.bstrVal);

			if(strInput == "*")
			{
			for(dcount=0; dcount&amp;lt;=2;dcount++)
			{
				in_dat = m_comm.GetInput();
				CString strInput(in_dat.bstrVal);

				data[dcount] = strInput;
			}
				int z = atoi(data[0]); // convert ascii to decimal
				int x = atoi(data[1]);
				int c = atoi(data[2]);
				m_Total.Format("%s%i%i%i | %s%s%s%s",strInput,z,x,c, strInput,data[0],data[1],data[2]);
			}

			
			
	}
			UpdateData(FALSE);	&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
if I run the program a result is false. I'm sorry I can't speak english fluently... thx&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/424365/424365/convert-cstring-ascii-to-decimal-from-serial-port/</guid>
      <pubDate>Sun, 24 Jul 2011 13:40:10 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>CEdit: problem with displaying a box on a control addition</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/424358/424358/cedit-problem-with-displaying-a-box-on-a-control-addition/</link>
      <description>Using a regular create I try to add an input control and it displays only a text of the control, but not the box. &lt;br /&gt;
&lt;br /&gt;
Actually I try to have a dialog - on a click of a button I need to create an input for a matrix. So there's not problem of taking the value from already created controls, but after "creation" of a new one (CEdit) only the text appears on a form.... Can anyone explain to me how I can resolve this problem, PLEASE! This might be a simple answer, but I could not figure for a past couple days:)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/424358/424358/cedit-problem-with-displaying-a-box-on-a-control-addition/</guid>
      <pubDate>Sun, 24 Jul 2011 06:21:17 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>Flickering on resize</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/424301/424301/flickering-on-resize/</link>
      <description>Hi, I'm using a windows form, and I'm doing all the drawing myself, that is: Copying the image to an off-screen surface, then doing a bit_blit to "swap" with the surface on the window. It works great, except when I resize. Somewhere under the hood, MFC is telling the window to completely erase the background before drawing again. I want to turn off that behaviour. How do I do that?&lt;br /&gt;
&lt;br /&gt;
Based on msdn and other resources, the best lead I've found is this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
BOOL CChildView::PreCreateWindow(CREATESTRUCT&amp;amp; cs) 
{
	if (!CWnd::PreCreateWindow(cs))
		return FALSE;

	cs.dwExStyle |= WS_EX_CLIENTEDGE;
	cs.style &amp;amp;= ~WS_BORDER;
	cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW|CS_DBLCL
KS, 
		::LoadCursor(NULL, IDC_ARROW), reinterpret_cast&amp;lt;HBRUSH&amp;gt;(COLOR_WINDOW+1), NULL);

	return TRUE;
}

&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
According to msdn, if you set the classStyle to NULL, that'll override the erase behaviour. I tried that, and it doesn't work.  &lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/cw5335z0%28v=vs.80%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/cw5335z0%28v=vs.80%29.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I've read elsewhere that you gotta override OnEraseBcknd to always return TRUE, or always return FALSE. Tried both, doesn't work.&lt;br /&gt;
&lt;br /&gt;
Has anyone found a solution to this problem in MFC?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/424301/424301/flickering-on-resize/</guid>
      <pubDate>Sun, 17 Jul 2011 17:53:59 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>How to write to console while running MFC application</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/424227/424227/how-to-write-to-console-while-running-mfc-application/</link>
      <description>Hey,&lt;br /&gt;
I have a MFC application and I want to write the values of some variables while the application is running to the console. Is there a way to do this and if so how? &lt;br /&gt;
Thanks In Advance!!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/424227/424227/how-to-write-to-console-while-running-mfc-application/</guid>
      <pubDate>Mon, 11 Jul 2011 18:12:57 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>color edit box?</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/423655/423655/color-edit-box/</link>
      <description>hello every one,..&lt;br /&gt;
&lt;br /&gt;
if I have 10 edit boxes, and the user enter text into only 5 of these edit box&lt;br /&gt;
I want to change the color of text entered by user&lt;br /&gt;
while the remainder edit boxes (no used by user) will have the default color(black)&lt;br /&gt;
&lt;br /&gt;
note that all variables associate with edit boxes is of type integer&lt;br /&gt;
&lt;br /&gt;
any suggestion idea..?&lt;br /&gt;
or even idea to make it &lt;strong&gt;bold &lt;/strong&gt;or &lt;em&gt;italic &lt;/em&gt;font&lt;br /&gt;
&lt;br /&gt;
thx in advance&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/423655/423655/color-edit-box/</guid>
      <pubDate>Thu, 05 May 2011 23:44:28 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>Problems with MFC and OpenGL objects together with Windows 7 Aero</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/423047/423047/problems-with-mfc-and-opengl-objects-together-with-windows-7-aero/</link>
      <description>Hello programmers,&lt;br /&gt;
&lt;br /&gt;
I solve a strange behavior of MFC graphic objects together with OpenGL objects when Windows 7 Aero is enabled on my desktop. I describe that matter more detail now, I have created MDI application by MFC framework in VC++ where I have implemented OpenGL functions to draw 3D objects. In some child windows, there is a need to draw any 2D graphic objects provided by MFC (e.g. ellipse) realized by CDC to that window where has been drawn OpenGL 3D object. When Aero is disabled, it works excellently but if it's enabled, then e.g. ellipse is drawn into a rectangle area that has a background including rubbish of some graphical buffer (probably second buffer of the double buffer drawing). I know, the Aero is a new technology implemented there that uses double buffer mechanism. I'm also able to disable Aero motive from my application, but it has a global influence to all running applications because their appearence is change to the basic motive. I don't want to solve this problem by disabling the Aero, it's not professional. I would like to solve the objects drawing where I mix OpenGL rendering context together with MFC device context in one child window.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: xx-small;"&gt;When I specify the PIXELFORMATDESCRIPTOR structure for the SetPixelFormat function with PFD_DOUBLEBUFFER flag, then I have the mentioned problem. When I change the flag to PFD_SUPPORT_GDI, then it works properly but the 3D objects drawing is too slow, it's really unusable.&lt;br /&gt;
&lt;br /&gt;
Does anybody know how to solve&lt;/span&gt; this unpleasant problem with mentioned graphical constellation?&lt;br /&gt;
&lt;br /&gt;
Is there any mechanism to block the double buffers drawing?&lt;br /&gt;
&lt;br /&gt;
Thanks for answers.&lt;br /&gt;
&lt;br /&gt;
Michal&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/423047/423047/problems-with-mfc-and-opengl-objects-together-with-windows-7-aero/</guid>
      <pubDate>Wed, 06 Apr 2011 06:20:02 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>How to know if a thread is finished and wait for it if it isn't</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/422791/422791/how-to-know-if-a-thread-is-finished-and-wait-for-it-if-it-isnt/</link>
      <description>I can't believe I don't know this already, but I'm unable to figure out how to know if a thread is finished &lt;em&gt;and&lt;/em&gt; wait for it if it isn't w/out a race condition. I've used the AfxBeginThread() to start it, and I'm told that I would WaitForSingleObject() to know when it is done, but it seems that that function returns WAIT_FAILED if the thread is no longer running. What's the appropriate way to just know if it's done and wait if it hasn't &lt;em&gt;without&lt;/em&gt; a race condition?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/422791/422791/how-to-know-if-a-thread-is-finished-and-wait-for-it-if-it-isnt/</guid>
      <pubDate>Sat, 26 Mar 2011 15:57:11 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>Own Constructor doesn't work.</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/422703/422703/own-constructor-doesnt-work/</link>
      <description>Hello, &lt;br /&gt;
&lt;br /&gt;
I have created my own derived class which base class is CFileDialog, then I have also created my own contructor to that file, my contructor should open a file dialog box with possiblity of choosing file, but after placing a command button and clicking on it, the only thing I get is something like AfxMessageBox with error message : &lt;br /&gt;
&lt;br /&gt;
Attempted an unsupported action &lt;br /&gt;
&lt;br /&gt;
I use VS C++ 2008, could you please tell me why I get this error message, please see definition of my class, below : &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
class FileDialog : public CFileDialog&lt;br /&gt;
{&lt;br /&gt;
	DECLARE_DYNAMIC(FileDialog)&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
	// Constructor&lt;br /&gt;
	FileDialog(BOOL bOpenFileDialog,&lt;br /&gt;
	              LPCTSTR lpszFileName = NULL,&lt;br /&gt;
	              DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,&lt;br /&gt;
	              CWnd *pParentWnd = NULL);&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
// Contructor on button click : &lt;br /&gt;
void PageFile::OnBnClickedButton1()&lt;br /&gt;
{&lt;br /&gt;
	// TODO: Add your control notification handler code here&lt;br /&gt;
	FileDialog elo(true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt; &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/422703/422703/own-constructor-doesnt-work/</guid>
      <pubDate>Thu, 24 Mar 2011 01:44:10 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>Problem with RegisterPowerSettingNotification and USER32.dll.</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/422327/422327/problem-with-registerpowersettingnotification-and-user32dll/</link>
      <description>Hello,&lt;br /&gt;
&lt;br /&gt;
When I call to the fanction RegisterPowerSettingNotification I get a runtime error:&lt;br /&gt;
&lt;br /&gt;
"The procedure entry point could not be located in the dynamic link library USER32.dll."&lt;br /&gt;
&lt;br /&gt;
I tried to replace user32.dll but its didnt help.&lt;br /&gt;
&lt;br /&gt;
My OS is windows xp, the code is:&lt;br /&gt;
&lt;br /&gt;
     HPOWERNOTIFY m_hPowerSchemeNotify;&lt;br /&gt;
     m_hPowerSchemeNotify = RegisterPowerSettingNotification (&lt;br /&gt;
     NULL, &amp;amp;GUID_POWERSCHEME_PERSONALITY,&lt;br /&gt;
     DEVICE_NOTIFY_WINDOW_HANDLE );&lt;br /&gt;
&lt;br /&gt;
     if ( NULL == m_hPowerSchemeNotify )&lt;br /&gt;
         ATLTRACE("Failed to register for notification of power scheme changes!\n");&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if anyone can guid me how can I solve this problam I would be very grateful for him.&lt;br /&gt;
&lt;br /&gt;
thanks&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/422327/422327/problem-with-registerpowersettingnotification-and-user32dll/</guid>
      <pubDate>Thu, 10 Mar 2011 04:37:30 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>What is the problem of this program...?</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/421916/421916/what-is-the-problem-of-this-program/</link>
      <description>I've write this program and I don't know why&lt;br /&gt;
&lt;br /&gt;
I have problem when I run that...&lt;br /&gt;
&lt;br /&gt;
Please download it and help me.&lt;br /&gt;
 Thanks.&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=1983"&gt;Mechan.rar&lt;/a&gt; (39627 bytes | downloaded 39 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/421916/421916/what-is-the-problem-of-this-program/</guid>
      <pubDate>Tue, 22 Feb 2011 05:59:44 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>Rich Edit Control Internal Data Structure</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/421752/421752/rich-edit-control-internal-data-structure/</link>
      <description>I have a Handle to the Rich Edit Control of Wordpad application in my Keypad application. I want to directly access the Internal Data Structure for this Rich Edit Control without using Windows Messages .&lt;br /&gt;
I do not want to use any of the SendMessage PostMessage APIs or Windows Messaging as this exposes my typed data to keyloggers. How can I write directly to the Internal Buffer of Rich Edit Control ?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/421752/421752/rich-edit-control-internal-data-structure/</guid>
      <pubDate>Tue, 15 Feb 2011 03:23:05 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>How to use CTabCtrl::GetCurSel in MFC C++</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/421328/421328/how-to-use-ctabctrlgetcursel-in-mfc-c++/</link>
      <description>Hey,&lt;br /&gt;
I am trying to call CTabCtrl::GetCurSel() in my program and if a certain tab is selected to do a certain action. I am aware that this function returns the zero-based index of the selected tab, which is the problem for me. How can you find out the index of a tab? Any help will be greatly appreciated!!!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/421328/421328/how-to-use-ctabctrlgetcursel-in-mfc-c++/</guid>
      <pubDate>Fri, 28 Jan 2011 16:37:29 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
    <item>
      <title>How to update an edit box control durning run time</title>
      <link>http://www.programmersheaven.com/mb/mfc_coding/421274/421274/how-to-update-an-edit-box-control-durning-run-time/</link>
      <description>Hey,&lt;br /&gt;
I am new to MFC and I am working on this existing project where there is a button and when you click this button another dialog opens that has four different tabs. My job is to save data entered in an edit box on one of the tabs if the send button on the same tab page is clicked and show the saved data when the dialog is opened again. If the send button is not clicked I need to set the edit box data to a default value and show it when the dialog is opened again. I have this working when the user changes between tabs by placing methods in the OnShowWindow(). However, this method is not called when the dialog is closed via the close button or the "x" on dialog. Once the dialog is closed and opened back up it opens the dialog showing the last tab viewed before closing the dialog. With this in mind, I plcae some methods in the close button and in debug the methods are executed correctly but the edit box on the tab is not updated with the correct data when the dialog is opened. Is there any way to do this? Any help will be great!!!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mfc_coding/421274/421274/how-to-update-an-edit-box-control-durning-run-time/</guid>
      <pubDate>Wed, 26 Jan 2011 18:55:54 -0800</pubDate>
      <category>C++ MFC</category>
    </item>
  </channel>
</rss>
