|
I want to make a dialog based program that just contains an edit box. Then I want to update that box with information every 30 seconds. Is it possible to do considering that windows hides the looping?
|
|
|
|
|
It is very possible. You can use OnTimer(). You will need to set a time count, etc. Nonetheless, yes it is very possible.
Kuphryn
|
|
|
|
|
I just wanted to say that whether or not the message loop is hidden from you, you still have the ability to process messages with the dialog proc that you create for your dialog. Or if you are using MFC, the messages that you add to the message table.
Like your previous reply stated you can call SetTimer to create a timer that will trigger an WM_TIMER or OnTimer event for whatever tiem interval that you choose.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hi out there !
I've just a little beginners-question:
When I create a child Window with the "WS_CHILD | WS_CAPTION | WS_SYSMENU" flags, the child window's
titlebar is always shown with the system defined inactive color. Is there any way (not using MFC) to give it an activated look ?
Thanks in advance for any answers
Jay
|
|
|
|
|
include the style WS_VISIBLE?
|
|
|
|
|
Send it the message WM_NCACTIVATE .
You need to do this manually, as only top-level windows are "active" as far as Windows is concerned.
--------
I am not a connoisseur. --Shog9 --
|
|
|
|
|
Hi everyone,
Has anyone experienced problems with AVIFileOpen() locking up for a _long_ time? I'm opening VERY large (1+ GB) uncompressed AVI files, and AVIFileOpen takes absolutely ages to return. When it does, the avi stream is the correct length and resolution, but all the frames are completely blank. I thought maybe the AVI file was broken (I'm creating the AVI files in the same app), but M$ MediaPlayer opens them fine, and in a very short time. Is there any way to get around this problem?
I guess that Mediaplayer uses DirectShow, rather than the Video for Windows API, which is getting on a bit now. But it is simple to use and serves my purpose, or rather it did until now. I hope that I can avoid having to re-write all my code to use DirectShow, which at the moment would be like using a sledgehammer to crack a pistachio
If anyone has any bright ideas about this, it would really help me out.
Thanks,
Pete
|
|
|
|
|
I suggest you have a look at VirtualDub. It's GPL so source is of course available.
|
|
|
|
|
Hi there,
I know that some programming languages like Delphi cannot use MFC extention DLLs ...
Can i write an ActiveX for that ?
I mean writing an activex for using MFC extention DLLs in all of Delphi programs ?
Can you tell me how ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
yes, you could encapsulate your MFC classes into a COM object then use it in Delphi.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
you can also write a standard C-interfaced DLL. most every programming environment out there can handle one.
if you want to write an ActiveX component, you'll need to get a book on it. it's a big subject.
-c
"Should you not have a ramekin of sea salt beside the stove, you don’t deserve oatmeal."
Dean Allen
|
|
|
|
|
All games (I think) have that function that they can find the game server on the network. Do you know how to do that?
Rickard Andersson@Suza Computing
ICQ#: 50302279 (Add me!)
E-mail: nikado@pc.nu
I'm from the winter country SWEDEN!
|
|
|
|
|
Most servers send UDP packets to a master server and get as a response an UDP packet with a list of all the servers currently running.
You may download the sourcecode of "qstat" in order to watch what packets you need to send
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I'm trying to compile some code that uses file streams in VC++ but I'm getting a ton of errors like:
'ios' : ambigious symbol
I've #included iomanip.h and iostream.h and have tried the "using namespace std;" but perhaps that is wrong. Do I need to specify another namespace or shouldn't it default to it anyway? Is there a Project setting for this?
TIA
|
|
|
|
|
i could be way off here, but are you sure you're supposed to have the .h in the filename for the include?
i mean, like
#include <iostream>
as opposed to <iostream.h>
just something to try if you havne't already
~L
|
|
|
|
|
I believe that I read somewhere that leaving the .h off of the header file for the #include means that you'll use the new C++ runtime library while using the .h means you're using the older version.
I think I may have found the problem...all of those errors I was getting occured in the header files, iostream.h and iomanip.h....I found this at the top:
#if !defined(_WIN32) && !defined(_MAC)
#error ERROR: Only Mac or Win32 targets supported!
#endif
So, it looks like I need to make this a true Win32 project though I am already using a Win32 console application. Hmmmm.
|
|
|
|
|
You aren't getting that error so that isn't the problem.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
JohnnyG wrote:
I believe that I read somewhere that leaving the .h off of the header file for the #include means that you'll use the new C++ runtime library while using the .h means you're using the older version.
That is right - the old one does not use namespaces. If you include both in different parts of a project, and use namespace std in it's entirety, then you'll have that namespace collision because you've loaded the same library twice, once with and once without namespace protection, but then using namespace std; blows it away.
You should NEVER use iostream.h or any other .h header where the name alone ( #include iostream for example ) works. you should only put using statements for what you use, using std::ifstream for example.
JohnnyG wrote:
So, it looks like I need to make this a true Win32 project though I am already using a Win32 console application. Hmmmm.
Bollocks. I use iostream constantly, in Win32, in MFC and in ATL. I think you got the header right somewhere and wrong somewhere else. Make sure you only include the non .h headers, and do it in stdafx.h if possible. Put using statements only for the things you use. Then let me know if you still have the problem.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Thanks!! I got it working. Took your advice about including "stdafx.h" and used the using keyword sparingly as needed.
|
|
|
|
|
Great - glad I could help.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Hello,
My visual studio just crashed on a compile and when I re-opened the project it says unable to load class information. class view information file could not be opened, or something like that.. How do I get the class view info back?
Thanks
|
|
|
|
|
In your project folder, there is a file named *.clw (this is the class view file). Simply rename it to something like *_bak.clw (to have something backup). Then in your VC++ 6.0, press Ctrl+W, it will ask you whether should rebuild the class information. Answer yes and you'll get your class view back.
Good luck!
|
|
|
|
|
I tried that first and for some reason it still isn't loading the class info.. weird.. I'll do some more playing. If you can think of anything else please let me know.
Thanks
|
|
|
|
|
have you added every file in your project to build the *.clw?
|
|
|
|
|
do you have two copies of the same workspace open in two different VS instances?
-c
"Should you not have a ramekin of sea salt beside the stove, you don’t deserve oatmeal."
Dean Allen
|
|
|
|