<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>C++.NET Forum RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest threads from the 'C++.NET' forum at Programmer's Heaven, excluding replies.</description>
    <language>en</language>
    <copyright>Copyright 2008 Programmers Heaven</copyright>
    <pubDate>Thu, 24 Jul 2008 22:31:29 -0700</pubDate>
    <lastBuildDate>Thu, 24 Jul 2008 22:31:29 -0700</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>problem with the exe created during release mode</title>
      <link>http://www.programmersheaven.com/mb/cppnet/373182/373182/ReadMessage.aspx</link>
      <description>Hi friends,&lt;br /&gt;
I am working with vc++.Net...In my project i have to spawn an exe application(Say Ex:Notepad)...I used create process to spawn the Notepad application...Also i have one ini file which is used in my Project and an external dll created using C# code...In my project If i cant spawn the Notepad application due to any situation then i ll display a messsage "Cannot spawn the Child process".. My problem is : i have to create exe for this project in release mode...If i select "Release mode" from the IDE and run the application it works perfectly [After doing some changes in settings 1.Project Menu---&amp;gt;Property pages---&amp;gt; C/C++ ---&amp;gt;General---&amp;gt; Debug Information Format , in changed to Program Database&lt;br /&gt;
                     2.)Property pages---&amp;gt; C/C++ ---Optimization---Optimization, i select disabled.]&lt;br /&gt;
                 after i did this changes application runs successfully and spawn the notepad application...&lt;br /&gt;
&lt;br /&gt;
After running this i go to the release folder and try to run the exe file created there [by double clicking]...But i got the message "Cannot spawn the Child process".."Why??? Any known friends Help me...Thanks in advance...&lt;br /&gt;</description>
      <pubDate>Mon, 07 Jul 2008 01:46:57 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>how to save the tiff image in uncompressed form??</title>
      <link>http://www.programmersheaven.com/mb/cppnet/373163/373163/ReadMessage.aspx</link>
      <description>&lt;br /&gt;
