|
Hi all,
How to resize/place the activeX control in a container window, By default the
activeX control is resized to Full window size in which it is hosting how i can avoid that.
Thanks in Advance,
Abhishake
|
|
|
|
|
Why is iostream.h & fstream.h missing from VC++.NET include folders.
If I copy the same files from VC6.0 then I get errors in those files.
What can I do, where can I get those header files and if not what headers can I use instead of fstream.h
We have a mathematician, a different kind of mathematician, and a statistician!
|
|
|
|
|
try to include instead :
#include <iostream>
#include <fstream>
TOXCCT >>> GEII power
|
|
|
|
|
"iostream.h" and "fstream.h" are not part of C++. Look at "iostream" and "fstream" and then the 'std::' scope.
#include <iostream>
#include <iomanip>
#include <fstream>
void SomeFuncToReadFile ( const char * sFile )
{
std::ifstream in ( s ) ;
if ( !in )
{
std::cerr << "Couldn't open input file : " << s << std::endl ;
return ;
}
in.unsetf(std::ios::skipws) ;
}
Paul
|
|
|
|
|
I currently do:
_stscanf(string, L"%x", &number);
it doesn't seem like any of the atoi/l functions can handle hexa-decimal input,
any suggestions for something cleaner, or is as clean as it gets ?
|
|
|
|
|
do this :
<font style="color:blue;">char</font> str[2]; <font style="color:green;">
<font style="color:blue;">unsigned char</font> ucConvertedNumber,
MSB, <font style="color:green;">
LSB; <font style="color:green;">
LSB = ((str[1] >= <font style="color:purple;">'0'</font>) && (str[1] <= <font style="color:purple;">'9'</font>)) ? str[1] - <font style="color:purple;">'0' </font>:
((str[1] >= <font style="color:purple;">'a'</font>) && (str[1] <= <font style="color:purple;">'f'</font>)) ? str[1] - <font style="color:purple;">'a' </font>+ 10 :
((str[1] >= <font style="color:purple;">'A'</font>) && (str[1] <= <font style="color:purple;">'F'</font>)) ? str[1] - <font style="color:purple;">'A' </font>+ 10 : -1; <font style="color:green;">
<font style="color:green;">
MSB = ((str[0] >= <font style="color:purple;">'0'</font>) && (str[0] <= <font style="color:purple;">'9'</font>)) ? str[0] - <font style="color:purple;">'0' </font>:
((str[0] >= <font style="color:purple;">'a'</font>) && (str[0] <= <font style="color:purple;">'f'</font>)) ? str[0] - <font style="color:purple;">'a' </font>+ 10 :
((str[0] >= <font style="color:purple;">'A'</font>) && (str[0] <= <font style="color:purple;">'F'</font>)) ? str[0] - <font style="color:purple;">'A' </font>+ 10 : -1; <font style="color:green;">
<font style="color:green;">
MSB = MSB << 4;
ucConvertedNumber = MSB | LSB;
you've got it...
you can nox do :
printf(<font style="color:purple;">"Decimal form :%d\n"
"Hexadecimal form :%x\n"</font>,
ucConvertedNumber,
ucConvertedNumber);
TOXCCT >>> GEII power
|
|
|
|
|
long strtol( const char *nptr, char **endptr, int base );
acString
strtol(acString, NULL, 16);
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
this is the function i was looking for
|
|
|
|
|
ok for a function, but understand what it does because it isn't a standard function...
TOXCCT >>> GEII power
|
|
|
|
|
Nice joke.
God is Real, unless declared Integer.
|
|
|
|
|
ok, i was thinking of another.
just verified.
TOXCCT >>> GEII power
|
|
|
|
|
hi ppl,
I am creating a Client server application using Asyncsockets using MFC.
my application is running well on the local server.
but the problem starts when it's client side is used on other computers on lan
Like
for the first time the client connects to the server every thing goes on smoothly but when the connection closes from the client side the server closes all the connection but on the client side the connection goes to the FIN_WAIT2 and reamins there and no message can be sent from there on so the application halts.
I donn know what to do help me?
|
|
|
|
|
ok i think i also faced similar situation when i encounter this problem.
the solution is that you override the function OnClose()
of AsyncSocket of MFC
and In OnClose()
close the socket connectiong socket ok
i think it work
Alok Gupta
visit me at http://alok.stormpages.com
|
|
|
|
|
hi alok,
thanks a lot for ur reply,
but eventually i figured out my problem was not related with opening or closing but what i am using is ASyncSockets which are by default NON blocking sockets as a results the connection closes automatically if there is no buffer recieved so i used CSocket class ie a Blocking Socket class as a result untill unless the Buffer is recieved the connection is alive.
thanks a lot again
|
|
|
|
|
This function can be founded in tools menu in VC 6.0, however, I cann't get any idea in VC.net. Thanks.
|
|
|
|
|
I only have Visual Studio .NET 2002 installed.
The similar one is "Object Browser" (Ctrl - Alt - J) found in Visual Studio .NET 2002.
Maxwell Chen
|
|
|
|
|
yes, I have found it. And how can we use the functions such as Call Graph or Caller Graph in Source Browser. Thanks.
|
|
|
|
|
I dunno. Even the "Browse Information" fails!
Maxwell Chen
|
|
|
|
|
Sir,
I am integrating flash with VC++.
I am using Dialog Based App.
I inserted this Active X Control.
I wanted to show both this Control and Dialog Window in a maximized state.
I called ShowWindow(SW_MAXIMIZED) in OnInitDialog.
When I execute the App I get the main window in maximized but the control in that is not at all maximized.
Pls help.
Regards
Chintu
|
|
|
|
|
You'll have to move yourself the control at the size and position you want based on the client coordinates of the parent window.
Take a look at MoveWindow in the MSDN.
|
|
|
|
|
Hi all,
I have my class that Inherites from CTreeCtrl.
I override OnPain() and i draw the items myself.
next to each item i am trying to draw an image
i use the following code:
m_imageOptions.Create(IMAGE_DIMENTIONS,
IMAGE_DIMENTIONS,
ILC_COLOR24 | ILC_MASK,
MAX_OPTIONS_NUM,
0);
hBmp = pDlgInf->GetBmp();
CBitmap bmp;
if (NULL != hBmp)
{
bmp.Attach(hBmp);
iImage = m_imageOptions.Add(&bmp,TRANSPARENT_CLR);
bmp.Detach();
::DeleteObject(hBmp);
}
CPoint pnt(rc.left + SPACE_WIDTH / 5,rcText.top);
m_imageOptions.Draw(pDC,iImage,pnt,ILD_TRANSPARENT);
BOOL CPrfTreeCtrl::OnEraseBkgnd(CDC* pDC)
{
return TRUE;
}
problem:
I manage to see the image next to the item, but if i drag my dialog (the tree
is placed over a dialog), outside of the screen boundaries and then drag it
back within the screen boundaries, the image is gone...other drawing of the tree (such as the items) are correct....
what am i doing wrong? can any1 help?
thanks in advanced
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hi,
Please help me.
I need to draw a list control that is placed on a diagram and it should be transparent.
|
|
|
|
|
You can display an image as the list control background using the following code:
LVBKIMAGE image;
memset(&image, 0, sizeof(image));
image.ulFlags = LVBKIF_STYLE_NORMAL|LVBKIF_SOURCE_URL;
image.pszImage = szFileName;
image.xOffsetPercent = 50;
image.yOffsetPercent = 50;
SendMessage(m_hListView, LVM_SETBKIMAGE, 0, (LPARAM)&image);
SendMessage(m_hListView, LVM_SETTEXTBKCOLOR, 0, CLR_NONE);
The Rob Blog
|
|
|
|
|
Thanks a lot,
It works perfectly.
|
|
|
|
|
Hi!
I'm trying to get a bitmap to rotate. I want the bitmap to rotate around its midpoint (or an abitrary point)
I first used the formula:
<br />
xNew = (x * cosTemp) - (y * sinTemp);<br />
yNew = (x * sinTemp) + (y * cosTemp);<br />
but this only rotated the bitmap around the upper-left corner, and therefore I changed to this:
<br />
xNew = ((x * cosTemp) - (y * sinTemp)) + xRotAxis;<br />
yNew = ((x * sinTemp) + (y * cosTemp)) + yRotAxis;<br />
now the image is rotating around the x-and yRotAxis, BUT at the upper-left corner of the surface and thus hiding 3/4:s of the picture!
How do I make it rotate around its center at the surfaces' center?
|
|
|
|