|
RESPECTED SIR / MADAM
PLEASE HELP ME I HAVE REQUIRED A SIMLE AND EASY PROJECT DESIGN IN MFC VC KINDLY SEND ME SOME PROJECTES LIKE DATABASE, INVENTORY, SHOPE , OR SIMPLE EASY ANY OTHER PROJECT CODE.
THANK YOU VERSY MUCH.
|
|
|
|
|
What's your IDE? VC++6.0 or VC++ .NET?
First, you should set the tab order of these radio buttons in successive order. ( Ex: 1,2,3,4,5 ) Next, you should "Group" your radio buttons by setting the least tab order one's property "Group". Check the property "Group" in VC++ 6.0 or set the property "Group" "True" in VC++.NET.
The next step depends on how you input your parameters. You can use some member variables to save your "parameters". To lable the radio buttons dynamically, use CWnd member function such as
SetDlgItemText( IDC_RADIO1, pszString /*Some LPCTSTR or CString*/);
or
SetDlgItemInt( IDC_RADIO1, nInt/*Some Integer*/ );
Next, you can double click each radio button or use class wizzard to write its BN_CLICKED event handle function. After you've generate 5 event handler, you can handle jobs you wanna do ( such as set a integer member to a value specified which button was pressed ) for each button. Good Luck!
|
|
|
|
|
This is not a place for having your class assignments completed. Better spend some bucks and go to rentacoder.com for this.
<marquee> STUCK STUCK STUCK STUCK
Stuck to Programming through an unbreakable bond
My Articles | My Blog
|
|
|
|
|
I need an installation software to install my program (a set of files).
could u recommend a better one?
thx
includeh10
|
|
|
|
|
yeah you can go for INNO setup,it very good freeware Installer around.
you can download it form Jrsoftware.org
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Download ISTool from below site
http://www.istool.org/default.aspx/downloads
Download InnoSetup from below site
http://www.jrsoftware.org/isinfo.php
Install both (one is compiler and other is editor).
Run ISTool from Start->Programs->ISTool4->ISTool
GoTo File->Preference, and select Innosetup installed directory as Compiler directory and click Ok.
Then "Files and Dirs" from the left side tree. Right click the rihgt side window and select "New Item", This will show a dialog, from this dialog you can browse your file, and give the destination dir while installing, etc.
Do the same for adding more files.
Go to Project->Setup Option->Compiler and give the ouput directory, setup name etc.
then compile the setup using Project->Compile Setup , this will give you an installation exe.
|
|
|
|
|
Thanks for u 2.
I am downloading them now.
cheers
==============================================
I modify the message.
InnoSetup is really wonderful!!!!!!!!!!!!!!
thanks a lots.
includeh10
|
|
|
|
|
I am trying to compile my code that was created VC++ 6.0 with MFC into VC++ 7.0. I am having a few problems. Any help will be greatly appreciated.
1. I am having trouble with templates.
I have following template class
template<class base_type="CWnd">
class CColorCtrl : public BASE_TYPE
{
..
..
}
I get an error C2039 : _GetBaseMessageMap is not a member of CColorCtrl<base_type>
BEGIN_TEMPLATE_MESSAGE_MAP(class BASE_TYPE, CColorCtrl<base_type>, BASE_TYPE)
//{{AFX_MSG_MAP(CColorCtrl)
..
..
//}}AFX_MSG_MAP
END_TEMPLATE_MESSAGE_MAP()
2. I have built Regular DLLs using MFC Dlls which I compiled in 7.0 when I use them with an .EXE that does not have threads, they work fine but when I use them with an .EXE that uses many threads, the .EXE fails at run time, at different places depending on how much work I have in each thread. When I block a lot of functionality and have only a few threads running, the application runs fine but the more threads run at the same time, the application fails for no paritcualr reason at any unreasonable points.
Also, can anyone point me to a website that has information about Migrating with no warnings for the size changes of different data types.
Thank you.
|
|
|
|
|
Hi, did you solve the problem with _GetBaseMessageMap in VC7? I ran into the same problem.
|
|
|
|
|
I have Created a simple dialog based application , which contains a Single Cedit control , I have Set the Data of CEdit Control with the SetWindowText supppose "Hello World" in the OnInitdialog( ) , AS I run the Program , the dialog appears containing CEdit control and the CEdit Control has the Text "Hello World" , but this text is highlight which is with Blue BackGround , What I want is to Remain CEdit Control in focus but the Text inside the control should not be highlighted ?
I would be very hwlp ful to you ppl if you help me out of this delimma !
thanx
- Nabil
|
|
|
|
|
Add m_myEditCtrl.SetSel (-1, 0); to OnInitDialog() .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
BOOL CKillFocusEditBoxDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
CMyEdit* pEdit = (CMyEdit*)GetDlgItem(IDC_EDIT1);
CWnd* pWnd = (CWnd*)pEdit ;
pEdit->SetWindowText("Hello I am back");
pEdit->SetSel (-1, 0);
return TRUE; // return TRUE unless you set the focus to a control
}
Sorry guys , I m still facing the same problem with this Code , but I have find a to do my JOB the Code I have implemented to solve this problem is :
BOOL CKillFocusEditBoxDlg::OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pLResult)
{
// TODO: Add your specialized code here and/or call the base class
CEdit* pEdit = (CEdit*)GetDlgItem(IDC_EDIT1);
pEdit->SetSel (0, 0);
return CDialog::OnChildNotify(message, wParam, lParam, pLResult);
}
Any ways , I thankful to you guys , you are great help to me .
- Nabil
|
|
|
|
|
when you want the cursor in a certain position, call the CEdit member's SetSel() with the parameters being the same number. For instance, if you want the cursor to be at the first position of the text box,
m_ctlEdit.SetSel(0,0);
if you want it to be at the end of the text,
CString str;
m_ctlEdit.GetWindowText(str);
int nLen = str.GetLength()
if(nLen)
nLen--;
m_ctlEdit.SetSel(nLen,nLen);
while(true)
{
TryToLearn("C++,MFC");
}
My articles[^]
bdiamond
|
|
|
|
|
hi all,
I want to create a application that include the function of a web server(including Https protocol), so can the code of my application invoke
the IIS component object on the PC ? (Assume that the PC don't have IIS installed and also I dont want to install IIS for the application)
Thanks
|
|
|
|
|
How about this one...
"Detect and Plug GDI Leaks in Your Code with Two Powerful Tools for Windows XP"
href="http://msdn.microsoft.com/msdnmag/issues/03/01/GDILeaks/default.aspx
And, if you install the debug kernel of Windows, it oreviously informed you (maybe still does) exactly what you left behind when your program exits.
|
|
|
|
|
Why don't u use resource meter of windows in the system tools catagory
|
|
|
|
|
It might let you know that you have resources leaking, but the GDI Leak tool will tell you what they are, listing out bitmaps, icons, windows, etc.
|
|
|
|
|
When I see Task Manager while excuting my app,
I can see how many GDI objects are being used..
But when I closed my app,
I don't know if GDI object is leaked or not..
beacause it's disappeared in Task Manager..
How to detect my GDI obj leak?
|
|
|
|
|
When your app closes down, Windows takes care of freeing up any memory that was allocated, closing file handles, and releasing GDI objects.
BTW, is this an MFC application?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
My small app is made with WTL, is only 30kbytes..
But the memory usage that we can see in Task Manager is
around 3MBytes..
What a strange.. Messager's is only around 1.5MB when it is on the tray..
Is there any way to reduce the memory usage?
any documents?
|
|
|
|
|
bektek wrote:
But the memory usage that we can see in Task Manager...
Don't use TM to determine your app's memory usage. Those numbers represent the amount of address space that is in use. They have nothing to do with the amount of that address space your program is actually using.
If you are really interested, use the heap walking functions to track what is going on.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Thanks your reply..
DavidCrow wrote:
Don't use TM to determine your app's memory usage. Those numbers represent the amount of address space that is in use. They have nothing to do with the amount of that address space your program is actually using.
I've got some process monitoring tool for sysinternal.com
It shows private memory usage..
In case of my app which is only 30kbytes, it shows that my app use 800kbytes private memory...
Does that mean real memory usage of my app?
It that same as heap usage?
|
|
|
|
|
bektek wrote:
Does that mean real memory usage of my app?
What do you mean by "real memory usage?"
bektek wrote:
It that same as heap usage?
"Heap usage" is how much memory your progrm has allocated on the heap.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi guys,
I want to write application configuration information to an xml file usind msxml.
Please could somebody help me on how do accomplish this.
|
|
|
|
|
Here I have two problems, I only have two classes, an App and a Window.
1. I want each LETTER a different (random(switch)) color.
2. I don't want the color to change when I resize the Client Area (which it does now...)
All that happens now is that the first letter prints off the M.I.L. ("abc")
or the two menu items ("Katie", "Anna") in a diferent color...
Where have I gone wrong?
-thanks a lot
//////////////////////////////////////////////////////////////////////////////
#include <afxwin.h>
#include <cstdlib>
#include <cstdlib>
#include <ctime>
#include ".\katieapp.h"
#include ".\ckatiewin.h"
#include ".\resource.h"
CKatieWin::CKatieWin(void): m_sText("abc"), m_crColor(RGB(0,255,0))
{
Create (NULL, _T("Katie App"), WS_OVERLAPPEDWINDOW,
rectDefault, NULL, MAKEINTRESOURCE(IDR_MENU1));
CDC* pDC = GetDC();
pDC->SetBkMode(TRANSPARENT);
UpdateWindow();
}
CKatieWin::~CKatieWin(void)
{
}
BEGIN_MESSAGE_MAP(CKatieWin, CFrameWnd)
ON_WM_PAINT()
ON_COMMAND(ID_FILE_EXIT, OnFileExit)
ON_COMMAND(ID_FILE_ABOUT, OnFileAbout)
ON_COMMAND(ID_PERSON_KATIE, OnPersonKatie)
ON_COMMAND(ID_PERSON_ANNA, OnPersonAnna)
END_MESSAGE_MAP()
void CKatieWin::OnFileExit()
{
DestroyWindow();
}
void CKatieWin::OnFileAbout()
{
MessageBox("Copyright: Skunked Works 2004", "Katie App", MB_ICONEXCLAMATION);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////// MY GUESS IS THAT THE PROBLEM IS HERE SOMEWHERE..!!
void CKatieWin::OnPaint()
{
CPaintDC dc(this);
CRect rect;
CFont font;
font.CreatePointFont(2000, _T("Arial"));
dc.SelectObject(&font);
dc.SetBkColor(::GetSysColor(COLOR_WINDOW));
GetClientRect(&rect);
for(int i = 0; i < m_sText.GetLength(); i++)
{
CKatieWin::SetTextClr();
dc.SetTextColor(GetTextClr());
//dc.DrawText(m_sText[i], rect, DT_SINGLELINE);
dc.TextOut((i+1)*200, 0, m_sText.GetAt(i));
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
TCHAR CKatieWin::GetText(int i)
{
TCHAR c = m_sText.GetAt(i);
return c;
}
void CKatieWin::SetText(CString _m_sText)
{
m_sText = _m_sText;
}
void CKatieWin::OnPersonKatie()
{
SetText("Katie");
Invalidate();
}
void CKatieWin::OnPersonAnna()
{
SetText("Anna");
Invalidate();
}
void CKatieWin::SetTextClr(void)
{
srand((unsigned)time(NULL));
int j;
j = rand() % 3;
switch(j)
{
case 0:
m_crColor = RGB(0,0,255);
break;
case 1:
m_crColor = RGB(0,255,0);
break;
case 2:
m_crColor = RGB(255,0,0);
break;
}
}
COLORREF CKatieWin::GetTextClr(void)
{
return m_crColor;
}
|
|
|
|
|