|
may be yes but i am looking for a photoshop type of application where you see a vertical toolblar on the left side. Same as MS Paint type toolbar. Thanks.
|
|
|
|
|
Hello,
I am making one network application which controls computers on LAN, it is for internet cafes,
i have problem how to get computers ip address on LAN?
anyone has some ideas?
thanks
|
|
|
|
|
You probably need a boadcast message which all the computers will respond to with some identifiable information. Fortunately someone already thought of that and invented both the ICMP protocol and Ping. I have no idea how they work but I reckon you should start with these to find out how to do it.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Matthew Faithfull wrote: Fortunately someone already thought of that and invented both the ICMP protocol and Ping.
Which can be easily ignored by machines, resulting in false negatives.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Gofur Halmuratov wrote: anyone has some ideas?
NetServerEnum() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I have Memory DC on which image is present. Using StretchBlt() i used to display the image.
While Zooming out the image i used to minus some value(X) the source recangle Left and Top and plus the same value(X) from right and Bottom of source rectangle.
Now, Is there any problem if i access the -ve coordinate from memory DC??
Please give u'r comments.
Hi this is SHivraj
|
|
|
|
|
shivrajbhosale wrote: Now, Is there any problem if i access the -ve coordinate from memory DC??
I don't know what that means but the image in your memory DC did not change by bliting it to the screen in different ways.
|
|
|
|
|
Do you have any problem about coordinate ?
|
|
|
|
|
The sin of the Y-Coordinate depends on which MAP_MODE you use.
Take a look to
CDC::SetMapMode
virtual int SetMapMode( int nMapMode );
in the help.
There is a explanation about coordinates and how are they used.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Hello everybody,
having a DlgItem, for example a a CEdit oder or a CStatic, on a CDialog the CDialog periodically receives WM_MOUSEMOVE messages when the mouse is over the DlgItem without any movement. The coordinates, as expected, don't change.
Does anybody have an explanation for this behaviour?
Thanks in advance
MS
|
|
|
|
|
I expect either windows shoves one at you every now and then, or the mouse driver may be more sensitive than needed.
Just a quick thought... If you have the mouse set up one way, slow movements of the mouse are VERY slow movements of the cursor, and fast movements VERY fast - so just a teeny shifting (esp of an optical mouse) may be enough to get the driver to say "I've moved", but not enough to move a pixel.
Do you get them when you unplug the mouse?
And do you care? You should be able to cope with the user moving the mouse anyway.
Iain.
|
|
|
|
|
Iain Clarke wrote: I expect either windows shoves one at you every now and then, or the mouse driver may be more sensitive than needed.
That was my first thought too. But when the mouse rests moveless over the dialog client area beside a DlgItem, no WM_MOUSEMOVE messages occur.
Iain Clarke wrote: And do you care? You should be able to cope with the user moving the mouse anyway.
Since the coordinates don' t change, I can easily filter the wrong messages by comparing the actual coordinates with the last, so it is no problem. But I would be keen to know the reason.
MS
|
|
|
|
|
|
Hello,
I have a combobox on my dialog and the dialog is created without resources.
Now I want to decide the width of the combo box depending upon the number characters that would appeaar in any combo box.
If I decide according to the font size of the combo box then for some sizes the size of the combo box is right but for others it is not.
I have done the following
width of combo box = num characters* size of font;
Please help.
Prithaa
|
|
|
|
|
Do you need to MoveWindow?
|
|
|
|
|
Hello,
Thanks for you reply.
No I don't need a MoveWindow .
I want to decide the width of the combo box before displaying it or creating it.
How should I decide the width of the combo box depending upon the number of characters that are going to be in it?
Prithaa
|
|
|
|
|
prithaa wrote: No I don't need a MoveWindow .
If you are against changing the physical width of the control, then you'll have to provide scrolling capability via CComboBox::SetHorizontalExtent() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
You have a couple of stages to follow then.
1/ How wide is the longest string. You can use GetTextExtent for that. (and GetDC / ReleaseDC / SelectFont etc).
2/ The use that as the width parameter for CreateWindow.
2a/ If you are making a dialog template in memory, rather than with CreateWindow, then you'll have to translate the width into Dialog Units.
Read http://blogs.msdn.com/oldnewthing/archive/2004/06/17/158175.aspx[^] and later articles for a good lesson in how memory constructed dialogs work, dialog units, etc.
Iain.
|
|
|
|
|
Hello,
Thanks for the replies.
I tried SetHorizontalExtent() but there is no change on the dialog.
Can there be some way where I cn properly decide width of according to fontsize and number of characters ?
Prithaa
|
|
|
|
|
prithaa wrote: I tried SetHorizontalExtent()...
Using what argument? What was the control's horizontal extent before you changed it? Did you ensure that the listbox had the WS_HSCROLL style?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello,
Yes, it worked.I can see the horizontal scroll bar and it can move.
But can I give a width beforehand depending on the number of characters and font size so that I don't have to use SetHorizontalExtent() .
Thanks,
Prithaa
|
|
|
|
|
prithaa wrote: But can I give a width beforehand...
Before what?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Can you give some real font example that is not performing as expected?
I think there is a difference in measuring different types of fonts.
|
|
|
|
|
Hi,
Am getting data from the serialport, when i call MComm->Getinput function to get the data from serial port, the data is stored in Variant type of data(result).I want to store this data in a safearray how to do that.
VARIANT CMSComm::GetInput()
{
VARIANT result;
InvokeHelper(0x1a, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL);
unsigned int i;
HRESULT hresult;
VARIANT var;
SAFEARRAY * psa;
SAFEARRAYBOUND rgsabound[1];
VARIANT *pData;
rgsabound[0].lLbound = 0;
rgsabound[0].cElements = 10;
psa = SafeArrayCreate(VT_BSTR, 1, rgsabound);
var.vt=VT_ARRAY|VT_BSTR;
SafeArrayAccessData(psa, (void HUGEP**)&pData);
pData= result; // error:am not able to assign like this
var.parray=psa;
return var;
}
Thnaks
|
|
|
|
|
I'm no COM expert, but isn't there a way to get the Variant to collapse to a BSTR? Then store that in your array.
Just split the problem in two, and you have solvable bits.
Iain.
|
|
|
|