|
HI Amruta,
Download this demo application from Microsoft,it's explain every thing about loading and displaying Images
LOADPIC.exe[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi,
Thanks Alok it's working.
Whether it is possible to stretch and compress such an image(means created using IPicture Interface) using StretchBlt function or I've to use any other functio?
|
|
|
|
|
amrutajoshi wrote:
using StretchBlt function or I've to use any other functio?
yes it's possible,look for IPicture::get_Handle Method
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
You should find happiness here. Good luck!
|
|
|
|
|
I want to do some processing in a BHO on the submit event. For this, I want to attach my own C++ function using put_onsubmit of the IHTMLFormElement. My problem is as to how do I create a IDispatch interface for this specific requirement (event handler for Submit button on a form). Lastly, I also want to know as to how I can manage multiple event handlers, if there are multiple forms on a page, which would have one or more submit buttons. Basically, I want to attach my event handlers at each of the Submit buttons. Later (when form is submitted), I would like to know which one has been called.
Thanks a lot for your concern.
Jitendra Loyal
|
|
|
|
|
How can i transfer same format?
i send file on network but on client side not recieved same format.
i used Myobj class
[Serializable]
public class MyObject
{
public int size;
public byte[] buffer=null;
public string str="hello string";
public MyObject()
{
}
Server send data on network as
public void senddata(string fname)
{
MyObject obj=new MyObject();
//Create a file stream from an existing file.
FileInfo fi=new FileInfo(fname);
FileStream fs=fi.OpenRead();
//Read 100 bytes into an array from the specified file.
// int nBytes;
byte[] ByteArray=new byte[(int)fs.Length];
obj.size=(int)fs.Length;
obj.buffer=ByteArray;
IFormatter formatter = new BinaryFormatter();
formatter.Serialize(st.BaseStream, obj);
st.BaseStream.Flush();
}
& on client side receieved data as
public void receivedata()
{
MyObject obj=new MyObject();
IFormatter formatter = new BinaryFormatter();
obj =(MyObject)formatter.Deserialize(at.BaseStream);
Encoding ascii = Encoding.ASCII;
Encoding unicode = Encoding.Unicode;
byte[] ByteArray=new byte[obj.size];
byte[] asciiBytes = Encoding.Convert(ascii, unicode, obj.buffer);
// at.BaseStream.Read(ByteArray, 0, 11);
FileStream fs1=File.Create("c:\\clock1.avi");
fs1.Write(obj.buffer,0,obj.size);
fs1.Close();
ptr(obj.size.ToString());
ptr(obj.str);
}
kindly tell default encoding technique or any other solution
from which we receieve same format on server & client side
Rashaida
Rashaida
|
|
|
|
|
Hi friends,
Why new operator needs to know size of the user defined data types like class in C++
Vikram S
|
|
|
|
|
new operator has to allocate memory based on data type.
|
|
|
|
|
Okey..But Why it must know data type and also it's size? Can it just allocate memory run time?
|
|
|
|
|
vikrams wrote:
Can it just allocate memory run time?
I don't know why you want to use operator new, but I (and most other people) use it to allocate memody at runtime...
Blog[^]
|
|
|
|
|
Picture this: you have to allocate an object. What is the first question that you ask yourself? In most cases it will be: how much? In all the other cases that will be the second question.
Just remember that if you allocate an object, you have to allocate a certain amount of storage. If you don't know the amount of storage, you can never do a proper allocation..
Hope this helps
Blog[^]
|
|
|
|
|
if you overload the operator new for a class of your own, you know the type and the size of the class (with sizeof() ).
however, the operator need to know how much memory it has to allocate because it doesn't necessarily allocate space for only one object...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
1.How to get Audio & Video Stream data using Directshow?
2.How to send,replay this data on network?
shumyla
|
|
|
|
|
you can use sockets to send the data using a network. But you should have a "server" and "client" to do this.
Geert
Want to spread the newest version of your software automatically? Use Updater!
Visit my website: http://geert.yoki.org
|
|
|
|
|
Once VC++.Net code has been compiled, how difficult is it to convert the compild code back to the source code? Are there any simple tricks to make this more difficult? There were a couple of suggestions in earlier posts to this Message Board suggesting the use of a checksum of the preprocessed code or placing some code in #IFDEF preprocessor statements. Does anyone have simple examples of these techniques?
Any thoughts would be appreciated.
Regards
Jeremy
|
|
|
|
|
Hi everybody, i need help. I am working with toolBars and i dont know how i can set the text of the buttons in the toolBar. If any body can help me i will be gratefull.
|
|
|
|
|
neliocc wrote:
i dont know how i can set the text of the buttons in the toolBar
SetWindowText(HANDLE_OF_BUTTON, BUTTON_TEXT);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I cant get the handle of a button in a toolBar, thats the problem.
|
|
|
|
|
m_wndToolBar.SetButtonText(0,"this text");
m_wndToolBar.GetToolBarCtrl().SetButtonSize(CSize(22,36));
Just set the button size CSize(22,36) to values which suit you.
this is this.
|
|
|
|
|
Yes but i am working with win32 API and i can not do that.
|
|
|
|
|
Send a TB_SETBUTTONINFO message to the toolbar.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
neliocc wrote:
i am working with win32 API
Then Look for TB_SETBUTTONINFO and TB_SETBUTTONWIDTH messages
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
hi,
We are doing a project on Live video conferencing in LAN.File is recoreded on a single PC but the actual thing must do is to send the data on a network.I m using directshow for this in which "IMediaControl Interface" is used for run and stop the file to record.But i need the actual data(streams).The question is:
1.How to get Audio & Video Stream data using Directshow?
2.How to send,replay this data on network?
plz reply me soon.
best regards
shumyla
|
|
|
|
|
I do this over and over and I can't figure out how to make this function into a template.
void CleanUpVector()
{
std::vector<Music_Item*>::iterator iter;
for (iter = vMusic.begin(); iter != vMusic.end(); ++iter)
{
delete *iter;
}
vMusic.clear();
}
struct TAG
{
string TrackNumber;
string Title;
string Artist;
string Genre;
string Year;
string Comment;
string Album;
string PersistsAs;
};
struct Music_Item
{
HSTREAM Stream;
TAG Tag;
};
Any ideas anyone? I can't figure this out.
|
|
|
|
|
You really don't want to be doing this - it's asking for trouble. You'd be much better using something like boost::shared_ptr in the vector rather than raw pointers - then, if required you can pass custom deleters into the function.
Below is an example of a template function which does what you requested. Depending on usage the call to clear() may be redundant, or may not do what you expected.
template<class T>
void cleaner(std::vector<T>& v)
{
typedef typename std::vector<T>::iterator iter;
iter cur(v.begin());
iter end(v.end());
for(; cur != end; ++cur)
{
delete (*cur);
}
v.clear();
}
EDIT: fixed typo
|
|
|
|