|
Denial! That's what they all do.
Not guilty, they plead.
But Buster ain't gonna be happy with that.
I need evidence man, solid proof.
Now!
Ladies and gentlemen, this is the CP security force takin' over from here on.
nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Oh yeah ?
Show me the evidence that I was there buster.
Then we'll talk.
|
|
|
|
|
I have been searching for a 'SDI tab view' (something similar to Excel tabs, either at the top or the bottom of the window) for a while now. I found some on the Code Project website, but these are either MDI or can't resize.
Can anybody tell me, where I can find something like that?
Thank You
XP
|
|
|
|
|
By SDI you mean all views point to the same document ? Surely it would be trivial downgrade the code on CP to work that way ?
Personally, I think I'd use a formview, and a tabctrl if I wanted one document, and many selectable views.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
Does a tabctrl work on a view? I thought it will only work on a dialog?
LP
|
|
|
|
|
A view is just a window, and a formview is built on a dialog template.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
I've declared a worker thread as a static member of a given class:
UINT MyClass:Mythread(LPVOID pParam)
{
pParam->MemberOfMyClass = TRUE;
}
Then I begin the thread of execution:
m_hInputThread = AfxBeginThread(Mythread, (LPVOID)this);
I'm not sure exactly how I can provide AfxBeginThread access to the this pointer. I need to provide the worker class access to the members of the class.
Help and thanks in advance!
Philip
|
|
|
|
|
UINT MyClass:Mythread(LPVOID pParam)
{
MyClass *pClass = (MyClass*) pParam;
pClass->WhateverFunctionHere(...);
}
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Ahhh, that makes sense. Just to be sure, I would pass the object as follows, correct?
AfxBeginThread(Mythread, this);
thanks,
Philp
|
|
|
|
|
scgadgets wrote:
Ahhh, that makes sense. Just to be sure, I would pass the object as follows, correct?
AfxBeginThread(Mythread, this);
Yes. That's correct.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
From
char* cMyVar = "megabonus";
I want to copy the 3 first chars to
char myother[2];
But how?
I tried strncpy(...) but it's not the right function... or..
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
You need a 4-character array.
char myother[4] = {0}; // init to all zeros
strncpy ( myother, cMyVar, 3 );
It's important to init myother to all 0 because strncpy does not append a terminating null when the source string's length is equal to or greater than the # of chars you want copied (3 in this case).
--Mike--
#include <witty-sig.h>
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Hi,
I have following problem:
UINT CMyWorkerThreadsCoolFunction(whatever)
{
SerialFlowOfDataSusceptibleToHung();
}
<\pre>
I wanna let the user define the time interval between moment 0 and moment x he is ready to wait. Depending upon this he gets more or less data.
Question: how to achieve this?
Thanks
Pepe
|
|
|
|
|
Sleep (time_in_ms);
????
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Thanks for your answer, I must have not been clear enough, sorry for it.
This is all about communication over the serial port.
SerialFlowOfDataSusceptibleToHung() is a data stream from the external device, and it is itself completely blocking the worker thread from which the given read operation was issued, as a result of which another blocking command like Sleep(ms) is no solution to this problem.
In the majority of cases all the data can be read from the device in less than a second, but unfortunately in case the read operation hungs or slowly executes, the worker thread does not return for a long time.
My prog uses time sharing of the serial port between several worker threads (a command from one thread can only be issued after the previous from another thread has been completely executed, and thus the port has been freed)
If one of my threads blocks the port, all the communication of my other threads with the device is impossible.
That's why I wanna limit the maximum time of one thread blocking the one and only communication channel.
Limiting the time of a read operation does not affect the average thread, because it usually terminates quickly. But in case of a trouble (slowed down read) the user receives a little less data, but does not have to wait too long for it.
Thats why I wanna find a solution to limit the time of execution of blocked threads.
Thanks in advance.
Pepe
|
|
|
|
|
I want to define 'Font' and it's style with GDI+
Can anybody give me an example?
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
I am developing Messenger in VC++ as my Final year Project. This messenger will applicable on LAN. I need help in a sense that how I should start work. Is there any body who will help me in this project. remember that I m developing it in VC++.
|
|
|
|
|
Hi all!
I'm at the choosing stage.
Next I'll learn one of them thoroughly.
Which should I choose, wanting long term investment, some game programming fun, and also general graphics programming excellence.
So, my esteemed collegues, what is the choice
that Experience whispers to your ears ?
Thanks!
Antoine
"The world is not enough" -Ian Flemming
"What becomes of whiteness, when the snow has melted?" -William Shakespeare
|
|
|
|
|
My opinion: DirectX
Because I feel OpenGL is somehow fading out, and DirectX has become _much_ better (than it was before). Most gamers are using Windows anyway...
Sprudling
|
|
|
|
|
Easy to learn and get started:
OpenGL (I hear the DX is getting better)
Portable:
OpenGL
Most advanced and will stay that way:
DirectX
However, OpenGL implements extensions that provide most if not all the same functionallity. However, these extensions are vendor specific and many times are VERY hard to locate documentation.
Programming for the X-Box:
DirectX
Driver quality:
???? (Someone else can answer this)
What are game programmers using:
DirectX mostly. Some are still doing OpenGL, but the non-Windows market is pathetic so I really don't see the advantages.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Thanks for the reply!
I got the impression that I'd be better with OpenGL since
it's platform independant.... ¿
Regards,
Antoine
Coming home from Vancouver. I look like a hobo! lol
|
|
|
|
|
If you are going to be porting to Mac, Linux, etc, then yes. Otherwise, if you are only going to developing for Windows, then portability really isn't a concern.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Hi,
I am going to use SHBrowseForFolder in my application. Is there any dependency issues with this? Will it automatically work on Windows 95 onwards?
Thanks Again
Rich
|
|
|
|
|
The API works on all OSes, however not all of the flags do. MSDN lists which flags are suppoted on which OSes.
--Mike--
"Everyone has figured out what 'service pack' really means, so they had to go and change the language. Perhaps this is what Bill was talking about in the 'security is top priority' letter."
-- Daniel Ferguson, 1/31/2002
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
I have two buttons in my toolbar,that have the same identifier with two menu,
I've overriden ON_COMMAND and UPDATE_COMMAND_UI for both of them,
in UPDATE_COMMAND_UI I used SetCheck(),
when I run my application menus update correctly
buttons don't,any suggestion?
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|