|
Ah a multiple inheritance problem. Unless only one of the base classes has data members ( so the others are all interfaces ), it should not be done unless as a last resort.
Together with your Rel method update(void*) you appear to have a design problem. void* is untyped and therefore indicative of design flaws.
No doubt there are one or more bugs that could be fixed, but poor design can manufacture complexity and increase the risk of bugs, difficult bugs.
|
|
|
|
|
Hi All,
I m not getting process details (process name, process path) for some processes. for example, I m not getting process details for 3 svchost.exe out 5 svchost.exe. I m getting proper details for 2 svchost.exe.
Thanx,
Subhash
|
|
|
|
|
Subhash Karemore wrote: I m not getting process details...
Using what? Do you have the Debug privilege (i.e., SeDebugPrivilege ) enabled?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello to all,
i am creating one modeless dialog box whose id is "IDD_DIALOG_TEST" and i have placed some static text "Hello codeproject" on that dialog box. I am invoking that dialog box through "Create" method and showing it through "ShowWindow(SW_SHOWNORMAL)" method, after some time when i will call "DestroyWindow()" method the dialog box will get destroyed, now the problem is that dialog box is getting invoked and displayed properly but the static text on it is not getting displayed means i can see only dialog box but not the static text on it, what can be the reason, can anybody help me plz?
Thanks and Regards,
Anay
|
|
|
|
|
is this[^] article of any help ?
|
|
|
|
|
AnayKulkarni wrote: have placed some static text "Hello codeproject" on that dialog box.
how are you placing the Static text on the dialog. i.e. are you using SetWindowText or included that in Resource file or giving value to any variable to display the static text at startup
"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
|
|
|
|
|
How are you calling this update function on the dialog? Are you in a UI thread? If not, you can run into problems...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
Hi all,
how to add pictures to the mainframe as my mainframe is opening with nothing in it.can any one plz tell me clearly about this,,,
thanks in advance,
Saravana...
|
|
|
|
|
saravana001 wrote: how to add pictures to the mainframe as my mainframe is opening with nothing in it.can any one plz tell me clearly about this,,,
how are putting you image in MainFrame Window, i.e. View Window. have you overidden the OnDraw function for drawing image on View Window. you can use this class for display variety of image format on windows http://www.codeproject.com/bitmap/extendedbitmap2.asp[^]
"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
|
|
|
|
|
I have an MDI app - and I wanted a less boring backdrop. The trick is to subclass the MDI Frame window - and then override WM_ERASEBKGND.
The below code uses CSubclassWnd by Paul DiLascia - you should be able to search for in from an old MSJ article on the web.
Good luck,
Iain.
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
m_Backdrop.Install (m_hWndMDIClient, IDB_MIDAS, 32);
....
return 0;
}
class CUIMDIBackdrop : public CSubclassWnd
{
public:
CUIMDIBackdrop ();
~CUIMDIBackdrop ();
BOOL Install (HWND hWndMDIClient, UINT idBitmap, int nMargin);
protected:
virtual LRESULT WindowProc(UINT msg, WPARAM wp, LPARAM lp);
};
CUIMDIBackdrop::CUIMDIBackdrop ()
{
}
CUIMDIBackdrop::~CUIMDIBackdrop ()
{
}
BOOL CUIMDIBackdrop::Install (HWND hWndMDIClient, UINT idBitmap, int nMargin)
{
return HookWindow (hWndMDIClient);
}
LRESULT CUIMDIBackdrop::WindowProc(UINT msg, WPARAM wp, LPARAM lp)
{
if (msg != WM_ERASEBKGND)
return CSubclassWnd::WindowProc(msg, wp, lp);
HDC hDC = (HDC) wp;
CDC *pDC = CDC::FromHandle (hDC);
CRect rc;
::GetClientRect (m_hWnd, &rc);
return TRUE;
}
|
|
|
|
|
Hi all,
I have an application that create a process in suspend mode:
CreateProcess(filePath, 0, 0, 0, TRUE, CREATE_SUSPENDED, 0, 0, &startup, &procinfo);
and then later in code, we will run the program... so do a resume
ResumeThread(procinfo.hThread);
the problem I have is that the windows of the launched program does not appear. For example, if the create process is notepad.exe, when I resume the thread, the window of notepad does not appear and even not in the taskbar.
What is wrong with my approach?
thanks
InovaH
|
|
|
|
|
send it a WM_RESTORE or WM_MAXIMIZE...
BTW, what are you trying to achieve here ?
|
|
|
|
|
How do I send it?
Trought the SendMessage() ? (If so, how to get hwnd)
or with startup.wShowWindow = SW_MINIMIZE; ?
I try to create a process of user's choice in suspend mode to analyse program and inject a monitor DLL. Then process is resumed so that program is used by user.
InovaH
|
|
|
|
|
How are you initializing the startup structure?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Here is the initialization:
STARTUPINFO startup;
GetStartupInfo(&startup);
memset (&procinfo, 0, sizeof (PROCESS_INFORMATION));
memset (&startup, 0, sizeof (STARTUPINFO));
startup.cb = sizeof(&startup);
//start process in SUSPEND mode
CreateProcess(filePath, 0, 0, 0, TRUE, CREATE_SUSPENDED, 0, 0, &startup, &procinfo);
CU
|
|
|
|
|
Shouldn't you be assigning a value, other than 0 , to the wShowWindow member?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
What is the difference between the following two statements?
1. if ((nID & 0xFFF0) == IDM_ABOUTBOX)
2. if ( nID == IDM_ABOUTBOX)
|
|
|
|
|
by doing nID & 0xFFF0 , you're forcing the lower significant bytes to 0.
read this article[^] to understand the & operator better.
|
|
|
|
|
Sakthi_Vel wrote: 1. if ((nID & 0xFFF0) == IDM_ABOUTBOX)
This only looks at the three most significant (upper) bytes, and then compares the result to IDM_ABOUTBOX .
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: This only looks at the three most significant (upper) bytes
Have to disagree, 0xFFF0 only represents 2 bytes or 16 bits, how can the expression look at three bytes? The expression nID & 0xFFF0 ignores only the lower 4 bits of nID.
|
|
|
|
|
Hello All,
how to get Current System Date in Long?
Any Help?
Manish Patel
|
|
|
|
|
The last Long equivalent Date type I heard of was in VB6, these days you'll probably need to do your own conversion or put up with storing at least 8 bytes. Have a look at the GetSystemTime and SystemTimeToFileTime API calls and their associated structures. A conversion to something like
<br />
struct LongDate<br />
{<br />
WORD Year;
WORD DayNumber;
};<br />
would be pretty trivial and you could shoe-horn that into a long.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Manish_mnp wrote: how to get Current System Date in Long?
Use the time() function.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
How can I know, that an application has been launched ?
Is there a windows event or something like that ?
Thank you for helping me.
Jphil
|
|
|
|
|
You can only know reliably if the launched application chooses to tell you. The best and most common way to do this, for example to prevent more than one copy of an app running, is to use a named Kernel object like a Mutex or Semaphore which can be accessed by name from more than one process and locked to prevent multiple usage. A shared named Kernel Event Object could be used if you simply want to watch for an app launch. If it's a 3rd party, black box app that you can't change then you'll either need to use some form of Dll injection to add the Event code to it or fall back to older unreliable methods like enumerating top level windows to look for an application specific name.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|