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
Abhishek Narula
Posts
-
CHtmlView Question -
CHtmlView QuestionHello 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
-
Its about duplicate ID given to controlsIs there a limit to these IDs ? except for the range of UINT, is there any reserver range or something ?? why does Resource.h has got various IDS starting from different values. what is the significance of these ranges !! Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
Its about duplicate ID given to controlsI want to understand that if we give a same ID to a CWnd derive window while creating it, Would it be erronous. If yes then how ? Also I want to understand let me frame my question with an example I create a EditBox whose parent is my view class lets say the id of this editbox is 1001. Now I create a Modeless Dialog which has also got a EditBox with the same ID that is 1001. So are these two CWnd going to clash in some way or the other ? Please throw some light on this. Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
Serializing a CBitmapI want to Serialize a CBitmap Varable with some other information. How Do I Searialize this CBitmap. Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
Returning a refrence from a functionWonderfull Idea !! thanks .. please tell me more about throwing exceptions also .. Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
Returning a refrence from a functionHmm that seems a better idea .. please throw some light on thoring exceptions also .. Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
Returning a refrence from a functionHi there , I have a class lets say CMyClass, it contains a member variable of type CArray of lets say int. Now I have a public function of this Class GetValue(int nIndex) now this function returns the Reference of int which is actually a reference to a particular index of my CArray type member variable. Now here is the problem .. My GetValue function performs some checks before returning the Refrence . now in case the checks fails I dont want to return the reference .. in that case WHAT DO I RETUNR FROM MY CODE. does any body understand what I am trying to ask ? Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
COleDataSource::DoDragDrop is returning DROPEFFECT_NONEI have Create a Flat tab control Lets say CFTabCtrl , Basically a Class derived from CWnd. I have also implemented Drag drop of these tabs now here is the problem, When My MFC app has got the complete source of this CFTabCtrl, that is this class is compiled with the project, it works fine.( i m refering to COleDataSource::DoDragDrop()) On the second hand I have created another project And Created a Lib file for this CFTabCtrl, and now in my MFC app I am using this CFTabCtrl by including the lib file and ofcourse the header file of the class. Now the whole code is working fine except for that this COleDataSource::DoDragDrop() returns DROPEFFECT_NONE immdiately .. does any one have any clue what must have went wrong ? Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
Registry OperationsOh I am Sorry .. I didnt read the question correctly . RegEnumKey is the right answer. Infact enumerate the following key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall you ll get the list of all Uninstable Softwares Hope that serves Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
Registry OperationsUse Instalshield .. it ll do all these kinds of job , with a predefine standard interface. Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
Multiple View ApplicationNo you didnt get the problem , I have to have 4 views opened simultaneously , in a different windows. but all 4 view are supposed to be connected to same Doc class . Am I able to explain it now ? Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
Multiple View ApplicationThe problem given to me is to build a MFC app , which should have multiple child windows same as in a typical MDI , but all the views should be connected to single instance of Document class, Something you can give a name Multiple Views Application, that is one document and multiple views. I am not suppose to use splitters where in I can create multiple views in CFrameWnd::OnCreateClien(). Does some one has a clue about how to go about >? Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
Closing a application grace fully created by Createprocess()Our Purpose is to Launch an application , once launched and when closed by the user it performs the task that we want that application to. but if Terminate that application by TerminateProcess() , since its a abnormal closing , it does not perform what it should perform on a Gracefull exit. Now what I was thinking of is , If we could some how get HWND of this Process which we have created by CreateProcess() , then we could send WM_QUIT to this Hwnd , which would then do the task Grace fully, see what I am saying . Now problem is how to get this Damn HWND .. :( Help !! Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
Generating Control IDNo there would be so many other things like so many input dialogs etc .. Can also explain what is WM_USER constant ? and can we some how use this ? Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
Generating Control IDWhat is the definition of some value ?? can I start with any arbitrary value ?? Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
Generating Control IDI ll be having a array of controls all of whose parent is same . now since these controls are created at runtime I cannot assign a Id to it at programing time. How do I generate a uniqe Id each time I create a new CWnd derive control ? I wish I could rate Gurus the way its on Codeguru . in any case any help would be appreciated. Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
How do I write a vertical textThanks .. I have not tried it as yet . but I think this would surely serve the purpose. Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
How do I write a vertical textThats the Irony .. I cant show you that .. look at the following URL , you ll understand .. http://www.codeproject.com/staticctrl/rotated\_bevel.asp Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
How do I write a vertical textThanks but this would not serve the purpose ! See Lets say I want to write ABC vertically .. according to your solution output would be A B C but what I want is thought all the characters would be appearing in different lines but give 90 degree clockwise shift to them , as if you are reading the screen from left edge . did you get this ?? Abhishek Narula "Learn to appreciate others ... World would appreciate you"