the application i am using requires the uncompressed tiff file having bit depth 1 and resolution of 300dpi. it is built in dot net 2003. whenever i open the uncompressed tiff image having bit depth 1 and save the same tiff image using savefiledialog function of dot net2003, the uncompressed tiff file becomes compressed and the bit depth is increased to 32. i haven't use any compression function. the code of saving the file is given below&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: Blue;"&gt;private: void saveImageFile()&lt;br /&gt;
{&lt;br /&gt;
saveImage-&amp;gt;Filter= "Tiff files (*.tif)|*.tif" ;&lt;br /&gt;
saveImage-&amp;gt;FilterIndex = 1 ;&lt;br /&gt;
saveImage-&amp;gt;RestoreDirectory = true ;&lt;br /&gt;
&lt;br /&gt;
System::Windows::Forms::DialogResult d = this-&amp;gt;saveImage-&amp;gt;ShowDialog();&lt;br /&gt;
if (d == System::Windows::Forms::DialogResult::OK)&lt;br /&gt;
{&lt;br /&gt;
// creating a bitmap&lt;br /&gt;
Bitmap* saveMyImage;&lt;br /&gt;
saveMyImage=new Bitmap(this-&amp;gt;pictureBox1-&amp;gt;Image);//,System::Drawing::Imaging::PixelFormat::
Format1bppIndexed);&lt;br /&gt;
saveMyImage-&amp;gt;SetResolution(300,300);&lt;br /&gt;
saveMyImage-&amp;gt;PixelFormat::Format1bppIndexed;// this line doesnot work&lt;br /&gt;
saveMyImage-&amp;gt;Save(saveImage-&amp;gt;FileName,System::Drawing::Imaging::ImageFormat::T
iff);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;/span&gt;&lt;br /&gt;</description>
      <pubDate>Sun, 06 Jul 2008 01:27:39 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>Which is Better Pro*C/C++ or C# ???</title>
      <link>http://www.programmersheaven.com/mb/cppnet/370584/370584/ReadMessage.aspx</link>
      <description>&lt;br /&gt;
Hi friends,&lt;br /&gt;
I want to develop one business (back end exe to do functional computations and get/store data into Oracle) application which i can develop either in Pro*C/C++ or C#.&lt;br /&gt;
Which language (Pro*C/C++ or C#) shall i chose ??? and why ???&lt;br /&gt;
which application will be more faster ?? and why ???&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Tue, 25 Mar 2008 10:07:09 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>MS Access in C++.NET</title>
      <link>http://www.programmersheaven.com/mb/cppnet/367445/367445/ReadMessage.aspx</link>
      <description>Hi!&lt;br /&gt;
&lt;br /&gt;
I'm trying to update my MS Access database but it doesn't seem to work...&lt;br /&gt;
in other languages you can use  OleDbConnection-&amp;gt;ExecuteNonQuery()&lt;br /&gt;
but there's no such in c++.NET&lt;br /&gt;
&lt;br /&gt;
I'm able to read the database but not update it...&lt;br /&gt;
&lt;br /&gt;
could someone help me out?&lt;br /&gt;</description>
      <pubDate>Mon, 19 Nov 2007 21:44:04 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>greyscale image processing</title>
      <link>http://www.programmersheaven.com/mb/cppnet/367185/367185/ReadMessage.aspx</link>
      <description>HI, Everyone!&lt;br /&gt;
I have to process 2 greyscale images in .pgm format and perform a search for moving vectors between the two. For the first image (reference) i'm ok, since I have to get just a 16 x 16 pixel array.&lt;br /&gt;
For the second (target) I've encountered some problems with time:&lt;br /&gt;
I take every possible block 16x16 of pixels and it takes about 5-7 minutes for only that image since I use for loops (standard libs).&lt;br /&gt;
Anyone can suggest me some code or libraries or links that might help me speed it up a little?&lt;br /&gt;
&lt;br /&gt;
OS: Windows XP SP2&lt;br /&gt;
Software: MS Visual Studio .Net 2005&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Sun, 11 Nov 2007 11:13:53 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>c++.net 2005 and ado.net problem</title>
      <link>http://www.programmersheaven.com/mb/cppnet/366948/366948/ReadMessage.aspx</link>
      <description>Hello,&lt;br /&gt;
&lt;span style="color: Black;"&gt;&lt;br /&gt;
  I am trying to learn how to programatically create a connection to a sql server database on my local machine. My server name is DAEDULUS and database name is RezSys. When ever I try to extract data from the table Hotel it gives me the following error:&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: Green;"&gt;&lt;br /&gt;
Connection Sucessfull&lt;br /&gt;
&lt;br /&gt;
Unhandled Exception: System.IndexOutOfRangeException: Index was outside the boun&lt;br /&gt;
ds of the array.&lt;br /&gt;
   at System.Data.SqlClient.SqlDataReader.ReadColumn(Int
32 i, Boolean setTimeout&lt;br /&gt;
)&lt;br /&gt;
   at System.Data.SqlClient.SqlDataReader.GetInt32(Int32 i)&lt;br /&gt;
   at main(String[] args) in c:\documents and settings\jut\my documents\visual s&lt;br /&gt;
tudio 2005\projects\test\test\test.cpp:line 28&lt;br /&gt;
   at mainCRTStartupStrArray(String[] arguments) in f:\rtm\vctools\crt_bld\self_&lt;br /&gt;
x86\crt\src\mcrtexe.cpp:line 324&lt;br /&gt;
Press any key to continue . . .&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: Black;"&gt;I know I should have a try catch block but that will come after. &lt;br /&gt;
&lt;br /&gt;
My source code is below:&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: Green;"&gt;&lt;br /&gt;
#include "stdafx.h"&lt;br /&gt;
&lt;br /&gt;
using namespace System;&lt;br /&gt;
using namespace System::Data::SqlClient;&lt;br /&gt;
&lt;br /&gt;
int main(array&amp;lt;System::String ^&amp;gt; ^args)&lt;br /&gt;
{&lt;br /&gt;
   &lt;br /&gt;
	&lt;br /&gt;
	Console::WriteLine(L"Hello World");&lt;br /&gt;
    &lt;br /&gt;
		SqlCommand^ comm;&lt;br /&gt;
			&lt;br /&gt;
SqlConnection^ myCon = gcnew SqlConnection("server=DAEDULUS;Trusted_Connection=
yes;Initial Catalog=RezSys;");&lt;br /&gt;
			myCon-&amp;gt;Open();&lt;br /&gt;
            comm = gcnew SqlCommand("select [RoomType] from [Hotel]",myCon);&lt;br /&gt;
			if(comm-&amp;gt;ExecuteNonQuery())&lt;br /&gt;
			{&lt;br /&gt;
				Console::WriteLine(L"Connection Sucessfull");&lt;br /&gt;
			}&lt;br /&gt;
              &lt;br /&gt;
			SqlDataReader^ reader;&lt;br /&gt;
			reader = comm-&amp;gt;ExecuteReader();&lt;br /&gt;
while(reader-&amp;gt;Read())&lt;br /&gt;
{&lt;br /&gt;
	Console::Write(reader-&amp;gt;GetInt32(1)); &lt;br /&gt;
	}&lt;br /&gt;
myCon-&amp;gt;Close();&lt;br /&gt;
	&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: Black;"&gt;&lt;br /&gt;
I am not sure what I am doing wrong any help would be appreciated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sincerely,&lt;br /&gt;
Jut26&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;</description>
      <pubDate>Wed, 31 Oct 2007 08:38:05 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>How to enter input parameter?</title>
      <link>http://www.programmersheaven.com/mb/cppnet/365980/365980/ReadMessage.aspx</link>
      <description>I'm a newbie at C++ programming.&lt;br /&gt;
Right now i'm making a program that need parameters input, &lt;br /&gt;
example: phoen datafile.dat -d -e.&lt;br /&gt;
&lt;br /&gt;
I'm making the program using Microsoft Visual Studio .Net as the platform.&lt;br /&gt;
The problem arise When I run the program because i can't enter the parameter needed in the program.&lt;br /&gt;
&lt;br /&gt;
What I want to ask is how to enter the parameter when I run the program under the Microsoft Studio .Net?&lt;br /&gt;
Should I choose another platform instead of Microsoft Studio .Net?&lt;br /&gt;
&lt;br /&gt;
Thank you for the attention and help that I received.&lt;br /&gt;
I'm sorry for my bad english.</description>
      <pubDate>Thu, 27 Sep 2007 13:29:51 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>How to redirect a debugging log file in VC++ .NET 2003</title>
      <link>http://www.programmersheaven.com/mb/cppnet/364883/364883/ReadMessage.aspx</link>
      <description>Hi,&lt;br /&gt;
I want to generate a log file (e.g. output.txt) for debugging output.&lt;br /&gt;
I want it in my project's debug directory. I can generate the file but not in the right place.&lt;br /&gt;
&lt;br /&gt;
I open the project properties page and choose Debugging to get a series of edit boxes, one is called Command Arguments. &lt;br /&gt;
I enter the following for Command Arguments:&lt;br /&gt;
&amp;gt; output.txt&lt;br /&gt;
&lt;br /&gt;
This creates the file in&lt;br /&gt;
C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE&lt;br /&gt;
aka $(DevEnvDir)&lt;br /&gt;
&lt;br /&gt;
However, I want it in C:\Home\Coding\CPP\Project1\Debug&lt;br /&gt;
aka $(TargetDir). When I enter the Command Argument:&lt;br /&gt;
&amp;gt;$(TargetDir)\output.txt it doesn't work.&lt;br /&gt;
&lt;br /&gt;
Please would someone tell me what the correct Command Argument is to get the output file where I want it.&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;br /&gt;
Peithon&lt;br /&gt;</description>
      <pubDate>Wed, 22 Aug 2007 14:28:18 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>need help about controlling other applications</title>
      <link>http://www.programmersheaven.com/mb/cppnet/364430/364430/ReadMessage.aspx</link>
      <description>Hello,&lt;br /&gt;
I am trying to write sort of an aplication monitor that monitors a specific program and takes control of it when something happens, to be more specific i need to monitor a save command in this aplication and then&lt;br /&gt;
when it is saved to print it as an image file. that means to virtualy press the print button and change the default printing settings. ho can i do this? one more thing - the person who uses this software has minimal computer skills so i have to hide from him all the technical stuff like knowing which application to target automaticly or by running it through my application for example.&lt;br /&gt;
&lt;br /&gt;
10x&lt;br /&gt;</description>
      <pubDate>Fri, 10 Aug 2007 08:33:56 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>Looking for a book</title>
      <link>http://www.programmersheaven.com/mb/cppnet/363968/363968/ReadMessage.aspx</link>
      <description>I am looking for a book on reading/writing/copying a cd or dvd. I have need of the full understnding oh how to do this. Can anyone recommend such book?</description>
      <pubDate>Mon, 30 Jul 2007 18:15:16 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>setting edit box font...</title>
      <link>http://www.programmersheaven.com/mb/cppnet/363464/363464/ReadMessage.aspx</link>
      <description>i have a small problem. i am new to windows programming and i have to do for summer practice at college a project... an editor.. something like notepad... and ai foudn a source code... i modified it.. now the program is quite functional.. but i want tu give the opportunity to change te font... and i searched all the web and i found some tips, but it still doesn't work... if can anyone help... i need this project to be fully functional by friday morning... &lt;br /&gt;
this is the code...:&lt;br /&gt;
&lt;br /&gt;
resource.h&lt;br /&gt;
&lt;br /&gt;
//{{NO_DEPENDENCIES}}&lt;br /&gt;
// Microsoft Visual C++ generated include file.&lt;br /&gt;
// Used by app_four.rc&lt;br /&gt;
//&lt;br /&gt;
#define IDR_MAINMENU                    102&lt;br /&gt;
#define IDI_ICON1                       102&lt;br /&gt;
#define IDB_BITMAP2                     104&lt;br /&gt;
#define IDD_ABOUT                       105&lt;br /&gt;
#define ID_FILE_EXIT                    40001&lt;br /&gt;
#define ID_FILE_NEW                     40002&lt;br /&gt;
#define ID_FILE_OPEN                    40003&lt;br /&gt;
#define ID_FILE_SAVEAS                  40005&lt;br /&gt;
#define ID_WINDOW_CASCADE               40008&lt;br /&gt;
#define ID_WINDOW_TILE                  40009&lt;br /&gt;
#define ID_FILE_CLOSE                   40010&lt;br /&gt;
#define ID_EDIT_CUT                     40015&lt;br /&gt;
#define ID_EDIT_COPY                    40016&lt;br /&gt;
#define ID_EDIT_PASTE                   40017&lt;br /&gt;
#define ID_FILE_PRINT                   40020&lt;br /&gt;
#define ID_EDIT_UNDO                    40022&lt;br /&gt;
#define ID_EDIT_DELETE                  40023&lt;br /&gt;
#define ID_EDIT_FIND                    40024&lt;br /&gt;
#define ID_EDIT_REPLACE                 40025&lt;br /&gt;
#define ID_EDIT_SELECTALL               40026&lt;br /&gt;
#define ID_FORMAT_FONT                  40029&lt;br /&gt;
#define ID_HELP_ABOUT                   40030&lt;br /&gt;
&lt;br /&gt;
// Next default values for new objects&lt;br /&gt;
// &lt;br /&gt;
#ifdef APSTUDIO_INVOKED&lt;br /&gt;
#ifndef APSTUDIO_READONLY_SYMBOLS&lt;br /&gt;
#define _APS_NEXT_RESOURCE_VALUE        106&lt;br /&gt;
#define _APS_NEXT_COMMAND_VALUE         40031&lt;br /&gt;
#define _APS_NEXT_CONTROL_VALUE         1000&lt;br /&gt;
#define _APS_NEXT_SYMED_VALUE           101&lt;br /&gt;
#endif&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and this is the .c file&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;windows.h&amp;gt;&lt;br /&gt;
#include &amp;lt;commctrl.h&amp;gt;&lt;br /&gt;
#include "resource.h"&lt;br /&gt;
&lt;br /&gt;
const char g_szClassName[] = "myWindowClass";&lt;br /&gt;
const char g_szChildClassName[] = "myMDIChildWindowClass";&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#define IDC_MAIN_MDI	101&lt;br /&gt;
#define IDC_MAIN_TOOL	102&lt;br /&gt;
#define IDC_MAIN_STATUS	103&lt;br /&gt;
&lt;br /&gt;
#define IDC_CHILD_EDIT	104&lt;br /&gt;
&lt;br /&gt;
#define ID_MDI_FIRSTCHILD 50000&lt;br /&gt;
&lt;br /&gt;
// font and color&lt;br /&gt;
&lt;br /&gt;
HFONT g_hfFont = NULL;&lt;br /&gt;
BOOL g_bOpaque = TRUE;&lt;br /&gt;
COLORREF g_rgbText = RGB(0, 0, 0);&lt;br /&gt;
COLORREF g_rgbBackground = RGB(255, 255, 255);&lt;br /&gt;
&lt;br /&gt;
COLORREF g_rgbCustom[16] = {0};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
HWND g_hMDIClient = NULL;&lt;br /&gt;
HWND g_hMainWindow = NULL;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void DoSelectFont(HWND hwnd)&lt;br /&gt;
{&lt;br /&gt;
	CHOOSEFONT cf = {sizeof(CHOOSEFONT)};&lt;br /&gt;
	LOGFONT lf;&lt;br /&gt;
&lt;br /&gt;
	GetObject(g_hfFont, sizeof(LOGFONT), &amp;amp;lf);&lt;br /&gt;
&lt;br /&gt;
	cf.Flags = CF_EFFECTS | CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS;&lt;br /&gt;
	cf.hwndOwner = hwnd;&lt;br /&gt;
	cf.lpLogFont = &amp;amp;lf;&lt;br /&gt;
	cf.rgbColors = g_rgbText;&lt;br /&gt;
&lt;br /&gt;
	if(ChooseFont(&amp;amp;cf))&lt;br /&gt;
	{&lt;br /&gt;
		HFONT hf = CreateFontIndirect(&amp;amp;lf);&lt;br /&gt;
		if(hf)&lt;br /&gt;
		{&lt;br /&gt;
			g_hfFont = hf;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			MessageBox(hwnd, "Font creation failed!", "Error", MB_OK | MB_ICONEXCLAMATION);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		g_rgbText = cf.rgbColors;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DoSelectColour(HWND hwnd)&lt;br /&gt;
{&lt;br /&gt;
	CHOOSECOLOR cc = {sizeof(CHOOSECOLOR)};&lt;br /&gt;
&lt;br /&gt;
	cc.Flags = CC_RGBINIT | CC_FULLOPEN | CC_ANYCOLOR;&lt;br /&gt;
	cc.hwndOwner = hwnd;&lt;br /&gt;
	cc.rgbResult = g_rgbBackground;&lt;br /&gt;
	cc.lpCustColors = g_rgbCustom;&lt;br /&gt;
&lt;br /&gt;
	if(ChooseColor(&amp;amp;cc))&lt;br /&gt;
	{&lt;br /&gt;
		g_rgbBackground = cc.rgbResult;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BOOL CALLBACK AboutDlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)&lt;br /&gt;
{&lt;br /&gt;
	switch(Message)&lt;br /&gt;
	{&lt;br /&gt;
		case WM_INITDIALOG:&lt;br /&gt;
&lt;br /&gt;
		return TRUE;&lt;br /&gt;
		case WM_COMMAND:&lt;br /&gt;
			switch(LOWORD(wParam))&lt;br /&gt;
			{&lt;br /&gt;
				case IDOK:&lt;br /&gt;
					EndDialog(hwnd, 0);&lt;br /&gt;
				break;			&lt;br /&gt;
				case IDCANCEL:&lt;br /&gt;
					EndDialog(hwnd, 0);&lt;br /&gt;
				break;&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
		break;&lt;br /&gt;
		default:&lt;br /&gt;
			return FALSE;&lt;br /&gt;
	}&lt;br /&gt;
	return TRUE;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
BOOL LoadTextFileToEdit(HWND hEdit, LPCTSTR pszFileName)&lt;br /&gt;
{&lt;br /&gt;
	HANDLE hFile;&lt;br /&gt;
	BOOL bSuccess = FALSE;&lt;br /&gt;
&lt;br /&gt;
	hFile = CreateFile(pszFileName, GENERIC_READ, FILE_SHARE_READ, NULL,&lt;br /&gt;
		OPEN_EXISTING, 0, NULL);&lt;br /&gt;
	if(hFile != INVALID_HANDLE_VALUE)&lt;br /&gt;
	{&lt;br /&gt;
		DWORD dwFileSize;&lt;br /&gt;
&lt;br /&gt;
		dwFileSize = GetFileSize(hFile, NULL);&lt;br /&gt;
		if(dwFileSize != 0xFFFFFFFF)&lt;br /&gt;
		{&lt;br /&gt;
			LPSTR pszFileText;&lt;br /&gt;
&lt;br /&gt;
			pszFileText = GlobalAlloc(GPTR, dwFileSize + 1);&lt;br /&gt;
			if(pszFileText != NULL)&lt;br /&gt;
			{&lt;br /&gt;
				DWORD dwRead;&lt;br /&gt;
&lt;br /&gt;
				if(ReadFile(hFile, pszFileText, dwFileSize, &amp;amp;dwRead, NULL))&lt;br /&gt;
				{&lt;br /&gt;
					pszFileText[dwFileSize] = 0; // Add null terminator&lt;br /&gt;
					if(SetWindowText(hEdit, pszFileText))&lt;br /&gt;
						bSuccess = TRUE; // It worked!&lt;br /&gt;
				}&lt;br /&gt;
				GlobalFree(pszFileText);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		CloseHandle(hFile);&lt;br /&gt;
	}&lt;br /&gt;
	return bSuccess;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
BOOL SaveTextFileFromEdit(HWND hEdit, LPCTSTR pszFileName)&lt;br /&gt;
{&lt;br /&gt;
	HANDLE hFile;&lt;br /&gt;
	BOOL bSuccess = FALSE;&lt;br /&gt;
&lt;br /&gt;
	hFile = CreateFile(pszFileName, GENERIC_WRITE, 0, NULL,&lt;br /&gt;
		CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);&lt;br /&gt;
	if(hFile != INVALID_HANDLE_VALUE)&lt;br /&gt;
	{&lt;br /&gt;
		DWORD dwTextLength;&lt;br /&gt;
&lt;br /&gt;
		dwTextLength = GetWindowTextLength(hEdit);&lt;br /&gt;
		// No need to bother if there's no text.&lt;br /&gt;
		if(dwTextLength &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			LPSTR pszText;&lt;br /&gt;
			DWORD dwBufferSize = dwTextLength + 1;&lt;br /&gt;
&lt;br /&gt;
			pszText = GlobalAlloc(GPTR, dwBufferSize);&lt;br /&gt;
			if(pszText != NULL)&lt;br /&gt;
			{&lt;br /&gt;
				if(GetWindowText(hEdit, pszText, dwBufferSize))&lt;br /&gt;
				{&lt;br /&gt;
					DWORD dwWritten;&lt;br /&gt;
&lt;br /&gt;
					if(WriteFile(hFile, pszText, dwTextLength, &amp;amp;dwWritten, NULL))&lt;br /&gt;
						bSuccess = TRUE;&lt;br /&gt;
				}&lt;br /&gt;
				GlobalFree(pszText);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		CloseHandle(hFile);&lt;br /&gt;
	}&lt;br /&gt;
	return bSuccess;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DoFileOpen(HWND hwnd)&lt;br /&gt;
{&lt;br /&gt;
	OPENFILENAME ofn;&lt;br /&gt;
	char szFileName[MAX_PATH] = "";&lt;br /&gt;
&lt;br /&gt;
	ZeroMemory(&amp;amp;ofn, sizeof(ofn));&lt;br /&gt;
&lt;br /&gt;
	ofn.lStructSize = sizeof(ofn);&lt;br /&gt;
	ofn.hwndOwner = hwnd;&lt;br /&gt;
	ofn.lpstrFilter = "Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0";&lt;br /&gt;
	ofn.lpstrFile = szFileName;&lt;br /&gt;
	ofn.nMaxFile = MAX_PATH;&lt;br /&gt;
	ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;&lt;br /&gt;
	ofn.lpstrDefExt = "txt";&lt;br /&gt;
&lt;br /&gt;
	if(GetOpenFileName(&amp;amp;ofn))&lt;br /&gt;
	{&lt;br /&gt;
		HWND hEdit = GetDlgItem(hwnd, IDC_CHILD_EDIT);&lt;br /&gt;
		if(LoadTextFileToEdit(hEdit, szFileName))&lt;br /&gt;
		{&lt;br /&gt;
			SendDlgItemMessage(g_hMainWindow, IDC_MAIN_STATUS, SB_SETTEXT, 0, (LPARAM)"Opened...");&lt;br /&gt;
			SendDlgItemMessage(g_hMainWindow, IDC_MAIN_STATUS, SB_SETTEXT, 1, (LPARAM)szFileName);&lt;br /&gt;
&lt;br /&gt;
			SetWindowText(hwnd, szFileName);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DoFileSave(HWND hwnd)&lt;br /&gt;
{&lt;br /&gt;
	OPENFILENAME ofn;&lt;br /&gt;
	char szFileName[MAX_PATH] = "";&lt;br /&gt;
&lt;br /&gt;
	ZeroMemory(&amp;amp;ofn, sizeof(ofn));&lt;br /&gt;
&lt;br /&gt;
	ofn.lStructSize = sizeof(ofn);&lt;br /&gt;
	ofn.hwndOwner = hwnd;&lt;br /&gt;
	ofn.lpstrFilter = "Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0";&lt;br /&gt;
	ofn.lpstrFile = szFileName;&lt;br /&gt;
	ofn.nMaxFile = MAX_PATH;&lt;br /&gt;
	ofn.lpstrDefExt = "txt";&lt;br /&gt;
	ofn.Flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;&lt;br /&gt;
&lt;br /&gt;
	if(GetSaveFileName(&amp;amp;ofn))&lt;br /&gt;
	{&lt;br /&gt;
		HWND hEdit = GetDlgItem(hwnd, IDC_CHILD_EDIT);&lt;br /&gt;
		if(SaveTextFileFromEdit(hEdit, szFileName))&lt;br /&gt;
		{&lt;br /&gt;
			SendDlgItemMessage(g_hMainWindow, IDC_MAIN_STATUS, SB_SETTEXT, 0, (LPARAM)"Saved...");&lt;br /&gt;
			SendDlgItemMessage(g_hMainWindow, IDC_MAIN_STATUS, SB_SETTEXT, 1, (LPARAM)szFileName);&lt;br /&gt;
&lt;br /&gt;
			SetWindowText(hwnd, szFileName);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
HWND CreateNewMDIChild(HWND hMDIClient)&lt;br /&gt;
{&lt;br /&gt;
	MDICREATESTRUCT mcs;&lt;br /&gt;
	HWND hChild;&lt;br /&gt;
&lt;br /&gt;
	mcs.szTitle = "[Untitled]";&lt;br /&gt;
	mcs.szClass = g_szChildClassName;&lt;br /&gt;
	mcs.hOwner  = GetModuleHandle(NULL);&lt;br /&gt;
	mcs.x = mcs.cx = CW_USEDEFAULT;&lt;br /&gt;
	mcs.y = mcs.cy = CW_USEDEFAULT;&lt;br /&gt;
	mcs.style = MDIS_ALLCHILDSTYLES;&lt;br /&gt;
&lt;br /&gt;
	hChild = (HWND)SendMessage(hMDIClient, WM_MDICREATE, 0, (LONG)&amp;amp;mcs);&lt;br /&gt;
	if(!hChild)&lt;br /&gt;
	{&lt;br /&gt;
		MessageBox(hMDIClient, "MDI Child creation failed.", "Oh Oh...",&lt;br /&gt;
			MB_ICONEXCLAMATION | MB_OK);&lt;br /&gt;
	}&lt;br /&gt;
	return hChild;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)&lt;br /&gt;
{&lt;br /&gt;
	switch(msg)&lt;br /&gt;
	{&lt;br /&gt;
		case WM_CREATE:&lt;br /&gt;
		{&lt;br /&gt;
			HWND hTool;&lt;br /&gt;
			TBBUTTON tbb[11];&lt;br /&gt;
			TBADDBITMAP tbab;&lt;br /&gt;
&lt;br /&gt;
			HWND hStatus;&lt;br /&gt;
			int statwidths[] = {200, -1};&lt;br /&gt;
&lt;br /&gt;
			CLIENTCREATESTRUCT ccs;&lt;br /&gt;
&lt;br /&gt;
			// Create MDI Client&lt;br /&gt;
&lt;br /&gt;
			// Find window menu where children will be listed&lt;br /&gt;
			ccs.hWindowMenu  = GetSubMenu(GetMenu(hwnd), 3);// afiseaza la window toate ferestrele deschise&lt;br /&gt;
			ccs.idFirstChild = ID_MDI_FIRSTCHILD;&lt;br /&gt;
&lt;br /&gt;
			g_hMDIClient = CreateWindowEx(WS_EX_CLIENTEDGE, "mdiclient", NULL,&lt;br /&gt;
				WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL | WS_VISIBLE,&lt;br /&gt;
				CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,&lt;br /&gt;
				hwnd, (HMENU)IDC_MAIN_MDI, GetModuleHandle(NULL), (LPVOID)&amp;amp;ccs);&lt;br /&gt;
&lt;br /&gt;
			if(g_hMDIClient == NULL)&lt;br /&gt;
				MessageBox(hwnd, "Could not create MDI client.", "Error", MB_OK | MB_ICONERROR);&lt;br /&gt;
&lt;br /&gt;
			// Create Toolbar&lt;br /&gt;
&lt;br /&gt;
			hTool = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_VISIBLE, 0, 0, 0, 0,&lt;br /&gt;
				hwnd, (HMENU)IDC_MAIN_TOOL, GetModuleHandle(NULL), NULL);&lt;br /&gt;
			if(hTool == NULL)&lt;br /&gt;
				MessageBox(hwnd, "Could not create tool bar.", "Error", MB_OK | MB_ICONERROR);&lt;br /&gt;
&lt;br /&gt;
			// Send the TB_BUTTONSTRUCTSIZE message, which is required for&lt;br /&gt;
			// backward compatibility.&lt;br /&gt;
			SendMessage(hTool, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0);&lt;br /&gt;
			&lt;br /&gt;
			tbab.hInst = HINST_COMMCTRL;&lt;br /&gt;
			tbab.nID = IDB_STD_SMALL_COLOR;&lt;br /&gt;
			SendMessage(hTool, TB_ADDBITMAP, 0, (LPARAM)&amp;amp;tbab);&lt;br /&gt;
&lt;br /&gt;
			ZeroMemory(tbb, sizeof(tbb));&lt;br /&gt;
			tbb[0].iBitmap = STD_FILENEW;// new&lt;br /&gt;
			tbb[0].fsState = TBSTATE_ENABLED;&lt;br /&gt;
			tbb[0].fsStyle = TBSTYLE_BUTTON;&lt;br /&gt;
			tbb[0].idCommand = ID_FILE_NEW;&lt;br /&gt;
&lt;br /&gt;
			tbb[1].iBitmap = STD_FILEOPEN;// open&lt;br /&gt;
			tbb[1].fsState = TBSTATE_ENABLED;&lt;br /&gt;
			tbb[1].fsStyle = TBSTYLE_BUTTON;&lt;br /&gt;
			tbb[1].idCommand = ID_FILE_OPEN;&lt;br /&gt;
&lt;br /&gt;
			tbb[2].iBitmap = STD_FILESAVE;// save&lt;br /&gt;
			tbb[2].fsState = TBSTATE_ENABLED;&lt;br /&gt;
			tbb[2].fsStyle = TBSTYLE_BUTTON;&lt;br /&gt;
			tbb[2].idCommand = ID_FILE_SAVEAS;&lt;br /&gt;
&lt;br /&gt;
			tbb[3].iBitmap = STD_PRINTPRE;// print&lt;br /&gt;
			tbb[3].fsState = TBSTATE_ENABLED;&lt;br /&gt;
			tbb[3].fsStyle = TBSTYLE_BUTTON;&lt;br /&gt;
			tbb[3].idCommand = ID_FILE_PRINT;&lt;br /&gt;
&lt;br /&gt;
			tbb[4].iBitmap = STD_UNDO;// undo&lt;br /&gt;
			tbb[4].fsState = TBSTATE_ENABLED;&lt;br /&gt;
			tbb[4].fsStyle = TBSTYLE_BUTTON;&lt;br /&gt;
			tbb[4].idCommand = ID_EDIT_UNDO;&lt;br /&gt;
			&lt;br /&gt;
			tbb[5].iBitmap = STD_CUT;// cut&lt;br /&gt;
			tbb[5].fsState = TBSTATE_ENABLED;&lt;br /&gt;
			tbb[5].fsStyle = TBSTYLE_BUTTON;&lt;br /&gt;
			tbb[5].idCommand = ID_EDIT_CUT;&lt;br /&gt;
&lt;br /&gt;
			tbb[6].iBitmap = STD_COPY;// copy&lt;br /&gt;
			tbb[6].fsState = TBSTATE_ENABLED;&lt;br /&gt;
			tbb[6].fsStyle = TBSTYLE_BUTTON;&lt;br /&gt;
			tbb[6].idCommand = ID_EDIT_COPY;&lt;br /&gt;
&lt;br /&gt;
			tbb[7].iBitmap = STD_PASTE;// paste&lt;br /&gt;
			tbb[7].fsState = TBSTATE_ENABLED;&lt;br /&gt;
			tbb[7].fsStyle = TBSTYLE_BUTTON;&lt;br /&gt;
			tbb[7].idCommand = ID_EDIT_PASTE;&lt;br /&gt;
&lt;br /&gt;
			tbb[8].iBitmap = STD_DELETE;// delete&lt;br /&gt;
			tbb[8].fsState = TBSTATE_ENABLED;&lt;br /&gt;
			tbb[8].fsStyle = TBSTYLE_BUTTON;&lt;br /&gt;
			tbb[8].idCommand = ID_EDIT_DELETE;&lt;br /&gt;
&lt;br /&gt;
			tbb[9].iBitmap = STD_FIND;// delete&lt;br /&gt;
			tbb[9].fsState = TBSTATE_ENABLED;&lt;br /&gt;
			tbb[9].fsStyle = TBSTYLE_BUTTON;&lt;br /&gt;
			tbb[9].idCommand = ID_EDIT_FIND;&lt;br /&gt;
			&lt;br /&gt;
			tbb[10].iBitmap = STD_HELP;// delete&lt;br /&gt;
			tbb[10].fsState = TBSTATE_ENABLED;&lt;br /&gt;
			tbb[10].fsStyle = TBSTYLE_BUTTON;&lt;br /&gt;
			tbb[10].idCommand = ID_HELP_ABOUT;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
			SendMessage(hTool, TB_ADDBUTTONS, sizeof(tbb)/sizeof(TBBUTTON), (LPARAM)&amp;amp;tbb);&lt;br /&gt;
&lt;br /&gt;
			// Create Status bar&lt;br /&gt;
&lt;br /&gt;
			hStatus = CreateWindowEx(0, STATUSCLASSNAME, NULL,&lt;br /&gt;
				WS_CHILD | WS_VISIBLE | SBARS_SIZEGRIP, 0, 0, 0, 0,&lt;br /&gt;
				hwnd, (HMENU)IDC_MAIN_STATUS, GetModuleHandle(NULL), NULL);&lt;br /&gt;
&lt;br /&gt;
			SendMessage(hStatus, SB_SETPARTS, sizeof(statwidths)/sizeof(int), (LPARAM)statwidths);&lt;br /&gt;
			SendMessage(hStatus, SB_SETTEXT, 0, (LPARAM)"Notepad ceva mai bun... Versiunea 1.0");&lt;br /&gt;
		}&lt;br /&gt;
		break;&lt;br /&gt;
		case WM_SIZE:&lt;br /&gt;
		{&lt;br /&gt;
			HWND hTool;&lt;br /&gt;
			RECT rcTool;&lt;br /&gt;
			int iToolHeight;&lt;br /&gt;
&lt;br /&gt;
			HWND hStatus;&lt;br /&gt;
			RECT rcStatus;&lt;br /&gt;
			int iStatusHeight;&lt;br /&gt;
&lt;br /&gt;
			HWND hMDI;&lt;br /&gt;
			int iMDIHeight;&lt;br /&gt;
			RECT rcClient;&lt;br /&gt;
&lt;br /&gt;
			// Size toolbar and get height&lt;br /&gt;
&lt;br /&gt;
			hTool = GetDlgItem(hwnd, IDC_MAIN_TOOL);&lt;br /&gt;
			SendMessage(hTool, TB_AUTOSIZE, 0, 0);&lt;br /&gt;
&lt;br /&gt;
			GetWindowRect(hTool, &amp;amp;rcTool);&lt;br /&gt;
			iToolHeight = rcTool.bottom - rcTool.top;&lt;br /&gt;
&lt;br /&gt;
			// Size status bar and get height&lt;br /&gt;
&lt;br /&gt;
			hStatus = GetDlgItem(hwnd, IDC_MAIN_STATUS);&lt;br /&gt;
			SendMessage(hStatus, WM_SIZE, 0, 0);&lt;br /&gt;
&lt;br /&gt;
			GetWindowRect(hStatus, &amp;amp;rcStatus);&lt;br /&gt;
			iStatusHeight = rcStatus.bottom - rcStatus.top;&lt;br /&gt;
&lt;br /&gt;
			// Calculate remaining height and size edit&lt;br /&gt;
&lt;br /&gt;
			GetClientRect(hwnd, &amp;amp;rcClient);&lt;br /&gt;
&lt;br /&gt;
			iMDIHeight = rcClient.bottom - iToolHeight - iStatusHeight;&lt;br /&gt;
&lt;br /&gt;
			hMDI = GetDlgItem(hwnd, IDC_MAIN_MDI);&lt;br /&gt;
			SetWindowPos(hMDI, NULL, 0, iToolHeight, rcClient.right, iMDIHeight, SWP_NOZORDER);&lt;br /&gt;
		}&lt;br /&gt;
		break;&lt;br /&gt;
		case WM_CLOSE:&lt;br /&gt;
			DestroyWindow(hwnd);&lt;br /&gt;
		break;&lt;br /&gt;
		case WM_DESTROY:&lt;br /&gt;
			PostQuitMessage(0);&lt;br /&gt;
		break;&lt;br /&gt;
		case WM_COMMAND:&lt;br /&gt;
			switch(LOWORD(wParam))&lt;br /&gt;
			{&lt;br /&gt;
				case ID_FILE_EXIT:&lt;br /&gt;
					PostMessage(hwnd, WM_CLOSE, 0, 0);&lt;br /&gt;
				break;&lt;br /&gt;
				case ID_FILE_NEW:&lt;br /&gt;
					CreateNewMDIChild(g_hMDIClient);&lt;br /&gt;
				break;&lt;br /&gt;
				case ID_FILE_OPEN:&lt;br /&gt;
				{&lt;br /&gt;
					HWND hChild = CreateNewMDIChild(g_hMDIClient);&lt;br /&gt;
					if(hChild)&lt;br /&gt;
					{&lt;br /&gt;
						DoFileOpen(hChild);	&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
				break;&lt;br /&gt;
				case ID_FILE_PRINT:&lt;br /&gt;
					//PostMessage(hwnd, WM_PRINT, 0, 0);&lt;br /&gt;
				break;&lt;br /&gt;
				case ID_FILE_CLOSE:&lt;br /&gt;
				{&lt;br /&gt;
					HWND hChild = (HWND)SendMessage(g_hMDIClient, WM_MDIGETACTIVE,0,0);&lt;br /&gt;
					if(hChild)&lt;br /&gt;
					{&lt;br /&gt;
						SendMessage(hChild, WM_CLOSE, 0, 0);&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
				break;&lt;br /&gt;
				case ID_EDIT_FIND:&lt;br /&gt;
					// find&lt;br /&gt;
					break;&lt;br /&gt;
				case ID_FORMAT_FONT:&lt;br /&gt;
				{&lt;br /&gt;
					HWND hChild = (HWND)SendMessage(g_hMDIClient, WM_MDIGETACTIVE,0,0);&lt;br /&gt;
					DoSelectFont(hChild);&lt;br /&gt;
					//SendDlgItemMessage(hEdit, IDC_CHILD_EDIT, WM_SETFONT, (WPARAM)g_hfFont, TRUE);&lt;br /&gt;
					SendMessage (hChild, WM_SETFONT, (WPARAM) GetStockObject (DEFAULT_GUI_FONT), 0);&lt;br /&gt;
					InvalidateRect(hChild, NULL, TRUE);&lt;br /&gt;
					UpdateWindow(hChild);&lt;br /&gt;
				}&lt;br /&gt;
				break;&lt;br /&gt;
				case ID_WINDOW_TILE:&lt;br /&gt;
					SendMessage(g_hMDIClient, WM_MDITILE, 0, 0);&lt;br /&gt;
				break;&lt;br /&gt;
				case ID_WINDOW_CASCADE:&lt;br /&gt;
					SendMessage(g_hMDIClient, WM_MDICASCADE, 0, 0);&lt;br /&gt;
				break;&lt;br /&gt;
				case ID_HELP_ABOUT:&lt;br /&gt;
				{&lt;br /&gt;
					int ret = DialogBox(GetModuleHandle(NULL), &lt;br /&gt;
						MAKEINTRESOURCE(IDD_ABOUT), hwnd, AboutDlgProc);&lt;br /&gt;
					if(ret == -1){&lt;br /&gt;
						MessageBox(hwnd, "Dialog failed!", "Error",&lt;br /&gt;
							MB_OK | MB_ICONINFORMATION);&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
				break;&lt;br /&gt;
				default:&lt;br /&gt;
				{&lt;br /&gt;
					if(LOWORD(wParam) &amp;gt;= ID_MDI_FIRSTCHILD)&lt;br /&gt;
					{&lt;br /&gt;
						DefFrameProc(hwnd, g_hMDIClient, WM_COMMAND, wParam, lParam);&lt;br /&gt;
					}&lt;br /&gt;
					else &lt;br /&gt;
					{&lt;br /&gt;
						HWND hChild = (HWND)SendMessage(g_hMDIClient, WM_MDIGETACTIVE,0,0);&lt;br /&gt;
						if(hChild)&lt;br /&gt;
						{&lt;br /&gt;
							SendMessage(hChild, WM_COMMAND, wParam, lParam);&lt;br /&gt;
						}&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		break;&lt;br /&gt;
		default:&lt;br /&gt;
			return DefFrameProc(hwnd, g_hMDIClient, msg, wParam, lParam);&lt;br /&gt;
	}&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
LRESULT CALLBACK MDIChildWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)&lt;br /&gt;
{&lt;br /&gt;
	switch(msg)&lt;br /&gt;
	{&lt;br /&gt;
		case WM_CREATE:&lt;br /&gt;
		{&lt;br /&gt;
			HFONT hfDefault;&lt;br /&gt;
			HWND hEdit;&lt;br /&gt;
&lt;br /&gt;
			// Create Edit Control&lt;br /&gt;
&lt;br /&gt;
			hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "", &lt;br /&gt;
				WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL, &lt;br /&gt;
				0, 0, 100, 100, hwnd, (HMENU)IDC_CHILD_EDIT, GetModuleHandle(NULL), NULL);&lt;br /&gt;
			if(hEdit == NULL)&lt;br /&gt;
				MessageBox(hwnd, "Could not create edit box.", "Error", MB_OK | MB_ICONERROR);&lt;br /&gt;
&lt;br /&gt;
			hfDefault = GetStockObject(DEFAULT_GUI_FONT);&lt;br /&gt;
			SendMessage(hEdit, WM_SETFONT, (WPARAM)hfDefault, MAKELPARAM(FALSE, 0));&lt;br /&gt;
		}&lt;br /&gt;
		break;&lt;br /&gt;
		case WM_MDIACTIVATE:&lt;br /&gt;
		{&lt;br /&gt;
			HMENU hMenu, hFileMenu;&lt;br /&gt;
			UINT EnableFlag;&lt;br /&gt;
&lt;br /&gt;
			hMenu = GetMenu(g_hMainWindow);&lt;br /&gt;
			if(hwnd == (HWND)lParam)&lt;br /&gt;
			{	   //being activated, enable the menus&lt;br /&gt;
				EnableFlag = MF_ENABLED;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{						   //being de-activated, gray the menus&lt;br /&gt;
				EnableFlag = MF_GRAYED;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			EnableMenuItem(hMenu, 1, MF_BYPOSITION | EnableFlag);&lt;br /&gt;
			EnableMenuItem(hMenu, 2, MF_BYPOSITION | EnableFlag);&lt;br /&gt;
			EnableMenuItem(hMenu, 3, MF_BYPOSITION | EnableFlag);&lt;br /&gt;
&lt;br /&gt;
			hFileMenu = GetSubMenu(hMenu, 0);&lt;br /&gt;
			EnableMenuItem(hFileMenu, ID_FILE_SAVEAS, MF_BYCOMMAND | EnableFlag);&lt;br /&gt;
			EnableMenuItem(hFileMenu, ID_FILE_CLOSE, MF_BYCOMMAND | EnableFlag);&lt;br /&gt;
			EnableMenuItem(hFileMenu, ID_FILE_PRINT, MF_BYCOMMAND | EnableFlag);&lt;br /&gt;
			&lt;br /&gt;
&lt;br /&gt;
			DrawMenuBar(g_hMainWindow);&lt;br /&gt;
		}&lt;br /&gt;
		break;&lt;br /&gt;
		case WM_COMMAND:&lt;br /&gt;
			switch(LOWORD(wParam))&lt;br /&gt;
			{&lt;br /&gt;
				case ID_FILE_OPEN:&lt;br /&gt;
					DoFileOpen(hwnd);&lt;br /&gt;
				break;&lt;br /&gt;
				case ID_FILE_SAVEAS:&lt;br /&gt;
					DoFileSave(hwnd);&lt;br /&gt;
				break;&lt;br /&gt;
				case ID_FILE_PRINT:&lt;br /&gt;
					//SendDlgItemMessage(hwnd, IDC_CHILD_EDIT, WM_PRINT, 0, 0);&lt;br /&gt;
				break;				&lt;br /&gt;
				case ID_EDIT_UNDO:&lt;br /&gt;
					SendDlgItemMessage(hwnd, IDC_CHILD_EDIT, WM_UNDO, 0, 0);&lt;br /&gt;
				break;&lt;br /&gt;
				case ID_EDIT_CUT:&lt;br /&gt;
					SendDlgItemMessage(hwnd, IDC_CHILD_EDIT, WM_CUT, 0, 0);&lt;br /&gt;
				break;				&lt;br /&gt;
				case ID_EDIT_COPY:&lt;br /&gt;
					SendDlgItemMessage(hwnd, IDC_CHILD_EDIT, WM_COPY, 0, 0);&lt;br /&gt;
				break;&lt;br /&gt;
				case ID_EDIT_PASTE:&lt;br /&gt;
					SendDlgItemMessage(hwnd, IDC_CHILD_EDIT, WM_PASTE, 0, 0);&lt;br /&gt;
				break;&lt;br /&gt;
				case ID_EDIT_DELETE:&lt;br /&gt;
					SendDlgItemMessage(hwnd, IDC_CHILD_EDIT, WM_CLEAR, 0, 0);&lt;br /&gt;
				break;&lt;br /&gt;
				&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
			}&lt;br /&gt;
		break;&lt;br /&gt;
		case WM_SIZE:&lt;br /&gt;
		{&lt;br /&gt;
			HWND hEdit;&lt;br /&gt;
			RECT rcClient;&lt;br /&gt;
&lt;br /&gt;
			// Calculate remaining height and size edit&lt;br /&gt;
&lt;br /&gt;
			GetClientRect(hwnd, &amp;amp;rcClient);&lt;br /&gt;
&lt;br /&gt;
			hEdit = GetDlgItem(hwnd, IDC_CHILD_EDIT);&lt;br /&gt;
			SetWindowPos(hEdit, NULL, 0, 0, rcClient.right, rcClient.bottom, SWP_NOZORDER);&lt;br /&gt;
		}&lt;br /&gt;
		return DefMDIChildProc(hwnd, msg, wParam, lParam);&lt;br /&gt;
		default:&lt;br /&gt;
			return DefMDIChildProc(hwnd, msg, wParam, lParam);&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
BOOL SetUpMDIChildWindowClass(HINSTANCE hInstance)&lt;br /&gt;
{&lt;br /&gt;
	WNDCLASSEX wc;&lt;br /&gt;
&lt;br /&gt;
	wc.cbSize		 = sizeof(WNDCLASSEX);&lt;br /&gt;
	wc.style		 = CS_HREDRAW | CS_VREDRAW;&lt;br /&gt;
	wc.lpfnWndProc	 = MDIChildWndProc;&lt;br /&gt;
	wc.cbClsExtra	 = 0;&lt;br /&gt;
	wc.cbWndExtra	 = 0;&lt;br /&gt;
	wc.hInstance	 = hInstance;&lt;br /&gt;
	wc.hIcon		 = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1));&lt;br /&gt;
	wc.hCursor		 = LoadCursor(NULL, IDC_ARROW);&lt;br /&gt;
	wc.hbrBackground = (HBRUSH)(COLOR_3DFACE+1);&lt;br /&gt;
	wc.lpszMenuName  = NULL;&lt;br /&gt;
	wc.lpszClassName = g_szChildClassName;&lt;br /&gt;
	wc.hIconSm		 = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1));&lt;br /&gt;
&lt;br /&gt;
	if(!RegisterClassEx(&amp;amp;wc))&lt;br /&gt;
	{&lt;br /&gt;
		MessageBox(0, "Could Not Register Child Window", "Oh Oh...",&lt;br /&gt;
			MB_ICONEXCLAMATION | MB_OK);&lt;br /&gt;
		return FALSE;&lt;br /&gt;
	}&lt;br /&gt;
	else&lt;br /&gt;
		return TRUE;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)&lt;br /&gt;
{&lt;br /&gt;
	WNDCLASSEX wc;&lt;br /&gt;
	HWND hwnd;&lt;br /&gt;
	MSG Msg;&lt;br /&gt;
&lt;br /&gt;
	InitCommonControls();&lt;br /&gt;
&lt;br /&gt;
	wc.cbSize		 = sizeof(WNDCLASSEX);&lt;br /&gt;
	wc.style		 = 0;&lt;br /&gt;
	wc.lpfnWndProc	 = WndProc;&lt;br /&gt;
	wc.cbClsExtra	 = 0;&lt;br /&gt;
	wc.cbWndExtra	 = 0;&lt;br /&gt;
	wc.hInstance	 = hInstance;&lt;br /&gt;
	wc.hIcon		 = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1));&lt;br /&gt;
	wc.hCursor		 = LoadCursor(NULL, IDC_ARROW);&lt;br /&gt;
	wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);&lt;br /&gt;
	wc.lpszMenuName  = MAKEINTRESOURCE(IDR_MAINMENU);&lt;br /&gt;
	wc.lpszClassName = g_szClassName;&lt;br /&gt;
	wc.hIconSm		 = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1));&lt;br /&gt;
&lt;br /&gt;
	if(!RegisterClassEx(&amp;amp;wc))&lt;br /&gt;
	{&lt;br /&gt;
		MessageBox(NULL, "Window Registration Failed!", "Error!",&lt;br /&gt;
			MB_ICONEXCLAMATION | MB_OK);&lt;br /&gt;
		return 0;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	if(!SetUpMDIChildWindowClass(hInstance))&lt;br /&gt;
		return 0;&lt;br /&gt;
&lt;br /&gt;
	hwnd = CreateWindowEx(&lt;br /&gt;
		0,&lt;br /&gt;
		g_szClassName,&lt;br /&gt;
		"Notepad un pic mai bun:)",&lt;br /&gt;
		WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN,&lt;br /&gt;
		CW_USEDEFAULT, CW_USEDEFAULT, 800, 600,&lt;br /&gt;
		NULL, NULL, hInstance, NULL);&lt;br /&gt;
&lt;br /&gt;
	if(hwnd == NULL)&lt;br /&gt;
	{&lt;br /&gt;
		MessageBox(NULL, "Window Creation Failed!", "Error!",&lt;br /&gt;
			MB_ICONEXCLAMATION | MB_OK);&lt;br /&gt;
		return 0;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	g_hMainWindow = hwnd;&lt;br /&gt;
&lt;br /&gt;
	ShowWindow(hwnd, nCmdShow);&lt;br /&gt;
	UpdateWindow(hwnd);&lt;br /&gt;
&lt;br /&gt;
	while(GetMessage(&amp;amp;Msg, NULL, 0, 0) &amp;gt; 0)&lt;br /&gt;
	{&lt;br /&gt;
		if (!TranslateMDISysAccel(g_hMDIClient, &amp;amp;Msg))&lt;br /&gt;
		{&lt;br /&gt;
			TranslateMessage(&amp;amp;Msg);&lt;br /&gt;
			DispatchMessage(&amp;amp;Msg);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	return Msg.wParam;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
i guess the problem is here:&lt;br /&gt;
case ID_FORMAT_FONT:&lt;br /&gt;
				{&lt;br /&gt;
					HWND hChild = (HWND)SendMessage(g_hMDIClient, WM_MDIGETACTIVE,0,0);&lt;br /&gt;
					DoSelectFont(hChild);&lt;br /&gt;
					//SendDlgItemMessage(hEdit, IDC_CHILD_EDIT, WM_SETFONT, (WPARAM)g_hfFont, TRUE);&lt;br /&gt;
					SendMessage (hChild, WM_SETFONT, (WPARAM) GetStockObject (DEFAULT_GUI_FONT), 0);&lt;br /&gt;
					InvalidateRect(hChild, NULL, TRUE);&lt;br /&gt;
					UpdateWindow(hChild);&lt;br /&gt;
				}&lt;br /&gt;
but i still don't know how to make it work. can anyone please help me?&lt;br /&gt;</description>
      <pubDate>Wed, 18 Jul 2007 17:05:24 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>I don't understand how to set keyboard hooks. Can someone simplify?</title>
      <link>http://www.programmersheaven.com/mb/cppnet/362634/362634/ReadMessage.aspx</link>
      <description>I don't understand how to set keyboard hooks. Can someone simplify?&lt;br /&gt;
&lt;a href="http://msdn2.microsoft.com/en-us/library/ms644960.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms644960.aspx&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.codeproject.com/dll/keyboardhook.asp"&gt;http://www.codeproject.com/dll/keyboardhook.asp&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
All I want to know is how to set a keyboard hook for the "F2" button.&lt;br /&gt;
And how to show a messagebox everytime "F2" is pressed.&lt;br /&gt;
If someone writes a code that does only that I think I can understand.&lt;br /&gt;
&lt;br /&gt;
Thank you for your help&lt;br /&gt;
//ColacX&lt;br /&gt;</description>
      <pubDate>Mon, 02 Jul 2007 13:53:36 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>How to create a windows short-cut and place it in autostart-folder?</title>
      <link>http://www.programmersheaven.com/mb/cppnet/362579/362579/ReadMessage.aspx</link>
      <description>How to create a windows short-cut and place it in autostart-folder?&lt;br /&gt;
I know that shortcuts has the filextension .lnk&lt;br /&gt;
&lt;br /&gt;
But how to make the program specify the target for the shortcut?&lt;br /&gt;</description>
      <pubDate>Sun, 01 Jul 2007 13:28:25 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>How do I recive key and mouse commands, while in other apps?</title>
      <link>http://www.programmersheaven.com/mb/cppnet/362576/362576/ReadMessage.aspx</link>
      <description>How do I recive key and mouse commands, while in other apps?&lt;br /&gt;
&lt;br /&gt;
GetKeyState(VK_F1) can be used if it's repeted with 10ms interval.&lt;br /&gt;
But that doesn't seem effective.&lt;br /&gt;
Anyother way I can recive commands while a diffrent application is active?&lt;br /&gt;
&lt;br /&gt;
Something about win32 Hooks?</description>
      <pubDate>Sun, 01 Jul 2007 13:14:42 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>How do I simulate key commands?</title>
      <link>http://www.programmersheaven.com/mb/cppnet/362574/362574/ReadMessage.aspx</link>
      <description>How do I simulate key commands?&lt;br /&gt;
&lt;br /&gt;
The code for simulating mousecommands looks like:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;mouse_event(MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_LEFTU
P,0,0,0,0);
&lt;/pre&gt;&lt;br /&gt;</description>
      <pubDate>Sun, 01 Jul 2007 13:08:05 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>How to minimize physical and virtual memory consumption</title>
      <link>http://www.programmersheaven.com/mb/cppnet/361721/361721/ReadMessage.aspx</link>
      <description>Hello All,&lt;br /&gt;
&lt;br /&gt;
I have a Window service developed using Visual Studio .Net 2003. I am using VC++ .Net for the service development.  The physical and virtual memory consumption is very high.  How should i minimize this memory consumption.  Please give me some clue to achieve this.&lt;br /&gt;
&lt;br /&gt;
Thanks</description>
      <pubDate>Wed, 20 Jun 2007 01:47:36 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>.NET deployment question</title>
      <link>http://www.programmersheaven.com/mb/cppnet/361251/361251/ReadMessage.aspx</link>
      <description>Hi&lt;br /&gt;
&lt;br /&gt;
I am very new to the .net framework; I have written a program that works fine on my computer but as soon as I deploy it on another computer the program requests a download of the .net framework.&lt;br /&gt;
I then created a setup file but it does not seem to link the relevant files.&lt;br /&gt;
I followed an online instruction on how to use the setup wizard for deployment. In that example the solution platform was .NET whereas on my computer I can only set it to win32, 64bit.. but not .NET. Is this the reason it is not deploying? if so how do I get a .NET solution platform into the configuration manager?&lt;br /&gt;
&lt;br /&gt;
(I am using a visual studio 2005 standard edition (academic version))&lt;br /&gt;
&lt;br /&gt;
Thanks in advance&lt;br /&gt;
 &lt;br /&gt;</description>
      <pubDate>Wed, 13 Jun 2007 13:07:50 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>passing data to a form in another thread</title>
      <link>http://www.programmersheaven.com/mb/cppnet/359716/359716/ReadMessage.aspx</link>
      <description>I am a "lucky" guy. My boss has told me to program in C++ in .NET.&lt;br /&gt;
&lt;br /&gt;
I need to do this:&lt;br /&gt;
&lt;br /&gt;
1. When I click on a button in my windows form, a separate managed thread must be created. This I have done and it works fine.&lt;br /&gt;
2. The new thread shall communicate with external devices over a CAN bus. Data received on the CAN bus must be passed back to windows form thread, so that it can be displayed in a textbox. This is what causes me problems.&lt;br /&gt;
&lt;br /&gt;
Can anyone help me with a simple example of how to make a callback from a managed C++ thread to a managed C++ windows form thread?&lt;br /&gt;
&lt;br /&gt;
any help will be much appreciated.&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Christian&lt;br /&gt;</description>
      <pubDate>Thu, 24 May 2007 09:26:04 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>Assigning address of a variable in VC# to one in VC++</title>
      <link>http://www.programmersheaven.com/mb/cppnet/359081/359081/ReadMessage.aspx</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I have a VC#.NET DLL (Visual Studio 2005), which runs a simple UDP server. It receives position updates from the client, and sends images from a folder in real-time accordingly. I have added this DLL to a virtual 3D enviornment, written in VC++.NET (Visual Studio 2005). &lt;br /&gt;
&lt;br /&gt;
This images being sent to the client are created,rendered and stored by the VC++ application. Hence, when the DLL receives the updates from the client, it has to inform the VC++ application to render and save the required image at the required position.&lt;br /&gt;
&lt;br /&gt;
Initially I had a public variable in the DLL, which was set to true when an update was received. I was creating an instance of the DLL class in VC++ application and checking the DLL variable in a while(true) loop (within a thread). Even though this operation was taking place in a thread, it really slowed the server down (I have no idea why this was happening). &lt;br /&gt;
&lt;br /&gt;
So, I decided to remove the thread. I wrote the following function in VC#, which returns the address of the variable. &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;        public unsafe int* ReturnAddressPositionUpdate()
        {
            fixed(int* ReturnValue = &amp;amp;ReceivedPositionUpdate)
            {
                return ReturnValue;
            }
      
        }&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I am calling this function from the VC++ code as:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;NewPosition =c-&amp;gt;ReturnAddressPositionUpdate();&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
(where c is the instance of the VC# class, and NewPosition is the local VC++ variable, both are declared as int)&lt;br /&gt;
&lt;br /&gt;
When I debug the code, I get the same address for both the variables( that is, the one in VC# and the one in VC++), yet when the variable is updated by VC# client, the if(*NewPosition != 0) statement in VC++ does not detect the update (The if () statement is being called recursively, so it keeps on checking, yet it never detects the updated variable value, yet during debug the value does get updated in VC#).&lt;br /&gt;
&lt;br /&gt;
Kindly help me out here.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;</description>
      <pubDate>Wed, 16 May 2007 18:07:13 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>random numbers</title>
      <link>http://www.programmersheaven.com/mb/cppnet/358354/358354/ReadMessage.aspx</link>
      <description>i'm having trouble finding a function that randomizes an array or generates a random number in C++. Please help!!&lt;br /&gt;
&lt;br /&gt;
all i know at the moment is the random_shuffle function...&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;algorithm&amp;gt; // header used for shuffle&lt;br /&gt;
random_shuffle(start, end, pointer_to_unary_function&amp;lt;int, int&amp;gt;(Rand));&lt;br /&gt;
&lt;br /&gt;
...but i still don't know exactly how to use it. I just need some pointers on generating random numbers. Thanks in advance.&lt;br /&gt;
&lt;span style="font-size: small;"&gt;"I am a &lt;/span&gt;Slave,&lt;span style="font-size: x-small;"&gt; and a&lt;/span&gt; &lt;span style="font-size: medium;"&gt;&lt;span style="color: Red;"&gt;Master&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;"-&lt;em&gt;Slipknot&lt;/em&gt;&lt;/span&gt;</description>
      <pubDate>Sun, 29 Apr 2007 11:37:45 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>Hi I need maps</title>
      <link>http://www.programmersheaven.com/mb/cppnet/357794/357794/ReadMessage.aspx</link>
      <description>Hello, I have to make a software to calculate and show the effects of Nuclear explotions on the ground. For that , I need to use a map design tool or a map-database. Does anybody know a practical way of using map in a software. Where should I start?? Do you know any tool or ready map for this ?? thank you.&lt;br /&gt;</description>
      <pubDate>Mon, 16 Apr 2007 09:42:34 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>Allocation and deallocation of SMO objects</title>
      <link>http://www.programmersheaven.com/mb/cppnet/357425/357425/ReadMessage.aspx</link>
      <description>I have difficulty releasing allocated resources. &lt;br /&gt;
I provide code for this item. My username in this site is azure.&lt;br /&gt;
Check for AllocDeallocSMO contribute code: my address is inside txt file.&lt;br /&gt;
&lt;br /&gt;
regards&lt;br /&gt;
&lt;br /&gt;
Trevisan Andrea&lt;br /&gt;</description>
      <pubDate>Mon, 09 Apr 2007 08:38:56 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>Colors in c++</title>
      <link>http://www.programmersheaven.com/mb/cppnet/352783/352783/ReadMessage.aspx</link>
      <description>&lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by Meister_Dew at  2007-1-23 19:42:4&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
Ive had some trouble finding a way to put certain colored pixels in the 'console application' (looks like the dos-prompt screen) window instead of the 'windows application' window.&lt;br /&gt;
I found the SetPixel function and i keep getting errors like "error c2373:  'setpixel': redefinition; blah blah blah".&lt;br /&gt;
&lt;br /&gt;
This is my sample...&lt;br /&gt;
&lt;br /&gt;
//the header needed&lt;br /&gt;
#include &amp;lt;windows.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
   int Xpos,Ypos;&lt;br /&gt;
&lt;br /&gt;
// not really sure what is supposed to go to the  'HDC hdc' spot&lt;br /&gt;
   SetPixel(HDC hdc, Xpos, Ypos, RGB(255,0,0)); // red color at x and y &lt;br /&gt;
                                               // position&lt;br /&gt;
   return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
this is just a sample to understand how to use this function.&lt;br /&gt;
if you have any tips regarding this is appreciated &lt;br /&gt;
thanks...&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: small;"&gt;"I am a &lt;/span&gt;Slave,&lt;span style="font-size: x-small;"&gt; and a&lt;/span&gt; &lt;span style="font-size: medium;"&gt;&lt;span style="color: Red;"&gt;Master&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;"-&lt;em&gt;Slipknot&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Tue, 23 Jan 2007 19:41:20 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>database access</title>
      <link>http://www.programmersheaven.com/mb/cppnet/347339/347339/ReadMessage.aspx</link>
      <description>i have a project that requires me to use C++ to retrieve info from a relational database. my problem is that i'm not a very accomplished programmer and i know next to nothing about databases and don't have the time to learn it all, so my question is which type of database is the easiest to access with C++ and why? i tried it with an access database using ADO and it wasn't working out very well MFC OLE was the closest i got to it but i saw someone do with MySQL and i'm thihnkin about switching but i wanna know if there is an better type of database to use and why? the database should have over 100 records with 10 feilds and the database should be able to hoold the lyrics for songs among other song information. i'm sorry if this message should have been posted in the database area but i didn't know which database type to put it in. help&lt;br /&gt;</description>
      <pubDate>Sat, 21 Oct 2006 03:53:25 -0700</pubDate>
      <category>C++.NET</category>
    </item>
    <item>
      <title>Develope COM in Visual C++ 2005</title>
      <link>http://www.programmersheaven.com/mb/cppnet/347270/347270/ReadMessage.aspx</link>
      <description>How can i develope COM component in the Visual C++ 2005?&lt;br /&gt;
Can you give some site or recommend any tutorial for this?&lt;br /&gt;
&lt;br /&gt;
Thank you in advance for your help...&lt;br /&gt;</description>
      <pubDate>Thu, 19 Oct 2006 23:39:20 -0700</pubDate>
      <category>C++.NET</category>
    </item>
  </channel>
</rss>