|
momer wrote:
Is there a certain rule which determines the order of all the instances which are enumerated?
No. It may be the order in which they were found/attached, but may not be. Don't depend on it.
momer wrote:
If not,how can we let the first attached one be first enumerated,the next will be next,and the last will be last?
No idea. Sorry
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I'm using Visual Studio .Net to create an application that uses HTML help. In general, I am having a really hard time finding good documentation on how this works. The MSDN library is a nightmare to navigate through and is not helping me much at all.
Here is my current problem. I can't seem to find a good description for or get a good feel for how all of the files work together. There is an HTMLdefines.h file. Then there are the .hhc, .hhk, .hhp files. Then the .chm file is the compiled output file. I have no problem with the basic editing of the help files and compiling them.
In my main application, pressing f1 over almost every menu item works and brings up a help window. I have no idea how because I never did anything specific for this to happen. I didn't even write a function handler to do this. Somehow this was all taken care of by the app wizard. There are two menu items; file-open and help-topics where when I press F1, I get an error message: "can't open help". I don't even know where to begin troubleshooting this since it is not even being done in my code. Somehow there must be some broken links in my help files in the hlp directory but I don't see them. At first glance all seems to be well. When I press help-topics, the .chm window is displayed fine and I have navigated through my help with no broken links. So what gives? Where can I find a book or some good documentation or research papers on how all of the files fit together so that I can solve this problem?
Thank you!
|
|
|
|
|
|
Iam new to VC++. I need to make a dialog based mfc app which has 5 radio buttons.i need to pass in a list of 6 labels.the dialog should be able to display a list of radio buttons that are labeled with the parameters passed in. i should then return which label was selected.
can someone give a simple app which does this? Need urgently.
|
|
|
|
|
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
|
|
|
|