|
Which control is behind the function of offering a selection of options usually when right-clicking on whatever? Like function Open, New, Copy, etc.
I do not mean menus. For example on the VC++ screen, if I right-click on a code line, I receive the list of selections "Cut, Copy, Paste, Insert File into Project, Open Document, List Members,...".
|
|
|
|
|
This can be done using the CMenu class (CMenu is not only for menus under your title bar). Check the TrackPopupMenu function for more details...
|
|
|
|
|
Thank you Cedric, this is just what I wanted; it works fine.
|
|
|
|
|
Hi all !
I was assigned a task which I don't think is possible to do.
What I was requested to achieve is basically the following:
To cause our existing MFC (Doc/view) application to become a COM EXE server !
Is it possible at all, or am I wasting my time. If it's not possible, what approach shall I take?
I used the information which appeared under the article :
Article ID :175190
Last Review:June 29, 2004
Title : How to add ATL support to an MFC EXE
Link : http://support.microsoft.com/default.aspx?scid=kb;EN-US;175190[^]
Outcome so far : NOT Successful, meaning, the registration is not failing, but the server cannot be found by a client application (class not registered !)
As far as I understand , the article 175190 discusses the option of
embedding an "local In-process COM server" into the application, not a "remote COM EXE server".
I tried everything I know, so far with no results..
Please help,
Rubi
|
|
|
|
|
I would not try to convert an existing project. More I would take the core functionality out of the existing MFC application and add it to a new COM Server project.
Doing this you can then call the new COM server routines rather than the existing routines from your application to see if it behaves as expected.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Found the bug which was causing this not to work,please go to for in depth info :
http://www.codeproject.com/script/comments/forums.asp?forumid=1648&exp=0&select=986387#xx986387xx
Rubi
effic
|
|
|
|
|
Does anyone have an example of how to make a simple opengl32.dll? I want to catch application usage of glBegin(). So my dll must intercept the normal opengl call, keep a counter of the number of glBegins, and then call the real opengl glBegin().
I tried API highjack, but this will not work if the application loads the opengl library dynamically at runtime using LoadLibrary.
Thanks,
Max
|
|
|
|
|
use the win32 disassembler, and check the box for 'break on api calls'.
int i = 2, x = 2;
int j = x + y;
sprintf("%d",j);
4.7388937 ???
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
I made an application to browse html pages off a website. Then they added a registration requirement to the site, i.e. you need to log in every time, and I haven't been able to access their pages since. I use CInternetSession::GetHttpConnection passing the host name and login information. Then I call CHttpConnection::OpenRequest, and CHttpFile::SendRequest and read from the resulting CHttpFile object. This allowed me to display html pages in the past, but now with the login I get a 0 byte file. I think the username and password just aren't getting through, but I don't get an "access denied" html page, just a 0 byte file. Any idea what's going on and what I should do? Thanks for any help!
The relevant code is :
CInternetSession session;
CHttpFile* file = NULL;
CHttpConnection* hc = session.GetHttpConnection(Host,80,Uname,Pword);
file = hc->OpenRequest(NULL, urls[iterate], "", 1, NULL, NULL, INTERNET_FLAG_EXISTING_CONNECT );
file->SendRequest( "", 0, NULL, 0 );
|
|
|
|
|
HI,
I want to store a value in a variable
Value is 10** - 17
wt type of a variable is require.
how i will write the statement.
thanx
Regards.
|
|
|
|
|
zahid_ash wrote:
Value is 10** - 17
CString czVar = _T("10** - 17");
Urhmm
What is : 10** - 17 ?
Your question is a little too cryptic for me maybe.
I Dream of Absolute Zero
|
|
|
|
|
Hi,
I am cmpiling a project that is developed in Visual C++ 6.0 with SP5 on Windows 2000(SP4)
I am compiling in Visual C++ 6.0 without any service pack on Windows XP and it is giving me error
c:\program files\microsoft visual stu:(dio\vc98\include\unknwn.h(343) : error C2143: syntax error : missing ',' before '*'
c:\program files\microsoft visual studio\vc98\include\unknwn.h(343) : error C2259: 'IUnknown' : cannot instantiate abstract class due to following members:
c:\program files\microsoft visual studio\vc98\include\unknwn.h(106) : see declaration of 'IUnknown'
c:\program files\microsoft visual studio\vc98\include\unknwn.h(343) : warning C4259: 'long __stdcall IUnknown::QueryInterface(const struct _GUID &,void ** )' : pure virtual function was not defined
c:\program files\microsoft visual studio\vc98\include\unknwn.h(109) : see declaration of 'QueryInterface'
c:\program files\microsoft visual studio\vc98\include\unknwn.h(343) : warning C4259: 'unsigned long __stdcall IUnknown::AddRef(void)' : pure virtual function was not defined
c:\program files\microsoft visual studio\vc98\include\unknwn.h(113) : see declaration of 'AddRef'
c:\program files\microsoft visual studio\vc98\include\unknwn.h(343) : warning C4259: 'unsigned long __stdcall IUnknown::Release(void)' : pure virtual function was not defined
c:\program files\microsoft visual studio\vc98\include\unknwn.h(115) : see declaration of 'Release'
c:\program files\microsoft visual studio\vc98\include\unknwn.h(343) : error C2059: syntax error : '*'
I think unknwn.h is internal file of Visual studio.
I searched on microsoft site and list of bugs removed in SP5 donot include errors listed above.
Can anyone please tell the reason ?
Any suggestion will be appreciated
Rits
|
|
|
|
|
Rits Kwatra wrote:
I searched on microsoft site and list of bugs removed in SP5 donot include errors listed above.
Yes, but any SP updates may indirectly fix your problem. Personally I would not develop any VC6 application without first updating to SP5 as it has solved a few issues I'd had before.
So do not underestimate the impact that a Service Pack can have. Also, since you are porting to XP, you should download and install the latest Windows SDK. I have the Feb 2003 install. The one that came with VS6 is just way out of date!.
I Dream of Absolute Zero
|
|
|
|
|
I reinstalled the visual studio and now it is working fine. May be some files was corrupted
Rits
|
|
|
|
|
Hello everyone, i'm looking for good region clipping algorithms, like you can see for example in XARA. Where can i find good sources of such algorithms? I worked with CombineRgn - this was not what i looked for, it clips regions with load of rectangular things. And what will happen if i clip the ragion like E with region like O. Really i have to get more than 3 different regions - so, i hope you'll understand me
Thanks...
|
|
|
|
|
Have a look at gpc (General Polygon Clipper)[^]. It should do exactly what you need (and probably more)
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Thank YOU very MUCH!!!! You saved my life
|
|
|
|
|
Friends,
In this era of .NET we frequntly hear the term Common Language Runtime. The term "runtime" was also heard before but not as frequently used these days.
My question is that What is Runtime? Consider the following C++ code:
#include <iostream>
void main(void)
{
std::cout << "Hello World";
}
The C++ compiler will generate the exe which contains the machine code of the above code. So why we need runtime ?
Imtiaz
|
|
|
|
|
Hi Imitaiz,
That's right. when we have the machine code of the C++ code, we can run it on another machine provided we have the C coompiler for that. But we cannot the code of C in another language and here comes the role of the RunTime
According to my Knowledge, when we talk about runtime then it means we are not talking about the machine code but we are talking about the intermediate code of the program. and this intermediate code is then run by the runtime. Runtime can include other features like in .net we can combine different programs written in different language under one RunTime.
Rits
|
|
|
|
|
Hello!
I'm new here and would like to download code samples from here. But I'm afraid that my computer op could be damaged. How safe are the samples?
Thnx in advance!
|
|
|
|
|
There have been a couple of instances where code has contained a virus (I think it was two articles by the same author). Those pieces of code have been removed, and I don't expect there are any problems any more. If you have any doubt, check the code first. I don't have any concerns with the code I download from here, but I rarely use it without looking at the code first, simply so I know what I expect it to do.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hello,
I'm creating an ActiveX control that consists of various standard MFC controls laid out on a CTabCtrl. I want to enforce a minimum size for the ActiveX control but I can't figure out how to do it. I can force a minimum size for the CTabCtrl, but this of course doesn't restrict the size of the ActiveX object.
Any help would be greatly appreciated.
BTW: If my question demonstrates a fundamental lack of knowledge, be so kind as to point me in the right direction so I may fill the void.
Thanks!
Ian
|
|
|
|
|
hi, i'm looking for sample codes in c/c++ to compute multiplicative inverse in finite field (i'm interested in GF(2^8)) using extended euclidean algorithm. anybody can help me on this? or anybody can give some advice on designing the code?
|
|
|
|
|
How does one create a directory using CreateDirectory() with permissions of the parent directory ?
This is knowing that the parent directory can be access by all users who login to the system (computer).
Thanks in advance
Tony Teveris
|
|
|
|
|
MSDN says for CreateDirectory()
If lpSecurityAttributes is NULL, the directory gets a default security descriptor. The ACLs in the default security descriptor for a directory are inherited from its parent directory.
So if you pass NULL in for the lpSecurityAttributes parameter, does that work? What permissions does the created directory have when you create it, if they aren't those of the parent?
|
|
|
|