|
To see the dependencies of your programs, use the Dependency Walker tool (depends.exe).
To get more info on merge modules and setups in general, try this site:www.installsite.org
Hope this helps
|
|
|
|
|
Hello Everyone,
I am creating a basic WebBrowser type of application.
One of our requirement is to allow drag-drop of images (placed in a layer)
withing the HTML page.
To intercept the dragging events , I overrided OnGetDropTarget() and
provided my own CCustromDropTarget (derived from IDropTarget) class's
object.
Doing so, i am able to receive all the dragging events occuring while user
is dragging image/text etc in the view.
However I am stuck with the following :
1) When the content dragged is an Image (CF_DIB), How do I extract HBITMAP
from the IDataObject passed to DragEnter()
2) Although the content dragged is an image, but thats the represantation of
a particular type of object used in our application.
hence when the image is dragged I want to transfer some more data in this
IDataObject than just the image. Lets say I want to pass actual IHTMLElement
which is being dragged. How Do I achieve that ?
My best guess for the 2nd question was to handle FilterDataObject() and
provide a new IDataObject which has the extra information required in our
application.
Unfortunately this function is never getting called. Can someone please
throw light on FilterDataObject() as well.
Best Regards,
Abhishek Narula
Abhishek Narula
|
|
|
|
|
HRESULT CHtmlCtrl::OnFilterDataObject(IDataObject * pDataObject, IDataObject ** ppDataObject)//filter all except CF_TEXT
{
COleDataObject OleDataObject;
OleDataObject.Attach(pDataObject,FALSE);
COleDataSource* pOleDataSource=new COleDataSource;
if(OleDataObject.IsDataAvailable(CF_TEXT)){
// Get text data from ColeDataObject.
HGLOBAL hGlobal=OleDataObject.GetGlobalData(CF_TEXT);
pOleDataSource->CacheGlobalData(CF_TEXT,hGlobal); }
REFIID riid=IID_IDataObject;
pOleDataSource->ExternalQueryInterface(&riid,(LPVOID*)ppDataObject);
OleDataObject.Detach();
return S_OK;
}
You may get more information if you find the clipboard containes data in CF_HTML or CF_DIB format.
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
First of all, thank you very much for replying to the post.
Let me re-iterate on the question,
In the Very first place, OnFilterDataObject is not getting called. (btw I am using CHTMLView)
Moreover the contents are in CF_DIB format (this i extracted from IDataObject passed in OnDragEnter()) Now my question is how to construct HBITMAP from the data available in CF_DIB format.
Thanks again,
Abhishek Narula
|
|
|
|
|
sorry, FilterDataObject seems only works for copy/paste
try this to prevent the DHTML DOM from handling drag events:
also check if other elements handle these events in scripts. you can either modify these attributes through source code or through DHTML DOM.
you also can override CView::OnDrop to handle dropped data, or CHTMLView::OnGetDropTarget to change the drag/drop behavairs.
for more information about DIB and DDB, check the "copy/paste an image" section of
[^]
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
how to Ensure my program works across platforms? namely, win98se and winxp?
i know one way to do is to simply test them across, but is there a better way?
i work on my program at home using winxp and go down to my office (with win 98se) once a week to test my work
since win98se is an older platform, the stuff i work on winxp might not always work on win98se
some stuff i know:
- when putting in new functions, check the function documentation to see if it works on the platform
- if function doesnt work, try a work around using other functions
does vc++6.0 SP6 have a "check across platform" function in it?
OR if not, is that a program/plugin (preferbly free because i am not paid for my work) that checks whether my code works on win98se and hopefully report the snippets of codes that doesnt work or the extra stuff that needs to be installed before it works? because i dont wanna go down to my office to find that whatever worked at home doesnt work in the office.
intead of doing tests on the exe file.......
i believe that the best way is to have a program that scans the source code for functions that dont work with win98 OR win95 (as specified by the programmer) and report them
is there a program that does this?
|
|
|
|
|
Check MSDN, for every API there is a table on which operating system it will work.
Don't try it, just do it!
|
|
|
|
|
Depending on how long you're working on the project, you could try:
Microsoft Virtual PC 2004 45-Day Free Trial Edition and install Win98 on a virtual machine.
I also thought of Windows Application Compatibility Toolkit, but it doesn't seem to support Win98. I'm wondering if there's an older version of it kicking around somewhere that does.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
dont u guys think that a program that checks the plain text source code (not the exe file) for compatibility is way overdued?
|
|
|
|
|
It's next to impossible to write one, except for trivial programs. I'm sure you'd agree that every non-trivial application uses the CRT or third party libraries, how'll you do source code analysis for those?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
It could be possible and useful; there are many static code analsys tools. In the least they could point out what functions are not supported on which platforms. Some behavior and interactions may not be able to be caught but something is better than nothing. I wouldn't use it as a replacement for testing however it could help to catch as you say "trivial" bugs without having to continously look every function you use up in MSDN or test every system only to recompile to test again.
Have you used Pre-Fast? Have you heard of Poly-Space Verifier?
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
How to print the file from visual c++ program via Dos-Prompt.I used System() command but it is not printed.How it is possible.Please help me.
Sunsen
|
|
|
|
|
TYPE filename >> LPT1 used to work, but I'm not sure whether it still does. The DOS support in Windows is minimal these days... Why not just open it in Visual Studio and print it? Ctrl-P still works...
"...putting all your eggs in one basket along with your bowling ball and gym clothes only gets you scrambled eggs and an extra laundry day... " - Jeffry J. Brickley
|
|
|
|
|
You may want to try calling SHFileOperation() (use the "print " action) from your console app. You'll need to link with shlwapi.lib (and possibly other libs).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
How to monitor the folder in the MFC.Suppose the new file is come to that folder ,it indicate the file name.Please Urgent .Help me
Sunsen
|
|
|
|
|
sunsen wrote:
How to monitor the folder in the MFC
This Api Will Help :- ReadDirectoryChangesW
Here is an Article, that might help you :-
http://www.codeproject.com/file/directorychangewatcher.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
|
|
|
|
|
There's also FindFirstChangeNotification() .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Okay, I don’t get it. Perhaps someone can help me out a little. I set up a client / server over Winsock no problems. But once a client receives the data from the server what’s the best way of storing that information for later use?
Here is an example of the type of data I'm receiving at the client end
WorkOrder | Date | SiteNumber | SiteContact | SitePhone | Device | Summary | Comments
00001 | 07/09/05 | 0001 | Joe | 111-111-1111 | 1 | Test | Test
00002 | 07/10/05 | 0001 | Jane | 111-111-1111 | 0 | Test2 | Test2
Etc
The number of rows is variable (depending on how many service calls exist). I started using a simple pointer to a struct. But that “feels” messy, is there a better way? I know there are several different types of single dimension arrays in C++, but I have yet to find a multi-dimensional array.
Any pointers anyone? Hope My post was clear. Thank you for you time and consideration.
-------------------------------
|
|
|
|
|
sfdougl wrote:
I started using a simple pointer to a struct. But that “feels” messy, is there a better way?
Why are you going after OLD C method such like creating your own link list and other collection, when there are dozens of Collection classes available in market such as STL or MFC Collection classes, that are much more optimized and fast.
You just have to implement you structure in that collection classes!.
"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
|
|
|
|
|
ThatsAlok wrote:
Why are you going after OLD C method such like creating your own link list and other collection, when there are dozens of Collection classes available in market such as STL or MFC Collection classes, that are much more optimized and fast.
You just have to implement you structure in that collection classes!.
I knew I was doing something wrong. That’s why I stopped at a certain point and said wait a minute, there has to be a better way. Can you point me to something explaining structures in collection classes?
Thank you
-------------------------------
|
|
|
|
|
Look for the STL (Standard Template Library) collection classes. The vector class behaves like a dynamically expandable array, if you want linked list like behaviour, there is the list class and so on. Using those classes is very simple.
vector <YourStruct> v;
You can then use methods on v to add and remove elements from the collection.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Sorry if I'm being a little dense here but still not clear. I understand that Arrays, Vectors, Linked Lists are all good for housing data. The thing I need is multiple columns.
If I may be so bold to speculate but to do what I need would I create a class to wrap together the collections and access the data via member functions? Or is there a pre written object?
Your example was hidden.
So could I do something as simple as?
(Sorry pseudo code here, I'm not anywhere near my developing environment)
<br />
struct WORKORDER <br />
{<br />
int WorkOrder; <br />
CString Date;<br />
Cstring SiteNumber;<br />
Cstring SiteContact;<br />
...<br />
} <br />
<br />
vector <WORKORDER> v;<br />
Referencing the data members like so
Int iWo = V[0].WorkOrder
I'm not opposed to doing a little work. I just don’t want to do work that’s well incorrect. Thanks for the help.
-------------------------------
|
|
|
|
|
Yes, you're on the right track. A vector can be used as a collection of *anything*, even a collection of vectors etc. So yes, you could store a collection of instances of your structure, so you'd get the multi column array functionality you wanted.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Ah okay, so its no where near as complicated as I was thinking.
Man, You and everyone else who helped are life savers.
-------------------------------
|
|
|
|
|
Yes, that's it. You create a structure that contains all the fields for one 'worker' (so contains all the data for one 'row'). And then you can use the vector:
std::vector<WORKORED> YourVector;<br />
WORKORDER Data;<br />
YourVector.push_back(Data);<br />
Then, to retrieve one data of the vector:
WORKORDER Data = YourVector[0];
Then you can work with the structure.
|
|
|
|