|
Presumably the code that is used to display the JPEG picture will want to know the size of the image. The fact that a 5KB image is in a 10KB buffer is irrelevant.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi
(Please let me know if there's a better group to post
this to)
Is there an easy way to extract error messages for a
build started via the VCConfiguration.Build method ?
The ReportError event in VCProjectEngineEvents doesn't
seem to ever be fired for build errors.
.
|
|
|
|
|
Hi!
Is it possible to import for example a Dialog recource from another project. Must I add the .h and .cpp files for the generated Dialog-classes?
APe
|
|
|
|
|
d00_ape wrote:
Is it possible to import for example a Dialog recource from another project.
Yes. If you have two instances of Visual Studio open, you can use drag/drop. If you have one instance of Visual Studio open, you can use copy/paste.
d00_ape wrote:
Must I add the .h and .cpp files for the generated Dialog-classes?
Yes, unless you are going to create new ones.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
I may bee stupid but it doesn’t work to drag and drop (or copy paste).
Have tried both VS 6.0 and VS .NET
In VS .NET it seems to work but when I for example drop the ID_MYDIALOG1 on “the resourcemap” in the recourse view nothing happens!?
APe
|
|
|
|
|
can any one send me the microsoft visual c++ source code for under root.
the requirment is that we have to use only increament or decreament operator(++ or --).
I have made functions for adition, subtraction, division and multiplication.
please send me the algoritm for squar root.
|
|
|
|
|
a) From school memory, there was a newtonian expansion that would let you calculate it from
the operators you have already cracked.
b) This sounds a lot like homework, albeit damn hard. People here general frown on doing that
for other people. Hints, maybe. Spoon fed answers, no.
c) I was going to point you to the Visual C++ forum, then I spotted that was in another window.
Oops.
Iain
|
|
|
|
|
Since Newton's method uses the * and / operators, and * is shorthand for fast addition, and / is shorthand for fast subtraction, that should be a big hint.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Aqeel Asghar wrote:
can any one send me the microsoft visual c++ source code for under root.
the requirment is that we have to use only increament or decreament operator(++ or --).
I have made functions for adition, subtraction, division and multiplication.
please send me the algoritm for squar root.
That sounds an awful lot like a homework problem to me.
|
|
|
|
|
I took an image from my MSN Messenger 6 (I use XP and in my user files root it is somewhere in Application Data as a PNG image with a .tmp extension), converted it, using IrfanView 3.80, to a 256-colors 96x96 pix icon (ICO). The colors were still really good and the same as the PNG.
But when I put the ICO into my resouce stuff and load it into an CImageList, the palette is being ignored and my icon gets really 4-bits like.
How to avoid this?!
|
|
|
|
|
VisualStudio is a bit fussy, and if you open it from within the resource editor it will convert it automatically - you have to sneak it in the back (just copy over the existing file) and make sure not to open it from within VisualStudio itself.
|
|
|
|
|
I am also getting the similar kind of problem , i am using VC6.0.
It is relating to winxp ...i needed a folder icon to display in my treeCtrl application.so i exteracted it using a IconExtractor software from the System32\url.dll.Internet Explorer Favorite picks its icons from this dll.
This icon display all right with full quality in all other OS(WIN98,WINME,WIN2000)
But in WINXP it i get the dark shade under these icons .
But it is not only with me my app, i also saw another very famouse software (Neero Burning ROM) which use the same icon , and it also gets the similar shade under that icon.
So there must be some problem regarding WINXP.
But on the other hand IE Favorites in WINXP display that all rightt.
so any clue.
No Worries!
|
|
|
|
|
No, that is an other problem. The icon is 24-bits (I guess it is) and that dark shade is real. But XP can 'convert' that shade to a transparency level and so use it for the Operating System. For instance, in the "Choose an icon" dialog (when choosing an icon for a link or a folder or whatever), you'll see an array of some icons in SHELL32.DLL . You don't see a weird shadow there. But when a not-advanced program opens/extracts the icon, the shade will appear, because it is impreted as an opaque color.
|
|
|
|
|
If you mean a number like IDC_RESETBUTTON, the solution is quite easy. Just take an unique number (e.g. 2001) and define your IDC_ thing as that number using the preprocessor (so no ending semicolon):
#define IDC_RESETBUTTON 2001
Then make sure you declared your CButton* resetButton in you dialog class (well, you declare it as a local member, but then it will be destroyed afterwards and the ID isn't valid anymore...) and call, if the pointer resetButton is valid, the Create member function:
resetButton->Create("Reset Data",0,bRect,parent,IDC_RESETBUTTON);
where "Reset Data" is the window (read: button) title, 0 the style (why not WS_VISIBLE?!), bRect the window (read: button) rect, parent a pointer to the parent window (but you could also creaete it into a button ) and IDC_RESETBUTTON (the compiler will read '2001') the ID number.
This number can be used to get a pointer to the dialog item:
CButton* buttonPointer = (CButton*)YourDialogClassInstance.GetDlgItem(IDC_RESETBUTTON)
Could somebody confirm these things, please?
|
|
|
|
|
Hello Everybody,
I want to add a new tool bar to my Dialog based application having two option for opening second dialog box and for closing the existing dialog box. but i couldn't able to do that one.
Thank you
Neelesh K J Jain.
|
|
|
|
|
|
i need to write a c++ code that will convert the given postfix expression of the form
#1#2 && #3! #4#5 || ||
(with no spaces between))
to infix form
where
!
&&
and || aer the expressions used and its of the bbolean form only,
can someone ikndly help me in solving this!
ranjani
|
|
|
|
|
Converting from/to prefix, infix, and postfix, is easily accomplished using a stack data structure.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
I'm trying to load some JPEGS onto a window but with no success...I have done this in the past with the same code and it worked as long as I declared a LPPICTURE global...in this case I need multiple pics to be loaded and displayed so I created a class with a linked list to load them all into
Here are some the functions:
class cPictureList
{
public:
class cPictureListElement
{
public:
IPicture *pPicture;
long hmWidth;
long hmHeight;
cPictureListElement()
{
pPicture = NULL;
hmWidth = 0;
hmHeight = 0;
}
private:
cPictureListElement *pNextPicture;
friend class cPictureList;
};
public:
cPictureListElement *pFirstPicture;
cPictureList()
{
pFirstPicture = NULL;
}
void Enter (char*);
void LoadCovers (long);
void LoadGalleryPic (char*, LPPICTURE);
void DisplayPictures (HWND, HDC, RECT);
};
void cPictureList::Enter(char *szFileName)
{
if ( pFirstPicture == NULL )
{
cPictureListElement *pNewPicture;
pNewPicture = new cPictureListElement;
LoadGalleryPic(szFileName, pNewPicture->pPicture);
pFirstPicture = pNewPicture;
pNewPicture->pNextPicture = NULL;
return;
}
cPictureListElement *pBeforePicture, *pAfterPicture;
pBeforePicture = pFirstPicture;
pAfterPicture = pFirstPicture;
while ( pAfterPicture != NULL )
{
pBeforePicture = pAfterPicture;
pAfterPicture = pAfterPicture->pNextPicture;
}
cPictureListElement *pNewPicture;
pNewPicture = new cPictureListElement;
LoadGalleryPic(szFileName, pNewPicture->pPicture);
pBeforePicture->pNextPicture = pNewPicture;
pNewPicture->pNextPicture = NULL;
}
void cPictureList::LoadGalleryPic(char *szFile, IPicture *gpPic)
{
HANDLE hFile = CreateFile(szFile, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
DWORD dwFileSize = GetFileSize(hFile, NULL);
LPVOID pvData = NULL;
HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE, dwFileSize);
pvData = GlobalLock(hGlobal);
DWORD dwBytesRead = 0;
BOOL bRead = ReadFile(hFile, pvData, dwFileSize, &dwBytesRead, NULL);
GlobalUnlock(hGlobal);
CloseHandle(hFile);
if ( bRead == FALSE )
return;
LPSTREAM pstm = NULL;
HRESULT hr = CreateStreamOnHGlobal(hGlobal, TRUE, &pstm);
hr = ::OleLoadPicture(pstm, dwFileSize, FALSE, IID_IPicture, (LPVOID *) &gpPic);
pstm->Release();
}
void cPictureList::DisplayPictures(HWND hwnd, HDC hdc, RECT rc)
{
cPictureListElement *pDisplay;
pDisplay = pFirstPicture;
while ( pDisplay != NULL )
{
long hmHeight;
long hmWidth;
if ( pDisplay->pPicture != NULL )
{
pDisplay->pPicture->get_Width(&hmWidth);
pDisplay->pPicture->get_Height(&hmHeight);
}
else
MessageBox(NULL, "Picture is NULL", NULL, MB_OK);
pDisplay = pDisplay->pNextPicture;
}
}
In the function LoadGalleryPic gpPic is not NULL (I have tested this) and OleLoadPicture returns S_OK. The problem is in DisplayPictures...My test always gives me the messagebox saying the picture is NULL. I can only get it to work if gpPic is declared global and is not passed as a parameter to LoadGalleryPic. Any insight?
|
|
|
|
|
What does this syntax mean and how may I convert it to NASM?
leal (%eax,%eax),%edx
movw (%eax,edx),%ax
...Anybody?
Thanks.
B.
|
|
|
|
|
(Note: I may be a little rusty):
The full syntax for memory references in AT&T syntax is:
displacement(base,index,scale)
The above syntax translates to (in Intel syntax):
[base+(index*scale)+disp]
Most parts are optional; e.g. scale defaults to 1, displacement defaults to 0.
The l , w , and b suffixes used in AT&T syntax instructions translate to the dword , word , and byte keywords in Intel syntax (respectively).
Also, Intel syntax uses a reverse order of oprands.
So, in leal (%eax,%eax),%edx , you've got a lea instruction that's operating on longwords (dwords), is referencing a memory address eax + eax , and stores the result in edx . In Intel syntax, that's:
lea dword edx,[eax+eax]
(the dword can probably be omitted).
- Mike
|
|
|
|
|
I need to collect data from handphone using Infrared. The data in handphone or SIM card includes some Asian Characters which are supported by some phones. The character set that support Asian characters includes UTF-8 and UCS2. I collect UTF-8 formatted data from phone, and store them in a database, later i need to convert these UTF-8 formatted data to UCS2 data and send to a phone which support UCS2. Could you help me with this conversion between UTF-8 and UCS2?
Send me an email or reply this message. thanks
Regards
World on the way
|
|
|
|
|
MultiByteToWideChar
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Thanks for your instruction. I will try it.
Regards
World on the way
|
|
|
|
|
i know in vb i can let programme continue to run when some errors occuring with the statement "On Error Resume Next".
how can i reach the same result in vc++?
thans!
Habbit--Beginner In MFC
|
|
|
|
|