|
Have you considered using new/delete instead?
|
|
|
|
|
memset( data, 0, sizeof(*data) );
|
|
|
|
|
Hi,
I work on a large App created using C++ in VS6. We have since moved to .Net and our code is unmanaged. Several of our dialogs have an overwhelming number of controls. I have been tasked to create a wizard which will walk the user step-by-step through completion of the dialog. The current dialog must stay in tact while the wizard will break the dialog into smaller "user friendly" chunks with explanation text. The idea is to have only the current dialog for experienced users and the wizard for new users. The user will have to add text to edit boxes and select from combo boxes etc. I have to do this for several dialogs. I'm trying to figure out the best way to do this without duplicating work. I'm toying with the idea of using a property sheet.
Suggestions??
Thanx
Cubzfan
|
|
|
|
|
The EnumProcesses function in the PSAPI library enumerates processes. Unfortunately, it does not include in that enumeration processes run by other users. Does anyone know of a way to enumerate all the processes in the system?
Software Zen: delete this;
|
|
|
|
|
probably you can do it only if you have admin rights.
-prakash
|
|
|
|
|
Thanks for your response.
In this case, administrator rights doesn't appear to help (the logged-in user is an administrator).
I've found an alternate method of resolving my issue (it involves an installer for a service that runs under a separate account) using the service control manager directly.
Software Zen: delete this;
|
|
|
|
|
Gary Wheeler wrote:
Does anyone know of a way to enumerate all the processes in the system?
Hi Mr. Gary,
you can try CreateToolhelp32Snapshot(..),Process32First and Process32Next api
"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
|
|
|
|
|
Thanks for your response. I'll keep it in mind.
I've found an alternate method of resolving my issue (it involves an installer for a service that runs under a separate account) using the service control manager directly.
Software Zen: delete this;
|
|
|
|
|
Hi,
I am a bigner in VC++ programming (started lerning only in March 2005 with visual stdio 6).
I request some help.
I have created a small database related application for a friend using CDAORecordSet. I made the data connection to Access (ie data is stored, added to and retrived from an access file and displaed on to a listView). I build the application seting the build configuration as 'release'. Then I copied the exe file and the access file on to my friend's computer and tried to run it.
I get the message "Unable to initialise DAO/jet engine".
Please tell me what to do now? Do I have to incorporate the jet engine in the program. If so, how do I do it? Or is there something else that must be done, like create a setup file.
Please, someone, tell me what to do? I really need some help.
Thank you,
Tara
|
|
|
|
|
You have to check register "HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\3.5\Engines exists"
If you don't have this fold you have to install Jet Engine. It's depend on OS you can get download in this site http://www.microsoft.com/downloads/results.aspx?productID=&freetext=Jet%204.0%20Service%20Pack&displaylang=en[^]
One more thing is before check DAO/Jet infromation
bool DAOInstallCheck()
{
HKEY hRet;
bool bBool=false;
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
"Software\\Microsoft\\Jet\\3.5\\Engines",
0,KEY_QUERY_VALUE, &hRet) == ERROR_SUCCESS)
{
bBool = true;
RegCloseKey(hRet);
}
return bBool;
}
if DAOInstallCheck())
// Message Return Install require
else
// DAO already Install
Have a nice day
-- modified at 17:22 Wednesday 12th October, 2005
|
|
|
|
|
Hi,
I'm trying to show a bitmap image (blended) over a background video using VMR9, this works fine...
Except,
The bitmap is only visable in the areas of the client window which the video is covering. (as the video is letterboxed).
Is it possible to allow the overlay bitmap to fill the entire window...
And if not, what over approach should I be looking for to acheive this?
Thanks...
Simon.
|
|
|
|
|
ooook... figured it out
I've turned off letterbox mode, and manually resized the video itself into the client area, this allows the VMR to render the bitmap to the entire client area....
Thanks for listening
|
|
|
|
|
Thanks for letting us know the solution - I sometimes look here to see common problems (and solutions) that people come across.
Elaine
The tigress is here
|
|
|
|
|
Hi,
My clients like to see the texts instead of the dimmed texts on disabled controls such as check box, radio button, combo box, and edit box in a C++/MFC dialog box. The texts on enabled controls are black.
In order to differentiate disabled controls from enabled controls (black texts), I would like to add some color (blue) on the disabled control texts.
Can you tell me the existing or potential solutions?
Thank you very much!
Shelley
-- modified at 16:20 Wednesday 12th October, 2005
|
|
|
|
|
y22zhou wrote:
My clients like to see the texts instead of the dimmed texts on disabled controls such as check box, radio button, combo box, and edit box in a C++/MFC dialog box.
This would seem to be counterintuitive. For example, say you set the text of these disabled controls to red, and the user went in and changed their theme to display red text for controls. How would they differentiate between a disabled control and an enabled control?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hi,
I have a jpeg file. I would like to embed some text to it.
The text messages will be right above the jpeg image.
For example:
Smiley face
Can someone g:|ive me some ideas about how to do it?
Thanks,
Kevin
|
|
|
|
|
read the jpeg.
allocate a temp image large enough to hold the jpeg, with extra space at the top for the text.
overlay/merge the jpeg onto the temp image.
draw the text at the top of the temp image.
save the temp image.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Hello,
I need to set a button as a default button (get's pressed when ENTER is pressed). I'm not using CDialog, so SetDefID is out.
I can subclass the controls in the view and have them post a message to the parent when ENTER is pressed, but there must be a better (more simple) solution.
Any ideas?
Thanks!
-Ian
|
|
|
|
|
Ian Bowler wrote:
I'm not using CDialog, so SetDefID is out.
What's wrong with sending the control a DM_SETDEFID message?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Isn't that messaged handled by CDialog? If so, I don't think that will work because I'm not using CDialog.
|
|
|
|
|
Ian Bowler wrote: If so, I don't think that will work because I'm not using CDialog.
MFC is not an issue here. It is a standard Windows message that you can send to a control.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
u can set up a default button
right click the button in
the resource editor , click on property,
go to the style tab , check mark the
Set default check box,
I think that willl solve ur problem
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Ian Bowler wrote:
I need to set a button as a default button (get's pressed when ENTER is pressed). I'm not using CDialog, so SetDefID is out.
are you dynamically creating the Button then use BS_DEFPUSHBUTTON while creating the button otherwise use technique mention by Vikas
"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
|
|
|
|
|
Yes, I am dynamically creating the button. I tried using the BS_DEFPUSHBUTTON style but that did not work. The button that I'm wanting to set as the default is in a hosted ActiveX control. Could that be part of the problem? The hosted ActiveX control's UI is built on CView-derived class. This class owns a CWnd-derived class, which owns the CButton that I want to make default. When the CWnd-derived object or one of its child objects has the focus, I want the ENTER key to activate the CButton.
Here is a diagram that I hope will help:
--------------------------------------------------------------------------------------
Application
------------------------------------------------------
| ActiveX control
| ------------------------------------------
| | CView
| | ---------------------------------
| | | CWnd
| | | ---------- When this CWnd-derive class or any of its child MFC
| | | |CButton | controls have focus, I want the CButton to get
| | | ---------- pushed when the ENTER key is pressed.
| | ---------------------------------
| |
| ------------------------------------------
|
------------------------------------------------------
--------------------------------------------------------------------------------------
Thanks again for taking the time to help!
-- modified at 11:27 Thursday 13th October, 2005
|
|
|
|
|
Hello,
I have the following problem. I want to create a temporary object that is transparent to the caller of the function which creates the temporary. We all know that values returned by value from a function, the temporary is created on the stack until it is no longer needed.
I wan't to use this property of the temporary to create a locking / unlocking mechanism for an object. See the following code for details
class CArbitraryClass
{
public:
void DoFoo() {}
};
class CWrapperClass
{
public:
CInvisibleTemporary operator->()
{
return CInvisibleTemporary::CInvisibleTemporary();
}
};
class CInvisibleTemporary
{
public:
CArbitraryClass& operator->() { return m_ArbitraryObject; }
private:
CArbitraryClass m_ArbitraryObject;
};
So the code should look like the following statements:
CWrapperClass Wrapper;<br />
Wrapper->DoFoo();
But it looks like:
CWrapperClass Wrapper;<br />
Wrapper.operator ->().operator ->().DoFoo();
Am I trying to do something impossible?
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|