|
Hi
I created a desk band like a wmp-minibar, but i have one problem
- how to programically resize the windows toolbar, i've noticed that
wmp-mini bar do that - has anyone some idea? - please help!!!
and sorry for my english, i'm from poland
|
|
|
|
|
Hi again people
How can I get a list of the running apps, like the one is shown in Task Manager in the Applications tab?
Thanks in advance
|
|
|
|
|
|
Thanks mate, I already know about enumprocess, but that will list all the running process, like svchost.exe, lsass and all that.
What I would really like is to see only the Apps running.
Is there any way to filter the process list to get only the Apps?
|
|
|
|
|
Does EnumWindows give you what you want?
AliR.
Visual C++ MVP
|
|
|
|
|
I think that EnumWindows is what I was looking for
I found also that task manager considers Application to any process with a visible window.
Thanks a lot Ali
|
|
|
|
|
Kharfax wrote: found also that task manager considers Application to any process with a visible window
try FindWindow and FindWindowEx combination too!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
See EnumProcesses
whitesky
|
|
|
|
|
The problem is solved, what you need to do is:
* Get all the top level windows via "EnumWindows"
* Filter the list using "IsWindowVisible"
That will leave you the list just like the one you see in the Applications tab in Task Manager.
Hope this will help someone in the future
Thanks for the feedback people
|
|
|
|
|
I use vs2005, when i want to debug my mfc app with #include fstream i get a endless list of problems refering to the xdebug(32)file.
A few errors:
1>C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\xdebug(32) : warning C4229: anachronism used : modifiers on data are ignored
1>C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\xdebug(32) : error C2365: 'operator new' : redefinition; previous definition was 'function'
1>C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\xdebug(32) : error C2078: too many initializers
1>C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\xdebug(32) : error C2440: 'initializing' : cannot convert from 'int' to 'void *'
When i do a release however, everything works just fine...
any sugestions?
- Fred
-- modified at 12:26 Tuesday 18th July, 2006
|
|
|
|
|
The order of #include's may matter. Which do you include first? "stdafx.h" or <fstream> ?
Maxwell Chen
|
|
|
|
|
stdafx.h is before fstream
|
|
|
|
|
|
As the problem is only in debug mode, maybe there is something wrong with some preprocessor definition. If you have a #ifdef _DEBUG statement at the top of your file, post it here (completely) so we can have a look.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
ok, ive tried without the #ifdef _DEBUG
#include "stdafx.h"
#include "resource.h"
#include "Dialog1.h"
#include "Dialog2.h"
#include "assert.h"
#include <Windows.h>
#include "Dialog3.h"
#include <io.h>
#include <fcntl.h> /* Needed only for _O_RDWR definition */
#include <share.h>
#include <stdio.h>
#include "EmbeddedDialogDlg.h"
#include "QuickMissLoadWriteEdit.h"
#include <iostream>
#include "string.h"
#include <string>
#include <fstream>
using namespace std;
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
code comes here
|
|
|
|
|
Mmmh, I don't see really the problem here. Anyway, you are mixing deprecated header files with new ones. Remove all the include with a .h for the stadard library (stdio,io,string). I don't think this will solve the problem but check that first.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
ok, thanks anyway
|
|
|
|
|
FredrickNorge wrote: #include <assert.h>
#include <Windows.h>
#include <io.h>
#include <fcntl.h> /* Needed only for _O_RDWR definition */
#include <share.h>
#include <stdio.h>
#include <iostream>
#include <string.h>
#include <string>
#include <fstream>
Why don't you have these in the stdafx.h file?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
FredrickNorge wrote: vs2005, when i want to debug my mfc app with #include fstream
FredrickNorge wrote: 1>C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\xdebug(32)
Generally speaking, in a MFC/VS2005 project of Debug configuration, the version of operator new being invoked is:
"afxmem.cpp" line 59,
void* __cdecl operator new(size_t nSize, LPCSTR lpszFileName, int nLine)
{
return ::operator new(nSize, _NORMAL_BLOCK, lpszFileName, nLine);
}
And then "afxmem.cpp" line 393,
void* __cdecl operator new(size_t nSize, int nType, LPCSTR lpszFileName, int nLine)
{
#ifdef _AFX_NO_DEBUG_CRT
UNUSED_ALWAYS(nType);
UNUSED_ALWAYS(lpszFileName);
UNUSED_ALWAYS(nLine);
return ::operator new(nSize);
#else
void* pResult;
#ifdef _AFXDLL
_PNH pfnNewHandler = _pfnUninitialized;
#endif
for (;;)
{
pResult = _malloc_dbg(nSize, nType, lpszFileName, nLine);
if (pResult != NULL)
return pResult;
#ifdef _AFXDLL
if (pfnNewHandler == _pfnUninitialized)
{
AFX_MODULE_THREAD_STATE* pState = AfxGetModuleThreadState();
pfnNewHandler = pState->m_pfnNewHandler;
}
if (pfnNewHandler == NULL || (*pfnNewHandler)(nSize) == 0)
break;
#else
if (_afxNewHandler == NULL || (*_afxNewHandler)(nSize) == 0)
break;
#endif
}
return pResult;
#endif
}
Maxwell Chen
-- modified at 14:01 Tuesday 18th July, 2006
|
|
|
|
|
ok i tried to overide the calls, no luck .
What ive done for now though, is commented the verry brief code that actualy use fstream when i debug, and uncomment it for the final release. Works ok for now...
|
|
|
|
|
For this kind of problem, sometimes looking at the compilation log message may help. For example when you have such compilation output message as below:
Compiling ...
stdafx.cpp
test1.cpp
test2.cpp
test3.cpp
e:\wrkshp\test3.cpp(102) : error Cxxxx: blah blah blah
test4.cpp
test5.cpp
Test - 1 error(s), 0 warning(s)
Then you may try to back trace those existing definitions by looking at the included headers (and the related compilation units) in the last compilation (eg: test3.cpp) unit wherein errors are found.
Maxwell Chen
|
|
|
|
|
will do, thanks for all the inputt Maxwell Chen
|
|
|
|
|
Does anyone out there have any suggestiosn on what it the best way to move existing (unmanaged) C++ code into CLR? is it best to port it to C# or is it easier to convert it into "managed" C++ so that the classes becomes available in other languages?
Anil Gurnani
Bear Stearns
|
|
|
|
|
One purpose of MC++ ( C++/CLI ) is the easy porting of C++ code to .NET
|
|
|
|
|
I am building a customized CFileDialog and I have a couple of questions.
1) How do I clear the filename history of the CFileDialog. When my application comes up and I click on the folder to bring up the dialog, the history box is full of files even though I have not entered anything yet. I would like to clear it out prior to creating the CFileDialog.
2) How do I implement the help file for the
Z.K.
|
|
|
|