|
write
"TypesSupported", // value name
AbidBhat
|
|
|
|
|
|
Hi
How To using office Word 2003/2007 in Manage C++
|
|
|
|
|
Try Managed C++/CLI forum.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi
I am using VS6
Using Win32 Application in VC++
at design time i insert some data in combobox when i run the same.....it is not displaying data .....
tell me how to do it
AbidBhat
|
|
|
|
|
abid wrote: it is not displaying data .....
How are you verifying this? Do you have the combobox's height set correctly?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
how to set the height of the combo box
AbidBhat
|
|
|
|
|
Using the resource editor. Since a combobox is two controls acting as one, the sizing for each is separated. Click the edit control to size it, and click the dropdown arrow to size the listbox control.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
At design, click over the down arrow of the combo, (the cursor turns in a double arrow), you will see that the bottom selection point of the combo it turns blue, then drag it down to the desire size. Yep, it's something tricky.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
but it only expand in size in run time............and does not display the data which i have inserted in it at design time
AbidBhat
|
|
|
|
|
Yes that's right.
And why you need your data in design time?
You can't do anything with your data at design time. It's just "Design".
What are you trying to do?
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
I am sending login credentials through ActiveX Control developed in VC++ 6.0 to Server side which is developed in Delphi
//Client side struct in VC++ 6.0
typedef struct
{
char User[41];
char Password[41];
char ClientVersion[41];
char EndCode[2];
}TNetConnectCheck;
//Server side struct in Delphi6
TNetConnectCheck = record
UserName : string[40];
Password : string[40];
ClientVersion : String[40]; // Added by Ravi on : 03/08/2006
EndCode : array[0..1] of Char;
end;
but, I am getting some junk characters in the strings at serverside eg. User name like 'CrazyToLearn#0...#0'
I want to send the packet which is having the length 125 to server with exact 'CrazyToLearn' not with any padding 0 or junk characters.
I tried all the trims dynamic char array but cant solve the problem, Please instant help will be really appriciated...
THANX
CraZyToLearn
|
|
|
|
|
Please consider the statement I forgot to mention in the post is : "I dont have to change code at server side,whatever we want to modify , its only at client side"
CraZyToLearn
|
|
|
|
|
I'm no Delphinium but as a general approach you need to determine the byte count sizes of the types involved e.g. sizeof(TNetConnectCheck) and make sure they match up. You might also want to control the data type alignment on the client side, see #pragma push pack : 1 (That syntax is wrong so you'll need to search ) or __align your client side data type.
You also need to check whether the string types on the Delphi side are NULL terminated or not and setup the client side data appropriately.
Finally you need to check the calling convention, e.g. __cdecl, __stdcall or Delphi equivalents of the actual call between the two modules and make sure both sides are expecting the same behaviour in terms of stack cleanup. I suspect this last part is already OK or you would not be getting as close as you are but it does no harm to check and be sure you understand what's happening under the hood.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Thanks Matthew,
Still I am trying.
CraZyToLearn
|
|
|
|
|
|
gnanapaul wrote: what is the procedure for that?
Not posting twice within an hour or two? (You can modify a post....)
Iain.
Iain Clarke appearing in spite of being begged not to by CPallini.
|
|
|
|
|
sorry... Iain Clarke
i was in trouble.
paulraj
|
|
|
|
|
Hello all
Is there any functionality by which we can know the sizeof the graphics memory?
Thanks in advance
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
|
hi...
i have to use memorystream in mfc.
should i add any header fiile?'
other wise what is the procedure?
can anyone help me?
paulraj
|
|
|
|
|
I don't remember any MFC class called memorystream.
Maybe a compination of CArchive and CMemFile?
And any MFC project has enough header information in it to use those.
Beyond that, I can't help.
Iain.
Iain Clarke appearing in spite of being begged not to by CPallini.
|
|
|
|
|
hi....
i need to convert a image file into stream.
so that only i asked.
is there any another method for that?
please help me.
paulraj
|
|
|
|
|
I had the same problem as you... (I think). I needed to use OleLoadPicture, and that loaded from a stream.
It was jigsaw game app, and I wanted to be able to load jpgs, bmps, gifs, tifs, pngs, etc.
Looking at my code now, I'm a little unsure of casting the result from CoTaskMemAlloc to an HGLOBAL, but it seemed to work fine!
Anyway, take what you can, and avoid any bad habits.
Iain.
HBITMAP CJigSawDoc::JigLoadPicture (CFile *f, CSize szImage)
{
IPicture *iPic = NULL;
DWORD dwFileSize, dwRead;
dwFileSize = f->GetLength ();
void *pBuffer = ::CoTaskMemAlloc (dwFileSize);
if (NULL == pBuffer)
return NULL;
dwRead = f->Read (pBuffer, dwFileSize);
if (dwRead != dwFileSize)
return NULL;
IStream *iStream = NULL;
if (FAILED(::CreateStreamOnHGlobal ((HGLOBAL)pBuffer, FALSE, &iStream)))
return NULL;
::OleLoadPicture(iStream, 0, FALSE, IID_IPicture, (LPVOID*)&iPic);
iStream->Release ();
::CoTaskMemFree (pBuffer);
if (iPic == NULL)
return NULL;
CWindowDC dc (CWnd::FromHandle (::GetDesktopWindow ()));
HBITMAP hBitmap = NULL, hOldBitmap = NULL;
HDC hMemDC = CreateCompatibleDC (dc);
CSize pxSz, hmSz, szScreen (::GetSystemMetrics (SM_CXFULLSCREEN), ::GetSystemMetrics (SM_CYFULLSCREEN));
iPic->get_Width (&hmSz.cx);
iPic->get_Height(&hmSz.cy);
AtlHiMetricToPixel(&hmSz, &pxSz);
szScreen.cx = (int)Interpolate (0, szScreen.cx, 0.9, 1.0);
szScreen.cy = (int)Interpolate (0, szScreen.cy, 0.9, 1.0);
if (pxSz.cx > szScreen.cx)
{
pxSz.cy = (int)Interpolate (0, pxSz.cy, szScreen.cx, pxSz.cx);
pxSz.cx = szScreen.cx;
}
if (pxSz.cy > szScreen.cy)
{
pxSz.cx = (int)Interpolate (0, pxSz.cx, szScreen.cy, pxSz.cy);
pxSz.cy = szScreen.cy;
}
hBitmap = ::CreateCompatibleBitmap (dc, pxSz.cx, pxSz.cy);
hOldBitmap = (HBITMAP) SelectObject (hMemDC, hBitmap);
iPic->Render (hMemDC, 0,pxSz.cy - 1, pxSz.cx, -pxSz.cy, 0,0, hmSz.cx, hmSz.cy, NULL);
iPic->Release ();
iPic = NULL;
SelectObject (hMemDC, hOldBitmap);
return hBitmap;
}
Iain Clarke appearing in spite of being begged not to by CPallini.
|
|
|
|
|
gnanapaul wrote: i need to convert a image file into stream.
fstream ?, fstream fs("Image.img", ios::in ...); makes file to stream.
if you want to keep in memory, as Iain already specified, use CMemFile() to store image data and CArchive provides the redirection stream like operators (<< , >>)
|
|
|
|
|