|
Ok First I ll explain how it can be done Manually.
Just copy the Ocx file in the system or any directory.Then go to that directory via Command prompt.Then type the command
c:>Regsvr32 MSFlxgrid.OCX
Then ur ocx file will get registerd in the system...Its simple..
If ur using Visula install shield then Put this Ocx file and make them selfRegisted in option. Thats all
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
Thanks for all the wonderful responses .. This is all the information I needed!
|
|
|
|
|
Hi!,
I need to implement a drag and drop feature to the application I'm working on, but my employer wants it to be non OLE as OLE would... blah blah... I explored the way of receiving files using WM_DROPFILES, but how about sending them without OLE? Yes, I have RTFM and the Clipboard section of CodeProject.com
Thanks in advance
|
|
|
|
|
There used to be an old "trick" before OLE was
widespread to achieve this..you basically need to fake
the WM_DROPFILES message yourself, using the following method:
(sorry, but any code I might have had to do this would
have been lost a long time ago
In your WM_MOUSEMOVE handler (or however you are doing
the dragging bit), make a routine that checks to see if
the window underneath the mouse has the WS_EX_ACCEPTFILES extended style set.
i.e.
<br />
POINT pt;<br />
HWND hwnd, hwndTop;<br />
<br />
pt.x = screen_mouse_x<br />
pt.y = screen_mouse_y<br />
<br />
hwnd = WindowFromPoint(pt);<br />
<br />
<br />
if(GetWindowLong(hwndTop, GWL_EXSTYLE) & WS_EX_ACCEPTFILES))<br />
return TRUE;<br />
else<br />
return FALSE;<br />
get the idea..? It's a good idea to only do this when the current window under the mouse has changed - no need to keep doing this same logic over-and-over..
Now you know if the window under the mouse accepts files - so, you can change your mouse-cursor to reflect this. When your release the mouse, reset the cursor, and send a fake
WM_DROPFILES to the top-level window:
You need to use two undocumented APIs to do this. These
APIs are called DragInitBlock and DragAppendFile, which you
use to create a structure used to pass to the WM_DROPFILES
call. I did a quick search on the net, and came up with this:
http://www.tec.puv.fi/~kimmos/News/031
Seems to be a pretty good example for how to do it, so I'd
take a look there..
James
http://www.catch22.uk.net
|
|
|
|
|
I added a new indicator panel to the status bar. I wanted to update it with the UI Update handler so I put the stuff in the message map and the afx_msg in the .h file of the mainframe. This created the panel but didnt update it with the SetText I did in the UI handler. I then put the exact same stuff into the view class instead and viola, the new panel gets updated etc.
Why does it work when handled in the view but not in the frame? I used pCmdUI_>SetText("new") in both handlers and it only worked when handled in the view.
Thanks,
ns
(I also found out about SetPaneText but thats not at issue here)
|
|
|
|
|
Hello,
I'm currently using VC++ 6.0's wizard function OnDblclk(NMHDR* pNMHDR, LRESULT* pResult), but how do I detect here if the ALT key is being held down? I cannot seem to find the right spot in my MDSN search to get this information. Thanks!
JennyP
|
|
|
|
|
see GetAsyncKeyState
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Thanks for the tip. I could not find the ALK key in the virtual key typedefs, but I did find VkKeyScanEx() through the MSDN links. That function seems to have a way to read the ALT key state.
JennyP
|
|
|
|
|
it's called VK_MENU (not VK_ALT)
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
I just read about this today, myself. Hail Petzold!
- Jason
(SonorkID 100.611)
In the beginning, teachers taught the 5 W's: who, what, where, when, why. Now it's just a big damn G
|
|
|
|
|
Oh, I didn't realize! Thanks!
JennyP
|
|
|
|
|
I use this class in an app to format strings.
But, when I exit the app in debug mode, I see the strings that I formatted as memory leaks. What should I do to remove these memory leaks?
now the code looks like this:
void function()
{
std::strstream ostr;
ostr << "This is a test" << std::ends;
// i use the ostr
// i assumed that the cleanup would happen when function quits
// but when i quit the app, I can see the "This is a test" in object dump
}
modified 29-Aug-18 21:01pm.
|
|
|
|
|
Don't use strstream it is outdated now. use stringstream
Step back, rub your eyes, take a deep breath, stretch a bit, and reflect on the relative importance of CP, CG, the age / travel time sustained by supposedly 'fresh' cheese curds, and Life in General. - Shog9
|
|
|
|
|
Call
ostr.freeze(false);
Todd Smith
|
|
|
|
|
I have created a regular dll which export the function
__declspec(dllexport) BOOL Extract(PCLTextList *pList);
A create and pass to the dll the pList pointer from a Dialog Based application . When I call delete PList from this app an ASSERTION FAILED Error appears at this function:
_CrtIsValidHeapPointer
Does anyone know why?
Plese help if you can
Thanks
Jancsi
xxx
|
|
|
|
|
Correct me if i am wrong:
someone creates a list object , sends it to your dll and you fail to delete that object.
If that so, then check whether your run-time library and the caller run-time library are the same.
For example, if your run-time library is Multithread Dll (/MD) and the caller run-time library is Multithread (/Mt).
Check what happens when the caller's project and your project have the same run-time library.
Dudi
|
|
|
|
|
Dudi Avramov wrote:
Correct me if i am wrong:
someone creates a list object , sends it to your dll and you fail to delete that object.
If that so, then check whether your run-time library and the caller run-time library are the same.
For example, if your run-time library is Multithread Dll (/MD) and the caller run-time library is Multithread (/Mt).
Check what happens when the caller's project and your project have the same run-time library.
Uh, oh - this works only if both the .dll and the .exe use the same DLL-Version of the CRT. It will fail if they are linked against the static version.
The reason is the following: The CRT contains a heap manager, which implements operators new and delete. If you link the CRT statically to a module (.exe or .dll) the heap manager is also linked to your module, meaning that each module contains its own heap manager. It is not possible to allocate memory from one heap manager and delete it with another one - they don't know of each other and the memory just looks invalid to them. And this is what happens in your project.
However, if both, the .dll and the .exe are linked to the same DLL-Version of CRT, they share the same heap manager (because the CRT DLL is loaded only once into the process' address space). Then all ressources (memory, open file handles, etc.) are interchangeable between the modules.
To avoid this messy details it is common and good practise to destroy resources always in the same module they have been allocated. Then the used CRT version does not matter and you are always on the safe side
--
Daniel Lohmann
http://www.losoft.de
|
|
|
|
|
I'm developing in MFC on Win2k. It does fine at work, but when I took it home to XP,it debug asserted immediately! I was disgusted and didnt even start debugging to see where it crashes. SoI am thinking of getting another 80Gig hard drive and dual booting with XP and Win2K. I did load another MFC project developed on Win2K onto the XP and that one did fine. ANy ideas?
Thanks,
ns
|
|
|
|
|
find out where and why the assertion occurs.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Okay. so I'll put a breakpoint first in the apps initinstance, then if it goes through okay, in the mainframes init then the chids init then the views init etc I guess - since i iamgine thats the flow of things....ANy sugggestions about the debugging (I'm still feeling my way through this - crashes are terrifying!)Thanks very much for the response,
ns
|
|
|
|
|
just run the app in the debugger and let it hit the assert. when it does, press Retry and see where you end up.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
I was just about to go buy a second HD to dual boot to win2K, anf thought I'd try "rebuild all" in a last desparate attempt. I almost fell out of my chair when it worked!
Whew!
Incidentally , doing retry on the assert just told me that VS was not happy, and did I want to send a report to MS. Then it went back to the place where I last left my cursor, so that gave me no hints as to the problem location...
Thank you so much though!
ns
|
|
|
|
|
ns wrote:
but when I took it home to XP,it debug asserted immediately! I was disgusted and didnt even start debugging to see where it crashes.
I'd like to be able to tell my boss that. "It doesn't work at all, I didn't even bother to start debugging"...
Best regards,
Alexandru Savescu
|
|
|
|
|
I'm studying in an Australian Education Center. They have Visual Studio .NET Enterprise Architect installed. I've heard a rumor about apps compiled with VS carrying a digital signature with the product ID of VS IDE. Is this true? So, if I use this copy to build an app, and try to sell it on the web, would I get into to trouble? Especially, since I don't own this copy?
Would I be off the hook, if I make it a freeware?
|
|
|
|
|
sounds like you should ask the AEC, or find out what their license says.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|