Click here to Skip to main content
15,919,774 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Can I write a program that's spinned on the desktop, just like wallpaper? Pin
John R. Shaw18-Oct-07 17:16
John R. Shaw18-Oct-07 17:16 
AnswerRe: Can I write a program that's spinned on the desktop, just like wallpaper? Pin
Nishad S18-Oct-07 20:59
Nishad S18-Oct-07 20:59 
AnswerRe: Can I write a program that's spinned on the desktop, just like wallpaper? Pin
Kenan Aksoy18-Oct-07 22:57
Kenan Aksoy18-Oct-07 22:57 
QuestionHow do I check if a string is valid for saving? Pin
monsieur_jj18-Oct-07 16:19
monsieur_jj18-Oct-07 16:19 
AnswerRe: How do I check if a string is valid for saving? Pin
John R. Shaw18-Oct-07 17:04
John R. Shaw18-Oct-07 17:04 
AnswerRe: How do I check if a string is valid for saving? Pin
User 58385218-Oct-07 17:09
User 58385218-Oct-07 17:09 
QuestionHow to use VIPS API on MFC program? Pin
TooShy2Talk18-Oct-07 14:39
TooShy2Talk18-Oct-07 14:39 
QuestionBroken code? Pin
Tydia-kun18-Oct-07 11:26
Tydia-kun18-Oct-07 11:26 
This really bothers me.
See, I have a class and two variables of the same class, CBuffer, named Buffer<t1> and RetBuf<t2>.
So, there's a line of code that says Buffer = RetBuf (class CBuffer has an overloaded operator = that takes another CBuffer<t3>& as argument).
So even in debug, the compiler generates the following code:

004B1E48 mov eax,dword ptr [ebp+18h]
004B1E4B mov dword ptr [ebp+10h],eax
004B1E4E mov ecx,dword ptr [ebp+1Ch]
004B1E51 mov dword ptr [ebp+14h],ecx

WHICH IS COMPLETELY WRONG! Does anyone know why this may happen and how to fix such a thing? I already tried a rebuild without success.
All we long-time developers should know that unless there's an overload that takes a CBuffer<t3>& as argument, this operation is impossible. But there is one such overload, though, although the compiler does not generate code to call it, but instead perform pointer assigns! It's like it's thinking they're pointers, and therefore trying to assign the RetBuf pointer to the Buffer pointer, which again is not possible since there's no cast and they're different types! This boggles my mind! What IS the compiler doing?!
AnswerRe: Broken code? Pin
Stephen Hewitt18-Oct-07 14:33
Stephen Hewitt18-Oct-07 14:33 
QuestionRe: Broken code? Pin
Maximilien18-Oct-07 14:49
Maximilien18-Oct-07 14:49 
AnswerRe: Broken code? [modified] Pin
Tydia-kun18-Oct-07 15:26
Tydia-kun18-Oct-07 15:26 
GeneralRe: Broken code? Pin
User 58385218-Oct-07 17:04
User 58385218-Oct-07 17:04 
GeneralRe: Broken code? Pin
Tydia-kun19-Oct-07 0:35
Tydia-kun19-Oct-07 0:35 
GeneralRe: Broken code? Pin
Maximilien19-Oct-07 1:39
Maximilien19-Oct-07 1:39 
GeneralRe: Broken code? Pin
Tydia-kun19-Oct-07 1:41
Tydia-kun19-Oct-07 1:41 
QuestionRe: Broken code? Pin
Maximilien19-Oct-07 3:26
Maximilien19-Oct-07 3:26 
AnswerRe: Broken code? Pin
Tydia-kun19-Oct-07 3:38
Tydia-kun19-Oct-07 3:38 
GeneralRe: Broken code? Pin
User 58385221-Oct-07 12:51
User 58385221-Oct-07 12:51 
GeneralRe: Broken code? Pin
Tydia-kun23-Oct-07 7:13
Tydia-kun23-Oct-07 7:13 
GeneralRe: Broken code? Pin
John R. Shaw18-Oct-07 17:45
John R. Shaw18-Oct-07 17:45 
GeneralRe: Broken code? Pin
Tydia-kun19-Oct-07 0:36
Tydia-kun19-Oct-07 0:36 
QuestionHow to dock a dialog box Pin
s196675m18-Oct-07 11:18
s196675m18-Oct-07 11:18 
Questionstring vs string* Pin
pourang18-Oct-07 8:40
pourang18-Oct-07 8:40 
AnswerRe: string vs string* Pin
Nemanja Trifunovic18-Oct-07 9:08
Nemanja Trifunovic18-Oct-07 9:08 
GeneralRe: string vs string* Pin
pourang18-Oct-07 10:49
pourang18-Oct-07 10:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.