implement resizing code on "Kodak Image Edit ActiveX Control"???
-
Hi Experts, I want to make a mimic (graphic) editor in which images will be displayed dynamically on click of button, will be resized, moved and finally, they will be connected to database. For that purpose I want to use "Kodak image edit activex control" [WINNT,VC6.0] basically,I’ve to make a graphics editor in which when i press a specified button a picture should be displayed on the dialog.that picture will be associated with a variable in a table of a database. when the value of that variable changes in the database another picture is pasted on the previous picture.i-e a picture of engine is normal when variable is 1...but when the value is 0 the color of engine changes to red. note: -pictures are moveable and resizable. -there can be alot of pictures on the dialog at a time. -value in the database changes automatically through another program. i m using kodak Image Edit activeX control for this purpose..i add the control in the project and create it on runtime with the help of create function Up till now I am able to create the control dynamically with the required image displayed on it which can also be flipped on click event with the help of EventSink_Map. I can send u attachment as well. I want to know how the dynamically created control be made able to move and resize. any help how to do that? m i going in the right direction? bcz previously i was doing all this with the help of CBitmapButton.(information on how i did that available on demand if anyone interested) i also came to know that exactly the same problem is encountered to "asimatta" who sent the message on EXPERTS EXCHANGE website under the topic Languages\C++\ on 08/27/2003 with the title "ImageEdit activex control??" but i coudn't contact bcoz i m unable to buy points to send a message on Experts-Exchange.com i m really grateful to Codeproject.com for providing such a great service free!! plz help me !! Thanking u in anticipation Regards, nsaadyah Saadyah Nisar
-
Hi Experts, I want to make a mimic (graphic) editor in which images will be displayed dynamically on click of button, will be resized, moved and finally, they will be connected to database. For that purpose I want to use "Kodak image edit activex control" [WINNT,VC6.0] basically,I’ve to make a graphics editor in which when i press a specified button a picture should be displayed on the dialog.that picture will be associated with a variable in a table of a database. when the value of that variable changes in the database another picture is pasted on the previous picture.i-e a picture of engine is normal when variable is 1...but when the value is 0 the color of engine changes to red. note: -pictures are moveable and resizable. -there can be alot of pictures on the dialog at a time. -value in the database changes automatically through another program. i m using kodak Image Edit activeX control for this purpose..i add the control in the project and create it on runtime with the help of create function Up till now I am able to create the control dynamically with the required image displayed on it which can also be flipped on click event with the help of EventSink_Map. I can send u attachment as well. I want to know how the dynamically created control be made able to move and resize. any help how to do that? m i going in the right direction? bcz previously i was doing all this with the help of CBitmapButton.(information on how i did that available on demand if anyone interested) i also came to know that exactly the same problem is encountered to "asimatta" who sent the message on EXPERTS EXCHANGE website under the topic Languages\C++\ on 08/27/2003 with the title "ImageEdit activex control??" but i coudn't contact bcoz i m unable to buy points to send a message on Experts-Exchange.com i m really grateful to Codeproject.com for providing such a great service free!! plz help me !! Thanking u in anticipation Regards, nsaadyah Saadyah Nisar
im no expert but you might try adding a regular frame around it and then capture rightclicks and hold on the frame and test if its at the edge where someone would do the dragging and then calculate the change in distance when the person releases the mouse and resize your control accordingly also make sure the frame is also resized also. with a frame you can add things like a sunken or modal border wich also makes it nice to use so you could represent the border with something like a modal border to give the user a visual cue that the control is resizable this idea is probably the most basic and there could be other ways you could do this but thats my suggestion
-
im no expert but you might try adding a regular frame around it and then capture rightclicks and hold on the frame and test if its at the edge where someone would do the dragging and then calculate the change in distance when the person releases the mouse and resize your control accordingly also make sure the frame is also resized also. with a frame you can add things like a sunken or modal border wich also makes it nice to use so you could represent the border with something like a modal border to give the user a visual cue that the control is resizable this idea is probably the most basic and there could be other ways you could do this but thats my suggestion
first of all thanx a lot for a nice cooperation secondly, let me tell u that i m very new in vc++ i m getting ur point but i dont know how to implement! actually i have down loaded a resizing code for button, listbox and edit box from codeguru but the ques. is how to implement on dynamically created "kodak image edit" ?? regards. Saadyah Nisar
-
first of all thanx a lot for a nice cooperation secondly, let me tell u that i m very new in vc++ i m getting ur point but i dont know how to implement! actually i have down loaded a resizing code for button, listbox and edit box from codeguru but the ques. is how to implement on dynamically created "kodak image edit" ?? regards. Saadyah Nisar
well first off when dynamicly creating the kodak thing just do this frame->GetWindowRect(&rect); kodak->MoveWindow(&rect); that way you ensure the kodak is the the same size as the frame on creation you may want to adjust the size slightly its up to you you could either inherate the frame class and overload its OnLButtonClk message or just use your windows message and use GetCursorPos and just test if its within the frame window and around the permiter then on the OnMouseMove do some work while the user is trying to resize thier thing and then finaly do your resizing in OnLButtonUp also you can do this without the frame and just use the kodak thing where you would use the frame although i think the frame gives your control something easier to stick to also if you didnt know you can get your kodak control in functions were its not in scope by doing GetDlgItem(ID_KODAK) same with the frame control