|
And doing the work in the handler for WM_ENDSESSION? Wouldn't that also show a System Dialog after a certain time, saying my application is not responding?
Artur Jales Moreira
|
|
|
|
|
jales wrote:
Wouldn't that also show a System Dialog after a certain time, saying my application is not responding?
Not if you do your operations in a seperate worker thread, and leave the UI thread open to talk to the system. If you're using MFC, it's as simple as AfxBeginThread()...
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
But if I respond to WM_ENDSESSION the application will end.
Artur Jales Moreira
|
|
|
|
|
I designed a small activex control with a Property page. The property page has a button control.
Suppose if a place this control on a Dialog Box by right clicking on the Control and selecting properties..., it displays the property page with button control. when i click a button the focus will change to ActiveX control window , where i can draw using mouse .
Any help ...
Thank you.
|
|
|
|
|
chepuri_uk wrote:
it displays the property page with button control. when i click a button the focus will change to ActiveX control window , where i can draw using mouse .
Any help ...
huh??? Are you asking how to do that just telling us you already do? Do you want to draw, like MS-Paint draw, or draw as in an owner-drawn menu?
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Hi All...;P
i new in VC++...i have problem when i run the application in Release version...after a few click of button the application return a meesagebox
Application Error
The instruction at "0x6c3ce337" reference
memory at "0x0000003c". The memory could
not be "read"
Click on OK to terminate
Click on CANCEL to debug the program
When i click CANCEL another message box come ...it written unhandled eception MFC42 access violation...
but in the debug version is no problem....
how i want to overcome the problem....
regards
:_Rocket_:
|
|
|
|
|
There is an article here on CP about setting the project to build debug but think it's release.
Otherwise you can use messageboxes to figure out where you are crashing, or a log file.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
You may have a stray pointer there. Look at the memory address: 0x0000003c is certainly not a real variable adress.
You are having this error in Debug build also, but it is masked by some of the error-correction mechanisms there. Look for mentions of memory leaks when executing your Debug-build.
You are positively sure that every pointer you are using has been initialised and checked for validity before?
This can only be a starting point, but (as Christian said) there is an article about this on CP
"My opinions may have changed, but not the fact that I am right."
Found in the sig of Herbert Kaminski
|
|
|
|
|
If you cannot recreate in debug mode, perhaps you should throw in some message boxes to see exactly where the error is occurring. Once you narrow it down maybe you can figure out the problem.
Jason Henderson start page ; articles
henderson is coming
henderson is an opponent's worst nightmare
* googlism *
|
|
|
|
|
Thanks in advance........;)
I want to get the label of Hard disk and number of Hard disk attached to the system.......
Shahzad Ahmad.
Software Engineer.
|
|
|
|
|
How does 'GetVolumeInformation' and
'GetDriveType' sound ?
|
|
|
|
|
Refer
GetVolumeINformation() API
* * * Code the dreams * * *
When you are programming code you are creating a little universe and you get to define the rules. It's a cheap way of creating your own castles in the sky
|
|
|
|
|
Hey all, in my view class i have it create a Object of mine that uses a thread to complete it's task, when the thread finishes it users AfxGetMainWnd()->PostMessage(MY_MESSAGE, 0, 0); to post a message. I am trying to catch it in the view class with ON_MESSAGE(MY_MESSAGE, MyFunction) but no luck. tho if I put that in the MainFrame class it catches it. Any ideas on how to get the view class to notice this message?
thanks in advanced.
Luke.
|
|
|
|
|
OK, It's something like this, the Message Pumps are associated with a
thread and not a window. Inside this thread the messages are dispatched
to different windows based on the windows handles.
So your code is posting back to the same thread which does not
have a message pump (while(GetMessage(..) {...}) so what ever messages
you post will never be executed!
Now you have two options
1. Post the message to the main thread and have it executed there
by using PostThreadMessage.
2. Provide a message Pump (this will mean you will need to re-tailor
your existing thread function to use the message pump and not
the simple while)
Hope this helps..
|
|
|
|
|
Post a user-defined command instead with AfxGetMainWnd()->PostMessage(WM_COMMAND,MAKEWORD(0,ID_YOURCOMMAND,0); and add an ON_COMMAND handler to your view: the MFC framework will properly route the command to the view handler.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
hi all,
please tell me how i can change the color of Mainframe,like scrollbars.
thanks
Hari Krishnan
|
|
|
|
|
Have a look at GetSysColor/SetSysColors which
change the whole systems colors(which is not
exactly a good idea!)
The next thing is to go in for painting the non-client
areas(ex the title bar is non client area) for
some of the things and for others you need a
custom control.
|
|
|
|
|
I have got a desktop app written in VC++ 6.0.(MFC support) Now I have to convert it to an Arabic version. Can somebody help me know what are the steps involed in such a conversion process? I tried to create an Arabic resource using VC resource editor but didn't succeed !! Do I need to have Arabic Windows for that ? Any help on this is highly appreciated.
Thanks in advance.
|
|
|
|
|
I wrote an article that might help:-
http://www.codeproject.com/cpp/mult_lang_support.asp
I have always converted to European languages, there is a trick you can use the method is described in the article, basically you would need a copy of Visual C++ tha is in the language you are convering to, or convert all the text in the .rc scripts.
One of my freeware progs was converted to French this tool about a mornings work, but it did not have a lot of text to convert, and neither was teh help file converted.
|
|
|
|
|
csylesh wrote:
!! Do I need to have Arabic Windows for that ? Any help on this is highly appreciated.
Besides the usual of putting the application in UNICODE ( with UNICODE and _UNICODE in the settings ).
I don't think you need that, you simply need to set the locale/regional settings to arabic ( of your country if applicable ) in one of the control panels, and you also need to change the keyboard settings tu use the IME ( I only did this for oriental languages ) to type the Arab characters.
When changing the resources, you can't simply copy the files, and type in arabic, you need to change the language section of the RC file. The resources are not UNICODE, they are in code page, that's why you need to change your locale/regionale for it to work.
for example in english we have this :
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)<br />
#ifdef _WIN32<br />
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US<br />
#pragma code_page(1252)<br />
#endif //_WIN32
you'll need to change the language, sublanguage and codepage.
Good luck!
Max.
|
|
|
|
|
hi iam developing a Instant Messenger...
i want my message window to be yahoo like
which supports colors,gif's etc...
i am using a dialog based app as
my program has UI threads
and please let know how to create such a HTML-style
view in dialog box..
|
|
|
|
|
probably embedd a IE control in the top portion ??
Although I think that Yahoo has a customized
editor.
|
|
|
|
|
hi Prem
what is an IE control is it same as WebBrowerControl
|
|
|
|
|
I've set up a server using winsock, and it accepts
and deals with connections just fine and I'm happy
as a bunny, but is there a way to determine the IP
address of the remote client?
I know it must be possible, but I'm new to this
so thanks for any help!
|
|
|
|
|
Use getpeername .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|