|
You should unload the bitmap. Refer the way youd load the bmp.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
I am using LoadBitmap(nIDResource) to load image to dialog
|
|
|
|
|
will the CBitmap object get destroyed (or going out of scope)?
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Please show some code.
Regards,
Sandip.
|
|
|
|
|
Provided that you properly destroy the object, you don't have to worry about what Task Manager or similar tells you since it doesn't tell you what you think it does.
Read more here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
If you are dynamically allocating memory from the C++ heap, the heap will generally not be reduced in size when that memory is freed. One alternative would be to directly allocate your own memory from windows using GlobalAlloc.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hi all,
I want to use pimstore.h and aygshell.h in application.
when i include these files in using class than number of errors comes as follows:
pimstore.h(2545) : error C2061: syntax error : identifier 'CEBLOB'
pimstore.h(5465) : error C3121: cannot change GUID for class 'Folder'
1>gt; c:\program files\microsoft sdks\windows\v6.0a\include\shldisp.h(1546) : see declaration of 'Folder'
aygshell.h(286) : error C2061: syntax error : identifier 'SIPSTATE'
1>gt;SMSpadDlg.cpp
please help me for this.
Thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: when i include these files...
Exactly where did you include them?
"_$h@nky_" wrote: pimstore.h(2545) : error C2061: syntax error : identifier 'CEBLOB'
This seems self-explanatory. No definition for CEBLOB was found prior to line 2545 of pimstore.h .
"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 want to learn C++ to be able to program on game consoles (mostly PS2, PS3 and Wii, not 360 or XBox), do you need to learn different commands and libraries than under windows?
I mean, obviously MFC and the everything about displaying windows won't work, but what about the rest?
And is there a way to test and debug a game on a windows PC without having to burn it to disc and test it on the console every time?
Thanks.
|
|
|
|
|
Megidolaon wrote: I want to learn C++ to be able to program on game consoles (mostly PS2, PS3 and Wii, not 360 or XBox), do you need to learn different commands and libraries than under windows?
I suppose you've to use the proper development kit, for instance, PS3 possibly has it's own. But it's just a guess, since this morning I'm too lazy to google 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
[My articles]
|
|
|
|
|
It is important to understand the language. I see 2 parts:
1. "pure" C++ language, as mathematical operations and working with memory and the powerful (and that why dangerous) pointer arithmetics.
2. working with libraries or frameworks to target devices.
The first is for at most all the same BUT the second differences for the platform. So the libraries are depending for what target you develop. There are also libraries with more or less portability available. Compare the QT with the MFC. Or the IE with the FF => and the Addons for it.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hi
In my Server and Client (CSocket) Vc++ MFC application , I want to send Server system time to Client and Set the Local time in Client
SetLocalTime( SYSTEMTIME );.is for setting the local time.
How can pass the SYSTEMTIME object through the socket.
So I send from server and receive in Client and assign it.
Thanks and Regards
Shakumar
shakumar
|
|
|
|
|
I would pass it as any other chunk of data, i.e.
CSocket mySocket;
SYSTEMTIME st;
mySocket.Send(&st, sizeof(st));
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 for u'r Reply
I tried u’r suggestion , sending is ok but how to receive it and type cast in to SYSTEMTIME
I Receiving as
char ch[1020];
CString m_str;
int m_Count = this->Receive(ch,strlen(ch));
ch[m_Count] = '\0';
m_str.Format("%s",ch);
AfxMessageBox(m_str);
Thanks & Regards
Shakumar
shakumar
|
|
|
|
|
What about
SYSTEMTIME st;
Receive(&st,sizeof(st)); ?
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 pallini & sandip
Now its working
shakumar
|
|
|
|
|
You're welcome.
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]
|
|
|
|
|
Try this..
const int iSize = sizeof(SYSTEMTIME)
char szTemp[iSize];
SYSTEMTIME dtTime;
memcpy(szTemp,&dtTime,iSize);
You can also directly send the struct as indicated by CPallini..
in client side after you receive
SYSTEMTIME dtTime;
memcpy(&dtTime,szTemp,sizeof(SYSTEMTIME));
I hope it helps..
Regards,
Sandip.
|
|
|
|
|
How to use GetForegroundWindow in service mode application in Vista operating system.
Domain , VC++.
Sathish.S
ya
|
|
|
|
|
Yeah, you're not going to be able to do that - look at this page[^], specifically the second paragraph, where it says:
Services cannot directly interact with a user as of Windows Vista. Therefore, the techniques mentioned in the section titled Using an Interactive Service should not be used in new code
It's all about the security, man....
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi Friends,
I've created a FindBar using the deskband.
I want to assign hotkey to Findbar, so that when user press 'Ctrl+f' key the findbar popsup in IE.
How can I do that?
Please help me.
ritz1234
|
|
|
|
|
Hi,i don't know what is FindBar. but you can use PreTranslateMessage(MSG *pMsg) to get the keybord.
|
|
|
|
|
Hi All
How can i insertitem in ClistBox through Threading?Plz help me
|
|
|
|
|
The simple answer is: you don't. You should never access UI elements from a different thread than the UI thread. If you have to do such a thing, rethink your design. A better option would be to "generate" your data in the thread and then send a user defined message to your window telling it to refresh itself. When receiving the message, your window will then fetch the data and add it to the list control.
I think this article[^] will help you a lot for threading.
|
|
|
|
|
Ok here i am try to do.i don't know it's a right or not.Code is here
UINT WorkerThreadProc( LPVOID Param );
UINT WorkerThreadProc(LPVOID Param)
{
CStdioFile file;
CString readstring;
if(file.Open(log1, CFile::modeRead | CFile::modeNoTruncate))
{
CString readstring
while(file.end)
{
int i=0;
file47.ReadStringreadstring.Trim());
if(readstring.IsEmpty())
{
break;
}
else
{
for(;i<1000;)
{
m_listba.InsertString(i,readstring);
break;
}
i++;
}
}
file.Close();
}
return TRUE;
}
void CABC::OnBnClickedButton3()
{
AfxBeginThread(WorkerThreadProc,NULL,THREAD_PRIORITY_NORMAL,0,0,NULL);
WaitForSingleObject(WorkerThreadProc, INFINITE);
}
It's working but when i click on OKButton then it's show Assertion Failed Afxwil2.inl Line 731.
Plz help me
|
|
|
|