|
What about Creating Process using CreateProcess Api,Which give Ultimate Control of Process creating Application to control the new born process.
have a look at this article:-
http://www.codeproject.com/system/newbiespawn.asp[^]
"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
|
|
|
|
|
Also look at ShellExecuteEx instead of ShellExecute
|
|
|
|
|
I have this C++ course and I have creatd a linked list with methods to insert and remove. The program works fine for me but for my instructor it crashes, for him, most likely since he uses his version of main. I can't trobleshoot my version, that easy, since it works. What I suspect is that my remove method wants an actual parameter of a pointer that points to a real address,(not null) and perhaps my instructors main is only sending a pointer. Is it possible to send a pointer, (of a user defined data type UDT) to a method and have that method set what this calling parameter will point to? I hope this makes sense. I have been spending many hours trying to learn all the ins and outs of pointers.
Thanks
If only I had more time!
|
|
|
|
|
Have you tried passing bad values to your methods. Like trying to remove the same element more than one time? If you remove all emements in your main does it crash?
bitsNbites wrote:
I hope this makes sense.
Not fully.
John
|
|
|
|
|
Did you compile and run under Debug mode? And your instructor built and run in Release mode?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi,
I am trying with a program that will create an ActiveDesktop. I want to manipulate the buttons on ActiveDesktop which is intented to manipulate the state of the ActiveDesktop as IS_NORMAL, IS_FULLSCREEN, IS_SPLIT. Is there any option for doing it programically?
I am using IActiveDesktop to manipulate the ActiveDesktop.
Waiting your responses
Vinod
|
|
|
|
|
I have tried using RegisterHotkey for Windows XP to disable Alt-Tab and it worked properly. But when i tried using the same code for Windows 98, the Alt-Tab is still working. How do you do this in Windows 98? Thank You.
|
|
|
|
|
|
Global keyboard hooks would do the trick for you.
Cheers,
Vishal
|
|
|
|
|
messages like ON_EN_SETFOCUS for a CEdit Control is typically sent through its parent,ryt?
This is the situation of CControlBar->Intermediate CWnd->CEdit..
CControlBar is docked on a CMainFrame... CEdit's parent is an intermediate CWnd..
I want SetFocus notifications and ENTER key presses to be handled by CControlBar or on the CMaiNFrame.. is there anyway i can do these?
regards,
Maverick
|
|
|
|
|
I am unable to activate the CButton control that I put on a CDialogBar.
I remember reading somewhere that on a Dialog bar the CButton is disabled.
Can i enable it ?
Thanx in advance
laiju
|
|
|
|
|
Hello. I have the same problem also.. Although I haven't tried it yet, this is the info i got on a website.. hope this helps...
INFO: CDialogBar Button Enabled When Command Handler Present
View products that this article applies to.
Article ID : 98198
Last Review : December 11, 2003
Revision : 1.0
This article was previously published under Q98198
A button in a CDialogBar object is disabled automatically if the command routing does not contain a command handler function for the button.
To enable a button in a CDialogBar object, the command routing must include a command handler for the button. A button command handler can be an ON_BN_CLICKED(), ON_COMMAND(), or ON_COMMAND_UI() message handler and it must appear in the message map of an object in the command routing. If the parent of the CDialogBar object is a CFrameWnd object, then the command is handled by the active child window or view, by the document attached to the view, by the frame window, and by the application (CWinApp object).
NOTE: Because the CDialogBar object is not included in the routing scheme, the ON_BN_CLICKED() or ON_COMMAND() handler must be placed in one of the objects mentioned above that is in the routing scheme and not in the CDialogBar class.
For more information on command routing, see the "Command Routing" section in Chapter 3 of the "Class Library Reference" manual. In Visual C++ 32-bit Edition, version 4.0, see both the "Command Routing" topic of the "Programming with MFC: Overview" in the Books Online and the MFC Technical Note 31, Control Bars.
--------------------------------------------------------------------------------
http://www.kbalertz.com/kb_98198.aspx[^]
|
|
|
|
|
How can i disable the horizontal scroll bar at run time.
laiju
|
|
|
|
|
I havent got any useful hits from google, does anyone here know how to obtain the string representation of an HKEY? Note that HKEY can be any key and not just the top level keys. Thanks!
|
|
|
|
|
I am using MFC and want to know the application folder (typically, but not necessarily "C:\Program Files\MyProgram") so I can read and save an initialization file for the program. A program that uses the main() function, arg[0] is usually the program's command line with subsequent arg[n] being the additional command line parameters. CWinApp does not appear to provide this information and I have looked through the help files and the CodeProject message board without success.
Any help would be greatly appreciated.
TIA
Ron
|
|
|
|
|
Well I dont use MFC I only know the API way so:
you can get it like this:
[code]
char path[_MAX_PATH];
GetModuleFileName(GetModuleHandle(NULL), path, _MAX_PATH );
[/code]
Path holds the full address of your exe like "C:\Program Files\Program\test.exe"
just delete text.exe from it and its done...
Well... I am a beginner ...
|
|
|
|
|
|
Check if this code is of any help :-
CString szCurrentDirectory;<br />
{<br />
CString csPath;<br />
<br />
<br />
::GetModuleFileName(NULL,csPath.GetBuffer(MAX_PATH),MAX_PATH);<br />
<br />
csPath.ReleaseBuffer();<br />
<br />
szCurrentDirectory=csPath.Left(csPath.ReverseFind('\\'));<br />
<br />
}
"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 to all who responded. Problem solved!
Ron
|
|
|
|
|
:->
I need to Know how many number of disk devices and NIC cards are present in a system (through wmi classes).
how can i access this information.
Pradeep
|
|
|
|
|
Hi all
Will I am using GDI+ to manipulate images.
I am having this strange behaviour with Bitmap::Clone() function.
When I create a Clone from an Image object, and then try to LockBits for the cloned image, I get invalid pointer.
I did a workarround for this:
Bitmap* p_new_image = new Bitmap(p_src_image->GetWidth(),p_src_image->GetHeight(),p_src_image->GetPixlFormat());
Graphics* p_graphics = Graphics::FromImage(p_new_image);
p_graphics->DrawImage(p_src_image,0,0);
delete p_graphics;
will this code is working with LockBits very fine.
The documentation for the clone function is not clear, is this a bug in the Clone function, or I didnt understad the Clone function will?
Regards
Hesahm
Hesham
|
|
|
|
|
Hi guys,
i've implemented an manifest file to my app with following info:
---[cut here]---
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><br />
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"><br />
<assemblyIdentity<br />
version="1.0.0.0"<br />
processorArchitecture="X86"<br />
name="SETUP.EXE"<br />
type="win32"<br />
/><br />
<description>APPLICATIONNAME</description><br />
<dependency><br />
<dependentAssembly><br />
<assemblyIdentity<br />
type="win32"<br />
name="Microsoft.Windows.Common-Controls"<br />
version="6.0.0.0"<br />
processorArchitecture="X86"<br />
publicKeyToken="6595b64144ccf1df"<br />
language="*"<br />
/><br />
</dependentAssembly><br />
</dependency><br />
</assembly>
Since then, my listview doesn't accept item background colours i apply using:
if(lplvcd->nmcd.lItemlParam==1){
lplvcd->clrText = RGB(0,0,0);<br />
lplvcd->clrTextBk = RGB(240,240,255);<br />
}<br />
When i remove manifest, all looks okay, but when i apply it again - colours are missing.
Any idea ?
Regards,Paul.
|
|
|
|
|
I have both VC++ 6.0 and VC++ 7.1, and I notice that my 7.1 version has icons for source control that indicates when a file is locked by another user VS locked by the current user.
Where as VC++ 6.0 only has an icon showing it's locked.
See following screen shot:
http://code.axter.com/SCC_for_vc71_and_vc60.JPG
I'm developing an SCC AddOn for VC++, and I want to know if there is any way of adding the blue lock icon to VC++ 6.0, and if so, how.
I tried using Spy++ to find the tree window handle, but didn't have much luck.
I appreciate any leads to help solve this.
Thanks
Top ten member of C++ Expert Exchange.
http://www.experts-exchange.com/Cplusplus
|
|
|
|
|
ompiling...
MP3PLAYERDlg.cpp
Linking...
MP3PLAYERDlg.obj : error LNK2001: unresolved external symbol "public: class CBasePin * __thiscall CAsyncReader::GetPin(int)" (?GetPin@CAsyncReader@@QAEPAVCBasePin@@H@Z)
MP3PLAYERDlg.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CAsyncReader::GetPinCount(void)" (?GetPinCount@CAsyncReader@@UAEHXZ)
MP3PLAYERDlg.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __stdcall CBaseFilter::NonDelegatingRelease(void)" (?NonDelegatingRelease@CBaseFilter@@UAGKXZ)
MP3PLAYERDlg.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CAsyncReader::~CAsyncReader(void)" (??1CAsyncReader@@UAE@XZ)
MP3PLAYERDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall CAsyncReader::CAsyncReader(char *,struct IUnknown *,class CAsyncStream *,long *)" (??0CAsyncReader@@QAE@PADPAUIUnknown@@PAVCAsyncStream@@PAJ@Z)
strmbasd.lib(dllsetup.obj) : error LNK2001: unresolved external symbol "class CFactoryTemplate * g_Templates" (?g_Templates@@3PAVCFactoryTemplate@@A)
strmbasd.lib(dllentry.obj) : error LNK2001: unresolved external symbol "class CFactoryTemplate * g_Templates" (?g_Templates@@3PAVCFactoryTemplate@@A)
strmbasd.lib(dllsetup.obj) : error LNK2001: unresolved external symbol "int g_cTemplates" (?g_cTemplates@@3HA)
strmbasd.lib(dllentry.obj) : error LNK2001: unresolved external symbol "int g_cTemplates" (?g_cTemplates@@3HA)
Debug/MP3PLAYER.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.
MP3PLAYER.exe - 10 error(s), 0 warning(s)
these are the errors i have got when i tried to execute my project....i am doing a project to create an mp3 player
which reads the file bit by bit.....
i am beginneer...i know little about vc++.
so give me a detailed description....
included libraries are strmbasd.lib Vfw32.lib winmm.lib ....
i am using the memfile in directx8 to read data bit by bit..
please give me a solution... if any explanation needed please ask me...
sebin
|
|
|
|
|
sebinfrancis wrote:
these are the errors i have got when i tried to execute my project
wrong. these error happened when trying to link the compiled object files of your project.
sebinfrancis wrote:
so give me a detailed description....
select one error in the output window where you quoted this, and puch F1... msdn exist for that...
ok, now, what does the error say ?
let's take the first one :
MP3PLAYERDlg.obj :
error LNK2001:
unresolved external symbol "public: class CBasePin * __thiscall CAsyncReader::GetPin(int)"
the linker says that there is a call to the member function CAsyncReader::GetPin(int) into MP3PlayerDlg.obj (see the corresponding .cpp file), but it doesn't know such a function...
and all the errors you get are of this style...
so, did you well #include the headers ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|