|
__erfan__ wrote: Unhandled exception at 0x00411761 in GdiPlusTest.exe: 0xC0000005: Access violation reading location
You have to initialize GDI+ before you make any GDI+ calls. check GdiplusStartup()[^] function
|
|
|
|
|
|
|
Looks like the missing initialization didn't pass unnoticed...
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
[My articles]
|
|
|
|
|
Hi,
Please mark the correct answers(s) that helped you by clicking "Good Answer". I've done it for you now.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Hi,
i would like to know the best way to convert a char (e.g 'c') to its hex string representation (i.e 63) in c++ and save it to a file as such.
|
|
|
|
|
fprintf(fp, "%02X ", 'c');
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
[My articles]
|
|
|
|
|
Thank you, but is there also a way to do it with ofstream or ostringstream?
So many streams are available, so confusing 
|
|
|
|
|
Naturellement!
#include <fstream>
void main()
{
std::ofstream os;
os.open("foo.txt");
os.unsetf(std::ios_base::dec);
os.setf(std::ios_base::hex);
os << (int) 'c' << std::endl;
os.close();
}
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
[My articles]
|
|
|
|
|
Thanks again, another problem came up though. The character has reinterpret_cast<char*> in front of it and then the address of the vector element. The reinterpret_cast should to my opininon put the char in correct format, but it wont come out right 
|
|
|
|
|
Could you please post sample code?
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
[My articles]
|
|
|
|
|
Is there any way to differentiate programmatically which event is occuring i.e shutdown or restart after catching WM_QUERYENDSESSION??
Regards,
Kushagra
|
|
|
|
|
See the 'competitor' [^].
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
[My articles]
|
|
|
|
|
Thanks Sir,
It surely will help
Kushagra
|
|
|
|
|
Kushagra Tiwari wrote: It surely will help
Knowing how Windows was last shut down is helpful?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
DavidCrow wrote: Knowing how Windows was last shut down is helpful?
Hi David,
Indeed it is helpful :
For eg:
User A pressed 'Restart' on the 'Shutdown Windows ' dialog. My application recieves WM_QUERYENDSESSION message and I return false (means I am temorarily delaying the shutdown) , but WM_QUERYENDSESSION never lets me differentiate between a 'Shutdown' & 'Restart'. Now, in this time after my application has completed its work it wants to continue with the operation that user chose then this registry value is one thing that lets me know whether the user tried 'Shutdown' or 'Restart', thus accordingly I can perform his desired operation .
Regards
Kushagra
I hate coding but I luv to Develop
|
|
|
|
|
Have you verified that the registry is updated with the 'restart' flag even though no restart was performed?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Yes david .. It works perfectly fine .. I have verified it just now 
|
|
|
|
|
Did you try to cross verify it ??
|
|
|
|
|
No, why would I?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I thought u must have tried it before, thats why u mast have asked the question of verifying.
Anyways , thanks for the help.
Kushagra
|
|
|
|
|
Hi,
Our software (our product) is not getting fully installed inside a folder with name "," (comma). I tried installing on a folder with name ";" (semi colon) then software got fully installed.
What could be the reason.
Thanks.
|
|
|
|
|
Well, the comma character is used as argument separator in many contexts (for instance in command line when running an application).
I would say it is not wise naming a folder that way. If you really need to deal with it then good luck.
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
[My articles]
|
|
|
|
|
Hi All,
Why is that classes derived from CCmdTarget can alone handle messages???
Any reasons...........
Thanks,
Hari
|
|
|
|
|
Refer it to know why. [^]
Величие не Бога может быть недооценена.
|
|
|
|