|
Actually i am facing the problem to open a new dialog window by clicking a hyperlink in the client area of the window--
How is it possible?
Can i insert menu in a dialog window?
|
|
|
|
|
Hi Syjoy !
1)To open dialog you should write a responce code (to a hyperlink click) like the sample below:
CYourDlg dlg;
dlg.DoModal();
please note that rhe example is for a modal dialogs only ... hope it will be enough for you.
2)Yes it's possible.
3)To insert menu into dialog (assuming that you're using MFC, ClassWizard and other usefull stuff =):
a)Insert a new menu into resources ... name it IDR_MENU1
b)select a dialog you'd like menu insert into (Resource View "Tab"->Dialog->)
c)Select diagog properties - (rigth click on the dialog)
d)Select "General" Tab
e)In "Menu" combo select IDR_MENU1.
f)compile project
g)link project
h)debug it a little
i)run it
j)enjoy =)
I'm in a rather good mood today =);P
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru
|
|
|
|
|
Actually i am facing the problem to open a new dialog window by clicking a hyperlink in the client area of the window--
How is it possible?
Can i insert menu in a dialog window?
|
|
|
|
|
Hi
Please tell me how to convert from int to BSTR in VC++.I want to create a xml node with an int value.I need to pass BSTR variable to the method createTextNode().
How can I do it?
Thanks.
Pathi
bhikshapathi_g@semanticspace.com
|
|
|
|
|
Convert the integer into a string using itoa and then either type cast it directly to BSTR or copy it first in a CString object and then into a BSTR.
I hope this helps.
|
|
|
|
|
TCHAR szStringRepresentation[32];
wsprintf ( szStringRepresentation, _T("%d"), nYourIntegerValueHere );
pInterface->CreateTextNode ( _bstr_t(szStringRepresentation) );
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
I have an MFC application that has some dialogs with there classes. I want to take these dialogs with the classes into a dll. How can I do that.
Please this is urgent...
Anyone knows why Visual C++ compiler causes problems in Windows 2000.
|
|
|
|
|
DLL:
Create an MFC extension DLL project with the App wizard.
Include (copy over) your dialog classes, and resources. (you can open the original apps .rc file and drag and drop the dialog templates to your dll projects resource view).
Add AFX_EXT_DLL to the declaration of your CDialog based classes (after the class keyword).
Compile the dll.
APP:
In the apps that will use it, include the now modified (AFX_EXT_DLL) headers for the dialogs and the defines for the resource ids of the dialogs - try not to conflict with any of the existing apps dialog IDs.
Add the dlls lib file to the apps project link settings.
You should be able to work with the classes in your app, as long as it can find the DLL.
|
|
|
|
|
After posting the above, I ran into some strange problems as I went to test in release - some strange problems with VC that I don't think I have seen before - seems ok now, but could you describe a bit more about the type of workspace you're working and the problems you are having?
Also, what service packs do you have for VC (HKLM\Software\Microsoft\VisualStudio\6.0\ServicePacks)
|
|
|
|
|
I want to show only shared folders in the BrosweforFolder Dialog.Normally it shows the folders / or set folder in the machine + Shared folders in other machine.But i want this default behaviour to be changed and it should show only shared folders in the machine from which it is run.Can any one have a solution ...pls reply....
|
|
|
|
|
For do it, you must use of MCI ...
In MSDN is several example about it ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
From memory ( and I could be wrong, LMK and I'll dig up my old source code if this does not work ), you need to select the row and column before doing the insert.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Thanks for the advice although I did try that. I am giving up on the FlexGrid and going with the CListView. It does what I want as well.
Thanks again,
Brad
|
|
|
|
|
OK. I'm sorry - I worked with it nearly two years ago and had constant problems, but it's too long for me to remember much about it. If you come back to Flexgrid, LMK and I'll be happy to dig around some old backup CD's for my source code.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
No problem at all. Actually I am happier using a ListView instead. I feel more comfortable with it.
Anyway, thanks again,
Brad
|
|
|
|
|
christian is right ... you have to set the current row and current column before doing the insert
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
I want to use MSDEV as the editor for a rather lame, but other necesary IDE we are using. The options I've tried so far are:
1) I can pass the "msdev <filename>" as the command line, but it starts up multiple instances of developer studio.
2) I can pass just the name of the file, and if an instance is already running it uses that
However, I need to also pass an optional line number. It seems my only choice is to use a macro, but that leads back to the problems with 1.
Any suggestions?
|
|
|
|
|
You could write a quick little application that sends DDE commands to MSDEV.
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
Hey Gang,
It has been a very long week and my brain is totally fried.
I'm trying to use the function CoSetProxyBlanket and getting a return of "undeclared identifier", however, CoCreateInstance operates perfectly and they are both defined in objbase.h.
What did I forget?
|
|
|
|
|
Hey Rhoam.
Yeah, it was a rather long week - but the solution is a quite simple : add this definition into stdafx.h #define _WIN32_DCOM and enjoy.
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru
|
|
|
|
|
DOH! I knew it would be simple.
Thank you very much for your assistance. Think I'll take the rest of the weekend off and get some sleep!
Rhoam
|
|
|
|
|
Can anyone tell me how to test the memory leak......this test can tell me where the leak is.....
Also....i have one more question.......When i write a WinNT program and want to transfer to Win9X, do i have to do some modification to the program? If yes....what? Because....seems liked always has problem if i'm doing that.....
Thanks
|
|
|
|
|
Question 1: Boundschecker will help you find memory leaks, but it's quite expensive. There are some alternative wrappers around that basically wrap 'new' and 'delete'. First of all, do you realise if you run in debug mode, when you exit VC tells you the locations of memory leaks ? It sometimes gets it wrong, but may be able to help you.
Question 2: There are a number of issues. First is Unicode, which I don't know enough about, so I'll leave it to someone more knowledgeable. I know that a program not compiled for Unicode running under NT converts all strings to Unicode as it passes them on, but I'm not sure about vice versa, having read Richter four times and still understanding about 1/10th of it ( largely because I've not had opportunity to *work* with the stuff in there ). Second, there are commands certainly in GDI that NT supports and W95 does not. I'm not sure if W98 supports them all, but I don't think so. I'd venture a guess that this would be true in other areas as well, and if you look in the MSDN, some commands accept different parameters in different OS, etc. However, having said that, by steering clear of such commands and writing my own, I've had no problems running my paint program under W95 W98 WME NT4 and NT5, so I wouldn't have thought it was a major issue.
What problems are you having ?
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
BoundsChecker is indeed afaik the best tool for finding memory leaks (and not only). If You cannot afford it, maybe try the evaluation version - there should be some.
In MFC exist several functions which may help You. See for example:
AfxCheckMemory, AfxEnableMemoryTracking, AfxSetAllocHook...
Though I still recommend You BoundsChecker
|
|
|
|
|
I didn't suggest the evalutation of BoundsChecker because getting one is like pulling teeth. Fill in a form, pass a phone interview, download the demo, get call after call from reps who know the lingo but wouldn't know how to write a hello world program....
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|