|
This doesn't directly address your problem but it is a potential problem with your code. In general you should ***NOT*** use CreateThread to create a thread if you're using the CRT in the thread. But don't take my word for it, see here[^] on MSDN. Here's a quote:
"A thread in an executable that calls the C run-time library (CRT) should use the _beginthreadex and _endthreadex functions for thread management rather than CreateThread and ExitThread; this requires the use of the multi-threaded version of the CRT. If a thread created using CreateThread calls the CRT, the CRT may terminate the process in low-memory conditions."
This is one of the most common mistakes; seasoned programmers often do it.
Steve
|
|
|
|
|
Hi All,
I'm pretty new to C++ programming that too VC++/MFC/Win32. I just tried using the CAnimationCtrl class to play some video file. I created a window which shows the video file in a full screen mode with some controls to play, pause and so on.
The video is playing fine, thanks to the class. But when the video is playing if any pop up or message box comes in the way of the screen, the area where the popuup or the message box is displayed gets blocked and the video at that portion is not visible.
Also if multiple windows are there and if i traverse from the video screen to some other window and come back, since the whole screen is blocked by someother window the whole screen(video) is blocked and i'm unable to see anything.
Sometimes if i shake the screen a bit then the video is visible and at times that doesn't work too.
If anybody faced a similar such issue and if there is any solution, please reply back to this message.
Thanks for your response in advance.
V V S
|
|
|
|
|
Hi,
I am using combo box in my WIN32 application and adding data at run time. Now I am not able to set height of list of that combo box during drop down position. Like even if I add 10 items in my combo box it shows only 2 items at drop down position and I have to scroll to see other items. I want to show at least 5-6 items in drop down position. Can I know how can I do this?
Thanks in advance,
Priyank.
|
|
|
|
|
In the resource editor, if you click on the arrow of the combo box, you'll be able to resize the height of the list (and not of the control).
|
|
|
|
|
Hi all
Can anyone pls tell me whats the Win32 equivalent of CPtrList . My application does not support MFC . I want non-MFC one ...
redindian
|
|
|
|
|
It depends what you are really doing with the CPtrList but maybe you can use a container class of the STL (the Standard Template Library) ?
Why not use std::list ?
|
|
|
|
|
U can use STL
It is better to use vector or list with void * as container
But it will not support for Cobject functionality
|
|
|
|
|
san123pune wrote: It is better to use vector or list with void * as contai
That is not very elegant because you will need to cast the void pointer back to its class when you want to delete it (otherwise, the destructor won't be called).
A better way to do that (if polymorphism is needed) is simply to have a list of pointers to the base class. So in that case when you delete all the elements of the array, the destructor will be called.
|
|
|
|
|
Hello Experts
I want to programmed a project that should be worked for ASCII as well as
UNICODE.What things i have to keep in mind.Please tell me.
I am using VS2003.
manu
|
|
|
|
|
I think u shd not use char * as it is not supported to UNICODE
Either use CString or TCHAR
Only this much I know
|
|
|
|
|
TCHAR is not UNICODE. it is only if UNICODE is explicitely defined. otherwise, it is ANSI char...
but it is the stuff to use
ps: stop typing as SMS. you are on a forum which plenty of people don't speak englisk naturally, so give them a chance to understand you
|
|
|
|
|
Sorry Buddy
|
|
|
|
|
no problem dude, i just noticed, for the benefit of other readers who have this bad habit too
and please keep smiling, there's nothing bad; life will be better for every one
|
|
|
|
|
In a good mood today, tox'?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
Roger Stoltz wrote: In a good mood today, tox'?
still the morning here...
|
|
|
|
|
|
|
Hello,
I want to start a vector of calsses with the same contruct
Lets say this is my class :
<br />
class aaa<br />
{<br />
public:<br />
aaa(int i){ m_iA = i; }<br />
private:<br />
int m_iA;<br />
};<br />
and I want now to do 5 classes with the same contruct:
<br />
aaa* f = aaa(2)[5];<br />
I have to do a loop for this (pointer of pointers etc.) ?
Or it is possible to do this somehow in a short way ?
Thanks,
|
|
|
|
|
Ohad Cabiri wrote: I have to do a loop for this (pointer of pointers etc.) ?
In fact if you don't have a default constructor, the only way to do that is to have an array of pointers to your class:
aaa** pArray;
...
...
pArray = new aaa*[5];
And then loop through your array and create all the classes:
for (int i=0;i<5;i++)
pArray[i] = new aaa(Value);
Of course, you will need to delete all these instances AND the array.
|
|
|
|
|
So there is no shortcut here.
Thanks
|
|
|
|
|
If a statically-allocated array is acceptable, you can do:
aaa stuff[] = { aaa(2), aaa(2), aaa(2), aaa(2), aaa(2) };
|
|
|
|
|
Hi,
I am using IADS component to query about the user information from a local machine.
Sometimes, When i call ADsGetObject method, it takes more time to query about the user. But some times it happens quick.
I am querying about an user who is created in the local machine.
What is the reason for this? How can i solve this problem.
Any help would be very much appreciated.
Thanks.
Selva
|
|
|
|
|
Hi,
I want to write some application that looking some file name ( "file.exe" or *.exe ) on the entire disk.
Can some one help me ?
|
|
|
|
|
Some please can help me with this one ?
|
|
|
|
|
Hi,
There are two APIs for searching a folder
FindFirstFile & FindNextFile
or there is an MFC Class CFileFind, which is almost like a wrapper to above mentioned APIs. you can go through the documents of these APIs.
bye
P.Somasundaram
|
|
|
|