|
errrrr
thats a bit vague rose
a little more info might help get an answer
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
"I have a car which is supposed to be running for an hour, but after 15 minutes, something happens. What's the cause?"
|
|
|
|
|
The reason your program only runs for 10 hours is because you are using a signed value as a message id for message passing between threads, and 10 hours is roughly how long it takes you to exceed the maximum positive value and wrap negative. Your receiving thread expects unsigned values. In essence, your problem has nothing to do with threads.
|
|
|
|
|
am i missing the original thread here?
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
OK. Good luck with it then.
|
|
|
|
|
|
Why would you DO such a thing ????
|
|
|
|
|
Hi there,
I'm trying to work with a CTreeCtrl and what i'm trying is to close all the expanded nodes when
another node is opened.
How can i do that ???
Thanks alot,
Ariel.
|
|
|
|
|
catch the TVN_ITEMEXPANDED message and close the others you want to there
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Try the TVS_SINGLEEXPAND style
Considderd to be the worlds fastest knoppenbonker.
10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute). And Experience with the man wich made the longest phonecall of the world
And experience with the one and only NewEra Guru.
|
|
|
|
|
Hi there All,
I'm trying to Retrive the Date in form of COleDateTime from a CMonthCalCtrl
and CDateTimeCtrl but not very succesfull at this.
I'm trying to Use the BOOL GetCurSel( COleDateTime& refDateTime ) const; function
but then i get an invalid Date - i tried to catch different Messages of the Above
Controls and none of them do the Job.
Can somone please Help me, Just a short Code example to see
how its done will be more than enough.
Thanks in advance,
Ariel.
|
|
|
|
|
GetCurSel uses MCM_GETCURSEL which doesn't fill in the time members in the SYSTEMTIME stucture.
SYSTEMTIME tSysTime;
m_uiCalendar.GetCurSel(&tSysTime);
tSysTime.wHour = 0;
tSysTime.wMinute = 0;
tSysTime.wSecond = 0;
tSysTime.wMilliseconds = 0;
COleDateTime dtDate(tSysTime);
Step through the code or search for _AfxOleDateFromTm in the source to see where the COleDateTime is set to invalid.
|
|
|
|
|
In my COM object with MFC support I want to install a timer:
::SetTimer(NULL, TIMER_ID, 1000, (TIMERPROC)TimerProc);
Then I declare MyTimerProc() in COM class as:
VOID CALLBACK TimerProc(
HWND hwnd, // handle to window for timer messages
UINT message, // WM_TIMER message
UINT idTimer, // timer identifier
DWORD dwTime) ; // current system time
and define as:
VOID CALLBACK TimerProc(
HWND hwnd, // handle to window for timer messages
UINT message, // WM_TIMER message
UINT idTimer, // timer identifier
DWORD dwTime) // current system time
{
// Do something
}
But I've got a compiler error:
error C2440: 'type cast' : cannot convert from '' to 'void (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,unsigned long)'
None of the functions with this name in scope match the target type
What am I doing wrong ?
|
|
|
|
|
typedef VOID (CALLBACK* TIMERPROC)(HWND, UINT, UINT, DWORD); is defined in WINUSER.H.
It looks like it depends on whether STRICT is defined - take a look at the WINUSER.H header. If not, TIMERPROC is defined to nothing, which is what the compiler is complaining about. If defining STRICT causes probs, you might try just using the straight cast.
Of course, its early in the morning, and I might be missing something... timers in COM objects... hmmm...
|
|
|
|
|
I use ICOpen to open a video compress driver, and ICCompressBegin to start to compress data, and ICCompress to encode data; but from ICCompress, I can't get the compressed data length. I think each of
the compressed video frame are different size.
using ICCompressGetSize? I always get the same value.
Some one can help me?
Thanks
|
|
|
|
|
use iccompressgetformatsize()
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
|
|
Hi,
I have a custom control CMyHeaderCtrl as a member variable in dialog, m_Header.
I am using following code in InitDialog for subclassing, but doesn't work .
CHeaderCtrl * l_Ctrl = m_List.GetHeaderCtrl();
BOOL l = m_Header.SubclassDlgItem(0,l_Ctrl->FromHandle(l_Ctrl->m_hWnd));
How shld I do it ?
Basically, the ida for subclassing is to change the color of Header control of a Report type of ListControl.
Thank you , in advance
http://sachdevs.tripod.com
|
|
|
|
|
in my code i see this
m_BitmapWidth.SubclassDlgItem(IDC_LAYERDLL_LPP_STATIC_BMP_WIDTH, this);
where this is dialog and my IDC is not 0
maybe this helps you
t!
|
|
|
|
|
Hello all. I have two questions.
First, I have an MDI application written without MFC (using strictly Win32 SDK). The children will maximize fine, but once they've been maximized, they won't restore, minimize, or close. Is there a flag that I need to set, or a message that I need to catch to get the child windows to respond appropriately?
Second, do any of you know of any good examples of creating a docking control bar using only the Win32 SDK (i.e. no MFC)?
Thanks in advance,
Jamie.
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
the first point ... check how u are maximizing it ... if it wont even close maybe you goofed up some flags
second point ... sheesh ... make life hard why dont u ... best thing i could think of is to look thru the mfc source code and see how they did it or fake it using a modeless dialog
sorry cant be of more help
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
First, I love your quote. Having been in a customer service position before my present position (I installed and maintained semi-conductor equipment before), this quote exemplifies life pretty well!
Second, the reason I'm not using MFC for my app is not to make life harder, but more to understand what's going on behind the scenes. This is a personal project, so there are no time limits (well, I suppose it ought to finished in the next 50 years or so, or I might be dead...). Just more of a curiosity then anything.
Thanks.
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
hehe .. the quote comes from bitter experience
your curiosity about windows is admirable
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Hi there,
Whats the easies and most efficient way to write into the Registry ?
I want to write into HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER keys in
which i want to open a new SubFolder(key) under "Software" folder (key)
(called : MyKey for instance) and under this folder have some properties
of kind : int, and CString.
I also want a method to retrive this data and alter it if necessary.
How can this be done ?
Thank you alot,
Ariel.
|
|
|
|