|
Okay. So, you mean to say I should have 3 sizes images embedded into the ico file ?
The way I created the icon was to use create a 32 * 32 size icon.
Btw - how can we see for an ico file - how many sizes does it support ?
Thanks for the help,
Cage
|
|
|
|
|
cagespear wrote: Btw - how can we see for an ico file - how many sizes does it support ?
I use Visual Studio's built-in icon editor.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Ok. so I just added 16 * 16 as well as 48 * 48 image sizes to my icon. I can see all 3 sizes - 16, 32 and 48 in my visual studio icon editor.
But my problem still continues ...
As I told you earlier - I can see the icon fine in the titlebar, in the icon which shows up when you do an alt+tab but I see the default icon(hand with videocamera) rather than my app icon in taskbar properly when I have more than 1 instances open for my app and windows xp has "grouped" them into 1 with its taskbar setting.
1 part which I missed earlier was even in the xplorer view, the icon for my app is that default one instead of original app icon.
Thanks for your time,
Regards
Amit
|
|
|
|
|
The app icon is sometimes tricky. Best is to give it the lowest icon ID in the resource.h.
And as some rightly mentioned support all possible sizes and bit depths in the icon.
Greetings from Germany
|
|
|
|
|
KarstenK wrote: The app icon is sometimes tricky. Best is to give it the lowest icon ID in the resource.h
I second that. I had a similar problem which was solved by doing this
Graham
Librarians rule, Ook!
|
|
|
|
|
Hi all,
please tell me how can i convert CString to float or vice Versa.
i m using this,
float fvar;
CString foo;
foo = "123.45";
fvar= atof(foo);
but this not working.
Please tell me.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
ThatsMe. wrote: but this not working.
any error message ?
|
|
|
|
|
No there is no error message.
but after calculation the final resul is Zero, that is wrong.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
try
fvar= atof((LPCSTR)foo);
Graham
Librarians rule, Ook!
|
|
|
|
|
i m also try this but same problem occur here.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
The only reason that I can think of that neither code works is that the string contains some other character before the numbers. atof will strip off any leading whitespace characters (MSDN says spaces and tabs only, but in my testing it also strips of newlines). Any other characters, probably including non printable characters, could cause it to return zero. Have you checked the characters in your string?
Graham
Librarians rule, Ook!
|
|
|
|
|
ThatsMe. wrote: but this not working.
Its working fine in my dialog based testapp. I could find only one warning -
"warning C4244: '=' : conversion from 'double' to 'float', possible loss of data".
Since atof() returns double instead of float .
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
is "." the right comma sign, or "," It depends on the system settings.
Set the warning level of the compiler higher to get a message. It also should work harder.
(Use double)
Greetings from Germany
|
|
|
|
|
I answered this for you on Codeguru, but in case you visit here more often...
The most likely reason I can think of (since you don't explain "not working" is this...
If you application is Unicode (default for VS2005 and later) then you can either change it to MBCS, or change your code to:
float fvar;
CString foo;
foo = _T("123.45");
fvar= _tstof(foo);
This change will allow it to work with either Unicode or MBCS.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
ThatsMe. wrote: please tell me how can i convert CString to float or vice Versa.
You can always use std::stringstream and the << operator instead of the old, insecure C-ish atof.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Hi,
I use GetDlgItem in thread. But it shows the error that GetDlgItem() does not take 1 parameter. For that i found i have to incude handle for my dialog box. I have displayed the dialog by using DoModal().
I dnt know how to create HANDLE for this dialog.Pls help me .
Anu
|
|
|
|
|
From your question, I think you're using MFC and your dialog class is derived from CDialog . Then call GetSafeHwnd() to get your dialog handle.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Try this.
CEdit* pBoxOne;
pBoxOne = (CEdit*) GetDlgItem(IDC_EDIT1);
GotoDlgCtrl(pBoxOne);
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Anu_Bala wrote: I use GetDlgItem in thread
You probably then call GetDlgItem outside your dialog class, which means that you are calling ::GetDlgItem and not CDialog::GetDlgItem (which are two different functions). The way to solve this is to pass the pointer to your class instance (the this pointer) in the thread parameter, cast it back to your class in the thread function and call GetDlgItem on it.
|
|
|
|
|
Whats the error? it needs to a handle to window?
|
|
|
|
|
you havent understand the MFC right. GetDlgItem() is a class member of a CWnd dervied class. A Thread not!!!
You better redesign your program with help of a seasoned mate.
Make change in the dialog only in the dialog (thread: your main app)
unse only HWND and communicate with PostMessage-API.
Greetings from Germany
|
|
|
|
|
How to implement CDC MoveTo(int, int) in windows sdk.
Regards
|
|
|
|
|
No need to implement. Microsoft did it for you [^].
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
|
|
|
|
|
|
Need the windows api version of CDC::MoveTo() ? Check MoveToEx() function.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|