|
Idealy Yes
WM_ENDSESSION
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hi there,
I used Brian Hart's code (Article:Center CMDIChildWnds and Other Tips) to center my windows. No errors were detected in Debug mode and everything worked just fine. But when I switched my active configuration to release mode, it gives me the following error:
error C2065: 'WM_SIZEPARENT' : undeclared identifier
Why is that when this is a MFC message?
Thanks!
|
|
|
|
|
elephantstar wrote:
error C2065: 'WM_SIZEPARENT' : undeclared identifier
Why is that when this is a MFC message?
Probably because afxpriv.h has not been included.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
It is included in stdafx.h. I still don't understand why it's giving me the error.
|
|
|
|
|
Size you indicate that it compiles in debug mode but not in release mode, I would suggest looking at the project's .dsp file and noting the differences between the two configurations.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
The application now works but some of the data is wrong in Release mode but everthing works fine in Debug. How do I compare the two and see where it went wrong? Thanks!
|
|
|
|
|
elephantstar wrote:
The application now works...
What did you change to correct the behavior?
elephantstar wrote:
How do I compare the two and see where it went wrong?
The two what? Are you talking about the project's .dsp file?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Instead of including <afxpriv.h> within stdafx.h, I included it directly with the class. Previously, my class included stdafx.h which in turn included <afxpriv.h> and it worked just fine.
As for my changes that causes two different outputs in Debug and Release mode, I didn't think to check in Release mode each time I updated my application. I have been using debug mode up until I needed to release it. Only then did I find out too late that it did not produce the correct output.
Is there an easy way to compare the two configurations and see where the problem lies?
Thanks!
|
|
|
|
|
elephantstar wrote:
Is there an easy way to compare the two configurations and see where the problem lies?
Yes. Look at the project's .dsp file. Haven't I mentioned that before?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Yes you did but I wasn't sure what I was looking at. Am I looking for differences in the two configuration settings? Thanks!
|
|
|
|
|
elephantstar wrote:
Yes you did but I wasn't sure what I was looking at.
The release-specific settings will follow !IF "$(CFG)" == "prjname - Win32 Release" and the debug-specific settings will follow !ELSEIF "$(CFG)" == "prjname - Win32 Debug". Look at the lines in each section and will become apparent what you are supposed to compare.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I remember seeing somewhere there was a way to use AfxBeginThread with a non-static member function. Does anyone out there know anything about this?
[insert witty comment here]
bdiamond
|
|
|
|
|
Is this of academic interest? Otherwise you could just send the this-pointer as pParam in the call, using a static member function as thread func. In that function, just convert the argument and call whatever non-static member you'd like.
|
|
|
|
|
Thanks, actually I just tried that. It works, except for some other problems I'm having.
[insert witty comment here]
bdiamond
|
|
|
|
|
I'm trying to program an application which is supposed to write several strings in .txt files. But no matter what i do, it keeps writing each string over the last one written, so i never have more than 1, and not even properly written if its shorter than the one before
I'm using WriteString(), and before was using Write().
How can i do to write in the same file after closing it without this problem?
Thank you very much.
|
|
|
|
|
Use the CFile::modeNoTruncate flag when opening the file. You'll then need to call CFile:SeekToEnd() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I AM CREATING AN APPLICATION IN WHICH I NEED TO CREATE A DIALOGBOX WHOSE SHAPE IS IN FORM OF A GIVEN PNG IMAGE.FEEL JUST LIKE SKINS PROVIDED IN WINAMP. IF ANY BODY CAN
|
|
|
|
|
Firstly could you please not use all capitals when posting messages.
See The RGN Generator[^] it will give you non-rectangular dialog boxes.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Thx for this.The code given in this is not for the application shown.I couldnt get weather this is a animated gif or png.If anybody can provide its code
Thx
|
|
|
|
|
CAN ANY BODY TELL ME THE BEST SITE WHERE I CAN GET BRAINDUMPS FOR VC++ EXAMS.IS THERE ANY EXAM FOR VC++.NET RIGHT NOW WHEN IS IT LAUNCHING
|
|
|
|
|
How about brainbench.com?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi all
I had a problem with MFC CSocket class.I use VisalStudio.Net
and corresponding MFC librarys from one.
My .exe application use an COM server which used this CSocket class.This pseudocode demonstrate what i try to do:
/////////////////Snippet from exe app////////////////
....
///pMySock is COM interface from my MySock.dll library
pMySock->Connect(...)
....
////////////////Snippet from MySock.dll library///////
class ATL_NO_VTABLE CMySock
{
....
CMySock::Connect(...)
{
if (m_sock.m_hSocket == INVALID_SOCKET)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
//Just try to create syncronous socket
//but failed here in Win98,see following
m_sock.Create()
....
}
}
CSocket m_sock;
}
Also in InitInstance method i invoke AfxInitSocket()
function and rather use MFC static linkage.
This code work fine in Win2000 system, but then i launch same application in Win98 m_sock.Create() failed.
And i can't catch why it happens.
Please any suggestions
THANK
|
|
|
|
|
This can be down to the following registry being corrupt
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Winsock2
See Related article[^]
It explains how to sort this out.
Hope this helps
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hello,
I just started using VC++ and developing a simple udp server application which uses listbox to show the incoming messages.
I am having trouble finding out if :
1. a new thread should be spawned to receive messages by the udp server (the received messages are to be displayed in the listbox)
2. or a different class should be created for the server
3. or the main dialog class can contain a function to invoke receive by server.
4. will this application require postmessage and getmessage functions: i mean a simple recieved message can be updated in the listbox window or not?
Also, if I want the application to start accepting the udp messages without any starting event (such as 'press start button'), where should the server code begin?
Any help will be highly appreciated. Thanks in advance.
|
|
|
|
|
Given the HWND of a dialog, is it possible to determine if the dialog is modal or not?
Using MFC, I could get the dialog's parent and see if it was disabled or not (due to the way MFC implements modal dialogs), but that will fail if [1] there is no parent or [2] if someone broke the "modal chain" by popping up another modal dialog from another window lower in the hierarchy/Z-Order.
Does anyone know if there is a way to do this? Assume that I have no internal knowledge of the dialog other than having access to its HWND .
Peace!
-=- James
Tip for inexperienced drivers: "Professional Driver on Closed Course" does not mean "your Dumb Ass on a Public Road"! Articles -- Products: Delete FXP Files & Check Favorites
|
|
|
|