|
for each buttons in the toolbar, you create an handler ( ON_COMMAND ).
in each handler, you create a dialog; which you previously created in the resource editor; and yo created classes for each dialog.
I want to diaply the content of a particular edit control from a dialog box to the SDI window?
Huh ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote:
I want to diaply the content of a particular edit control from a dialog box to the SDI window?
Well to do that assume you are calling your manu dialogs from your view class .
Declare the Dialog objects in view.h and call dlg.DoModal() in the button event handler.
if( dlg.DoModal()==IDOK)
{
//access the edit control's contents and copy it to a global string ...
}
Now Dig the msdn to find out how a text editor program works so that you can display the contents in your view . ( I ha done it but forgot )
Dharani babu S
|
|
|
|
|
I am writing a Win32 application that needs to be able to detect whether or not the user has administrator privileges.
Anyone know how to detect this?
Thanks!
|
|
|
|
|
|
I am building some stochastic models for risk analysis...so I need to build things like influence diagrams, decision trees etc. These are easy to do in Excel, but we would to rebuild the model using Visual C++ 6.0. How do I build and present, using a graphical interface, distributions such as normal, lognormal, poisson, uniform and binary distributions?
|
|
|
|
|
I dunno what a stochastic model for risk analysis is, but Excel is not programming. VC++ isn't going to provide you with a graphical interface to do this stuff, you need to write code to do it.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I am new to Visual C++ and was wondering if there is any way to call ActiveX controls in Visual C++ version 1.52.
|
|
|
|
|
Anonymous wrote:
Visual C++ version 1.52.
Wow. I haven't used that since programming for Windows 3.x. If I remember correctly, I don't believe this version supported ActiveX. It certainly doesn't produce 32-bit Windows programs. You might want to get a slightly more up to date compiler. You can download the free Visual C++ 2005 compiler here[^], or get yourself a copy of Visual Studio 2003.
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"
|
|
|
|
|
Hello! I'm attempting to write an application in VC++ .NET 2003. My application works alright, but it takes at least 10 seconds for the Form to be displayed.
This happens not just on my work PC (P4 1.5GHz, 768MB RAM) but also on my PC at home (AMD Athlon XP 1700+, 768MB RAM)
I've written a similar App in VC# and the Form is displayed almost immediately.
In VC++, the Build Time is displayed as 4s. It then takes AT LEAST 10 seconds for the Form to be displayed.
My Application is neither large nor complex.
I am new to VC++ and my understanding is that all the code is written in the Form.h file, and nothing needs to be added to the Form.cpp file. Is that correct?
Do I need to change any Solution properties? They are all currently set at their default values.
I would really appreciate any suggestions to improve the speed of Form display.
Thanks!
|
|
|
|
|
If in my main program I have a variable that holds some data. Can my worker threads (I could have any number of worker threads) that I've created access this data....and can I pass a message to them? (the worker threads)
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
While passing data between threads is certainly possible, it's not without risk. Read the following two articles on the subject:
http://flounder.com/workerthreads.htm
http://flounder.com/uithreads.htm
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
PostThreadMessage will post a message into a thread's queue.
You can retrieve it with GetMessage or else wait for messages or other waitable objects to be signaled by using the function MsgWaitforMultipleObjects.
I would not read or write any data shared between one thread or another without guarding it with a critcal section, a mutex, or some other protection.
If you only need to modify a single long value, you can investigate InterlockedIncrement, etc.
|
|
|
|
|
If you want to pass the variable during startup of the thread itself - you can do as below..Assume var is the varible ( it can be a structure also ) you have to pass to the thread function ..
ULONG __stdcall ThreadFunc(LPVOID pParam); //declare thread function
CreateThread(NULL, 0, ThreadFunc,(LPVOID)var, 0, NULL);
Now "var" is passed to the ThreadFunc . Inside the ThreadFunc you can retrive the void param back to the original type as below
ULONG __stdcall ClientThread(LPVOID pParam)
{
int param=(int)pParam; (or) int param=(int*)pParam ; or replace int with your variable's type...
return 1;
}
and If you want to pass the param when the thread is running you can always use PostThreadMessage() with the same way of LOVOID(pParam) ...
Dharani Babu S
|
|
|
|
|
Can anyone help me convert this for loop:
PTCHAR Value = new TCHAR[2];
PTCHAR MRUList = new TCHAR[27];
//Get MRUList from the Registry
_tcscpy(MRUList,_T("abcdef\0"));//sample string
INT MRUListLength = _tcslen(MRUList);
//This is where I need the help
for(INT i = 0; i < MRUListLength; i++)
{
wsprintf(Value,_T("%c\0"),MRUList[i]);
//do something with Value now
}
//would delete the 2 PTCHARs but this is a sample
into something unicode compatible? I know I would need to use CharNext, I just can't figure out how.
Also I have heard of _TINT, Do I need to use that?
wWw.KruncherInc.cOm
|
|
|
|
|
KingKruncher wrote:
_tcscpy(MRUList,_T("abcdef\0"));//sample string
While it has nothing to do with Unicode, the extra '\0' is not necessary.
KingKruncher wrote:
I know I would need to use CharNext, I just can't figure out how.
How about:
for (LPSTR lpValue = MRUList; lpValue && *lpValue; lpValue = CharNext(lpValue))
{
...
}
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Thanks, it works. now what do I do with lpValue to get just that char, not the rest of the string?
wWw.KruncherInc.cOm
|
|
|
|
|
How about *lpValue ?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I need some help finding a memory leak in an isapi extension I am maintaining. This extension leaks memory at a rate of 7mb every 5 minutes. I've been thru the Code Project article: Memory(-Leak) and Exception Trace (CRT and COM Leaks) by Jochen Kalmbach and it seems to be COM objects that are leaking. His approach doesn't work well with COM.
I've tried using UMDH.exe from MS, but am not able to set gflags for inetinfo.exe.
Any help at finding these leaks and/or using umdh.exe is appreciated.
<signature>
It's good to live,
Josef Wainz
Software Developer
|
|
|
|
|
I can set the stack trace flag for inetinfo using gflags here (on a XP Pro SP2 box, running as admin). Is there an issue with permissions on your machine or is gflags just not working?
Chris Richardson
|
|
|
|
|
hello all..
i`m looking how to make when program display such message when it crashed
Assertion failed: f, file main.cpp, line 70
Abnormal program termination
sorry for my bad english, i`m from Estonia
|
|
|
|
|
try using the following #defined constants
__FILE__
__LINE__
__FUNCTION__
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|
|
and what actually must happend after i will define them...?!
will the program dispaly error messages as i want?
|
|
|
|
|
ok ppl.. thx alot using assert() and __FILE__ / __LINE__ helped me thx
|
|
|
|
|
__FUNCTION__ might not be available prior to Visual Studio 7.
I REALLY REALLY REALLY REALLY REALLY REALLY REALLY REALLY REALLY REALLY wanted something like this in Visual Studio 6.0 ...
|
|
|
|
|