|
MFC has a CMap class and its source is available....
Judy
|
|
|
|
|
|
includeh10 wrote: First thing I think I need to do is to know how to create HashTable for the map class.
Read up on the subject here.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: Read up on the subject here.
I'm not used to asking questions in CodeProject forums but I'll give it a try.
Which is more difficult?
1) Understanding instructional material on writing C++ code for a Hashtable
OR
2) Figuring out how to use Google to search for instructional material on writing C++ code for a Hashtable
led mike
|
|
|
|
|
i like the second one!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
led mike wrote: 2) Figuring out how to use Google to search for...
See if this helps.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all,
I'm running VC6 on 64-bit Vista, not an ideal situation I know but most things seem to be working for my app. However, I'm having one problem I can't seem to figure out.
I have two GUI programs in my app. When the first program is running I sometimes want to open the second program as a local server using Automation (e.g. both programs are .exe files). However, as outlined in the subject line, OleRun in COleDispatchDriver::CreateDispatch returns REGDB_E_CLASSNOTREG even after CoCreateInstance in the same function returns with no problem. I believe my registry settings are ok since I can pass data to the second program if it is already running. However, I just can't get it to start running if it is not already running.
I'm logged in with an administrator account and the problem happens whether or not User Account Control is enabled. I've moved all my registry keys to HKEY_CURRENT_USER but this doesn't seem to help either. I'm not all that familiar with COM/Automation so maybe the problem is related to that.
Any help for this out there?
Thanks,
Kevin
|
|
|
|
|
Kevin 1233412 wrote: but most things seem to be working for my app.
and they might work again[^]
I have no idea what might be the problem so this is just a WAG, are you building your projects using the Platform SDK for Vista and you have set WINVER appropriately?
led mike
|
|
|
|
|
Hi,
I'm having some trouble using classes defined in one project (compiled as exe) in another project (also to be compiled as exe, to run in a separate process, but part of the same solution). Is it possible at all? Or do I have to import all the .cpp files into the other project and compile them there?
I've set up a project dependency, but that doesn't work. I get unresolved externals during compilation.
Note, I've also set up project references.
modified on Thursday, July 17, 2008 12:45 PM
|
|
|
|
|
All the code an individual project needs to build must be
part of the project, or available to the project through a
library.
How you manage the physical files is up to you.
I personally use a "common" folder in the solution's folder to
keep my common/shared cpp/.h files in one location - only one codebase
to update. All projects can reference files there using relative paths,
something like "..\common\somecommoncode.h".
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
When I create the dialog box (second dialog) in the first dialog box it stays always above the first one. I can push to a button in the first dialog box while the second one stays above it.But when I create them at the begining of the program in the main dialog box (main dialog box is different than the first dialog box) then if I touch to the first dialog box the second one goes below the first one.How can I fix the second dialog box above the first dialog box when I create them at the beginning of the program?
Thanks
ibrahim
|
|
|
|
|
|
As mike said, u can use SetWindowPos( m_hWnd, HWND_TOPMOST, Left, Top, Width, Height, SWP_SHOWWINDOW );
aks
|
|
|
|
|
That didn't solve my problem.I think it will be better if I write the code sample.
Creating the dialogs as global.
pKeyboard = new CKeyboard;
pKeyboard->Create(IDD_KEYBOARD,this);
::SetWindowPos(pKeyboard->m_hWnd, HWND_TOPMOST,0,0,cxScreen,2*cyScreen/5, SWP_SHOWWINDOW );
pPhoneEditor = new CPhoneEditor;
pPhoneEditor->Create(IDD_PHONEEDITOR,this);
pPhoneEditor->SetWindowPos(&wndTop,0,0,cxScreen,cyScreen,SWP_HIDEWINDOW);
Is there a problem in this code?
|
|
|
|
|
If you use DoModal () to display the second dialog box, it will be fixed at the top until you close it. This is called a "modal" dialog box.
|
|
|
|
|
But I want that I can push a button or write something to an editbox in the first dialog box while the second dialog is on the top.When I create the dialog box as modal I think that I cannot use the first dialog box?
|
|
|
|
|
That's correct. In that case, you should probably use led mike's suggestion instead of DoModal ().
|
|
|
|
|
Dear All,
Please guide me how to use TrackMouseEvent() to track the events of mouse on a CBitmapbutton. Please advice.
Also I see a message map
ON_BN_HILITE( <id>, <memberFxn> ) afx_msg void memberFxn( );
Is it possible to use when a button is highlighted.
Regards,
Banu
modified on Thursday, July 17, 2008 9:39 AM
|
|
|
|
|
bhanu_8509 wrote: Please guide me how to use TrackMouseEvent()
No. But I will guide you on how to use Google[^]
led mike
|
|
|
|
|
What is the purpose of
ON_BN_HILITE( <id>, <memberFxn> ) afx_msg void memberFxn( ); message map.
|
|
|
|
|
bhanu_8509 wrote: What is the purpose of
MSDN Documentation for BN_HILITE[^]
Also thank you for letting me know that I had accidentally set my signature to "Microsoft Documentation Central". I have now set it back to led mike. I mean seriously that could have been a real disaster, all sorts of people would have been asking me for information that is freely available on the MSDN web site!
led mike
|
|
|
|
|
I see, so please tell me what is the wrong with the below code
//DoDataExchange
DDX_Control(pDX, IDC_BUTTON9, m_button9);
//Message map
ON_BN_HILITE(IDC_BUTTON9,&Test::OnHighlight)
//Function declaration and button declaration
afx_msg void OnHighlight();
CBitmapButton m_button9;
//Function definition
void Test::OnHighlight()
{
MessageBox(L"Button Highlighted");
}
Also the notify property of the button is true and Owner draw is set to false. I have tried all the above and then only I am asking questions in this forum, if you have time please help otherwise please don't disgrace the new members and novice programmers.
|
|
|
|
|
bhanu_8509 wrote: otherwise please don't disgrace the new members and novice programmers.
Don't disgrace yourself.
bhanu_8509 wrote: please tell me what is the wrong with the below code
I don't see anything wrong with the code you posted and you did not explain what the symptom is now did you? Therefore I don't even know what to look for now do I?
Are you running in 16 bit Windows?
led mike
|
|
|
|
|
Hi,
is there the possibility to get a MouseOver Event for Combobox Items?
I want a bubble to pop up, when the users mousepointer is over a combobox item, so i would need the event, and the value of the item the mouse is over.
Can someone help me?
Thank you,
Johannes
|
|
|
|
|
Have you called EnableToolTips(TRUE) ? Do you have a handler for TTN_NEEDTEXTA and TTN_NEEDTEXTW ?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|