|
Look up EnumResNameProc / EnumResourceNames to work out how to get the names of icons
in a specific loaded module.
Task manager will just take the first icon, as does explorer unless told otherwise.
SHGetFileInfo may also help, if you don't have a HMODULE / HINSTANCE.
Iain.
|
|
|
|
|
Check ExtractIconEx function...
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
#include <iostream.h>
struct WhiteHouse
{
int *p;
WhiteHouse(int n) { p = new int; *p = n; }
~WhiteHouse() { delete p; }
};
WhiteHouse ww(1912);
void f() { WhiteHouse fdr(1932); fdr = ww; }
int main()
{
f();
WhiteHouse gwb(2000);
cout << *ww.p;
return 0;
}
Hello all,
Please see code above and help me answer some question?
Why is out put of program 2000?
Does program create memory leak error?
Thanks,
Chau Ngoc Vo, Software develope
|
|
|
|
|
What about gwb?
What part of it?
gwb is white house, Yes?
well what part of whitehouse?
WhiteHouse gwb;
gwb.p(2000);
or
gwb.~WhiteHouse;
but not gwb(2000);
Best Wishes and Happy Turkey Day,
ez_way
|
|
|
|
|
in f() you are assigning ww to fdr.
Now when the function returns fdr goes out of scope so the destructor gets called. so the variable p of fdr (which is the same as that for ww) is deleted (becomes free for reuse) and subsequently the variable p in ww becomes an invalid pointer.
in main when you declare gwb, the constructor calls new to assign a memory location to p. since the memory location held by the old p is free it (can be) is allocated to gwb->p and assigned value 2000. But ww->p still points to this location and so it's value is 2000 too.
hope this helps more than it misleads
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|
how do i input/output ASCII characters ?
eg. how do i translate "§8JV#*+š«]]‡Õå(Š§ËýC.'Êÿ ¥F" into ASCII numbers.
and vice versa, how do i translate a string of numbers into ASCII characters?
any ideas?
(hope i'm not getting a reputation of always asking strange questions)
|
|
|
|
|
m_iMode = 0;
BYTES = 0;
char c
pass c to function
if ((c>='a'&&c<='f')||(c>='0'&&c<='9'))
if (c >= 'a' && c <= 'f')
x = c - 0x61 + 0x0a;
else
x = c - 0x30;
Best Wishes and Happy Turkey Day,
ez_way
|
|
|
|
|
i tested each os that below code in Win98,Win2000.
but different value this variable "procFunc".
i guess wrong value in Win98.
what is wrong? i just get address BitBlt in gdi32.dll.
how can i get right value. gave me your advise.
///////////////////////////////////////
// code start
HMODULE hMod;
FARPROC procFunc;
// Right get value.
hMod=GetModuleHandle("GDI32.DLL");
//or
hMod=LoadLibrary("GDI32.DLL");
// wrong get value.
procFunc = GetProcAddress(hMod,"BitBlt");
////////////////////////////////////////
|
|
|
|
|
Are you getting a value other than NULL?
If so, what makes think it is wrong on win98? There is no one value for this function. Depending on the OS or even the Service Pack, it might be different.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
it not value is NULL.
so i find same result in WinME.
|
|
|
|
|
As long as the value isn't NULL, you shouldn't care at all what the value is. Expect it to be different on every different computer you run the program on. Your software should never care what the value actually is.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
I can't seem to figure out how one layers bitmaps. And, can one layer things that aren't bitmaps, like CStatics? Also, what's the best REDO/UNDO method for a publisher-like program?
halblonious
|
|
|
|
|
halblonious wrote:
I can't seem to figure out how one layers bitmaps
Manually, by keeping several bitmaps with transparency keys.
halblonious wrote:
And, can one layer things that aren't bitmaps, like CStatics?
No, they don't have a transparent background, unless you're using W2000 or higher ( maybe )
halblonious wrote:
Also, what's the best REDO/UNDO method for a publisher-like program?
Read 'Design Patterns' for some good ideas. It's on Addison Wesley ( I forget the authors name ).
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
--Manually, by keeping several bitmaps with transparency keys.
Where can I find how to do this?
--No, they don't have a transparent background, unless you're using W2000 or
higher ( maybe )
So, is there a way to do something like save the visual aspects of a CStatic as a bitmap, and then layer it for display? Or would that cause weird laggy stuff for the user, or other lame problems?
halblonious
|
|
|
|
|
halblonious wrote:
Where can I find how to do this?
If you're not supporting Windows95 you can use TransparentBlt, otherwise search the Windows Developers Journal article backlog at www.wdj.com, I have an article there that shows you how.
halblonious wrote:
So, is there a way to do something like save the visual aspects of a CStatic as a bitmap, and then layer it for display? Or would that cause weird laggy stuff for the user, or other lame problems?
Statics are just text, so store the text, and draw it onto a bitmap and show that. Other controls, you have to worry about them getting click messages and so on as well, you should develop a control to hold other controls, display them and get them their messages properly. Sounds like hell to me.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I am having some problems figuring out how to programmitcally group buttons with a toolbar control.
If you want the following:
+-----------------------------------------------+
| btn1 | btn2 | btn3 | | btn4 | btn5 | | btn6 |
+-----------------------------------------------+
\______ _______/ \___ ____/ \_ _/
\/ \/ \/
group 1 group 2 group 3
How do you indicate which group a button is in?
What breaks the group? The separator (ie using the TBSTYLE_SEP) ?
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
Hi please look at this.
ID_SEPARATOR,
ID_INDICATOR_CAPS,
ID_SEPARATOR,
ID_INDICATOR_NUM,
ID_SEPARATOR,
ID_INDICATOR_SCRL,
Best Wishes and Happy Turkey Day,
ez_way
|
|
|
|
|
How can I resize an image to half of its size using CxImage? I am having problem findingt the function.
Elizabeth
|
|
|
|
|
Why don't you post to the CxImage forum instead of here?
BTW, the function is Resample().
|
|
|
|
|
I do not see CxImage forum in CodeProject. Can you tell me the website?
Elizabeth
|
|
|
|
|
|
I got it. Thank you.
Elizabeth
|
|
|
|
|
Hello,
Has anyone tried to create custom scrollbars for the ActiveX WebBrowser control? I've managed to disable the default scrollbars using the IDocHostHandler Interface but I'm having a little trouble drawing on the custom ones.
I've found some articles that describe custom scrollbars in listboxes and other controls, but nothing for ActiveX (IDispatch) controls.
I know that you can change the colors through HTML, but there doesn't appear to be a way to use bitmaps in this fashion.
Any help will be greatly appreciated.
Cheers,
Don
|
|
|
|
|
I am writing a plugin for winamp 2.xx.
I want to register some Timer for its window.
But how can prohibit to do not conflict by existing its timer ID?
thanks.
|
|
|
|
|
Hi
Search for an old pgm. called Eureka (1998) I think.
It deals with some of these issues.
Best Wishes and Happy Turkey Day,
ez_way
|
|
|
|