|
Hey!
In my program, I'm enumerating the processes in Windows and
I want to be able to call DebugActiveProcess on one of them so
I can capture it's OutputDebugStrings(). But calling
DebugActiveProcess() doesn't seem to work, even if I have
the right process ID. I'm working in both Win98 and 2k. If
I call GetLastError(), in 98 I get an "invalid parameter" (#87)
error message. In 2K, I get an "access denied" error message.
What am I missing?
Steve The Plant
|
|
|
|
|
I just figured out what I did wrong. I was trying to attach a
debugger to a process that already had a debugger attached to
it. I was trying to attach it to a program that was run in
debug mode in VC (ie hitting F5 to run it). Of course, since
it already had a debugger I couldn't attach mine.
So now I know.
Steve The Plant
|
|
|
|
|
I have created a Dialog-based app.
In the header-file I defined a variable CStringArray m_filearray;
If I now open a new dialog using DoModal() I want the dialog to be able to access the CStringArray defined in the "main" dialog.
How can I do this?
|
|
|
|
|
Pass a pointer to m_filearray to the new dialog. The new dialog should have a protected member CStringArray* pStringArray that you can set via a setStringArray() method. Be sure to initialize pStringArray to NULL in the dialog's constructor and assert that it's not NULL before you reference it.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Could you please give an example what I have to do exactly?
I have added a protected CStringArray *m_pFileList to the second dialog and initialized it to NULL.
What do I need to do next?
thanks in advance
|
|
|
|
|
Add a method called SetStringArray that takes a pointer to a CStringArray and pass in the address of the array.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hi,
I have a SplitterWnd with two panes. In one I have a CFormView and the other is a CView. I'd like to position the (vertical) splitter bar so that it's equal to the width of the FormView when the splitter is created. I'd also like the positioning to be dynamic, so if I edit the CFormView dialog, making it wider, the splitter will be created in the proper location.
Also, I'd like to know what message is fired before the scrollbars are displayed in the FormView. In certain cases, I'd like to prevent the horizontal scroll bar from appearing by shifting the vertical scrollbar to the right. I do this now by checking the size of the window as it's being resized and then shifting the scrollbar, but it's very sloppy because the scrollbars are displayed before I trap the resize message.
Thanks for any help you can offer.
Tom
|
|
|
|
|
I don't believe there is a message generated when a scroll bar is about to be displayed.
|
|
|
|
|
Any ideas on how to get the size of the dialog template at runtime so I can locate the splitterbar to align with the width of the dialog template?
|
|
|
|
|
Create a static frame the desired size of the dialog and use that as the frame size.
|
|
|
|
|
I am going to distribute my database-based C++ application. But I don't know how to set ODBC DSN when setup. Is there any one can tell me that, or is there any installer support that function?
Thanks,
|
|
|
|
|
If your using Installshield there is a wizard to set ODBC data sources, or you can set it in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI
|
|
|
|
|
|
Can anyone help me in my school project?I'm a beginner at microsoft visual c++ any need help in doing a program.I would appreciate it if anyone is willing to help me doing it.Thanks alot!
|
|
|
|
|
Code Project is not a place for make your HomeWork, but We can help you making the Alpha Version, of your Project.
Cheers!!!!
Carlos Antollini.
|
|
|
|
|
What type of help do you need Ramzirex?
Please be specific, and post direct questions.
|
|
|
|
|
You get points for saying up front you are doing homework. You lose points for asking the same question twice instead of taking the advice you were given the first time. Asking if people will help you without saying what you want is pointless - by all means when you have an actual question about the project you are working on, post it and I'm sure we will be glad to help.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hi All!
I'm using Tree Control in my dialog and CTreeCtrl in my class
to handle it. I put in this Tree objects, so you can click on them
and view their attributes. User is allowed to mark both objects and
attributes using checkboxes inside tree (I use the TVS_CHECKBOXES style).
My problem is: when you've marked attribute of any object, and after that
collapse the tree, you can't see: have you any checked attributes inside or not. The best decision, I think, would be use tri-state checkboxes (marked, unmarked, partially-marked). I saw these things in installation programs.
The question is: Is there any way to do it inside Tree control?
Or I need to create my own image list with three bitmaps, attach it to my tree control and handle messages on it?
|
|
|
|
|
I needed to do that, And I used the ame Idea. I use a Bitmap with the three states. I Ask for the state of each child item and I decide the bitmap to use.
Cheers.
Carlos Antollini.
|
|
|
|
|
Hi,
I have a child dialogs which is created form the main dialog. Child dialog contains system icon and system menu. I like to disable minimize and remove maximize from the child window's system menu.
Thank You!
|
|
|
|
|
Hello!!
I have a window which covers teh full screen.. I do not want the image on the window to be disturbed. It will be disturbed if teh user presses the windows key i.e. the key which activates the start menu.. Can I disable this key.. In short the user should not be able to disturb teh image by pressing this key..
Please advise how???
Sandeep
|
|
|
|
|
Use SystemParametersInfo()
|
|
|
|
|
Hi all,
does anyone know how to obtain info stored in the resource.
I would like to show the version number / company name … in the about dialog box of my app. (so how can i access to the resource VS_VERSION_INFO of my mfc app?)
Any idea?
thanx in advance
Armin Zürcher
|
|
|
|
|
bool GetDllVersion ( LPTSTR szDllFilename, CString& sProductVersion )
{
DWORD dwHandle, dwInfoSize;
BYTE* pBuffer;
void* pvVersion;
UINT uBufLen;
dwInfoSize = GetFileVersionInfoSize ( szDllFilename, &dwHandle );
if ( 0 == dwInfoSize )
return false;
pBuffer = new BYTE [dwInfoSize];
if ( NULL == pBuffer )
return false;
__try
{
if ( 0 == GetFileVersionInfo ( szDllFilename, dwHandle, dwInfoSize, pBuffer ))
return false;
if ( 0 == VerQueryValue ( pBuffer, _T("\\StringFileInfo\\040904B0\\ProductVersion"),
&pvVersion, &uBufLen ))
return false;
sProductVersion = (LPCTSTR) pvVersion;
}
__finally
{
delete [] pBuffer;
}
return true;
}
--Mike--
http://home.inreach.com/mdunn/
Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese?
Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
|
|
|
|
|
Thanks for your fast reply ,
but the code fails in the following line:
if ( 0 == VerQueryValue (pBuffer, _T("\\StringFileInfo\\040904B0\\ProductVersion"), &pvVersion, &uBufLen ))
is there something different when I use a german file?.
When I view the *rc file it looks like:
BLOCK "StringFileInfo"
BEGIN
BLOCK "040704e4"
BEGIN
(… all other values)
VALUE "ProductVersion", "1.0.0.1"
Perhaps I’ve to change the string from _T("\\StringFileInfo\\040904B0\\ProductVersion") to
_T("\\StringFileInfo\\040704e4\\ProductVersion").
It doesn’t work too – did I miss something?
Thanks again,
Regards
Armin Zürcher
|
|
|
|