|
CFileDialog dlg (false, _T ("txt"), _T ("*.txt"),OFN_FILEMUSTEXIST|OFN_HIDEREADONLY, "");
dlg.DoModal();
greatest thing is to do wot others think you cant suhredayan@omniquad.com>
messenger :suhredayan@hotmail.com
|
|
|
|
|
Hello !
I've added an ActiveX in my project via the Project -> Add to Project -> Components and Controls dialog. I want now to remove this activeX (so not only the files but also the icon that appears in the controls for the resources.
Is it possible to do such a thing ?
Thank you
|
|
|
|
|
I am planning to control my new model railway layout from my laptop using purpose built software. I have had a quick look at the hardware section on the board and got some good 'pointers'.
When I get it up and going I will start with RPC kits from MERG (www.merg.co.uk) and Graham Plowmans software (www.gppsoftware.com) but I want to move to my own software and probably build my own track circuits and point/turnout control boards.
Do any of you have any experience or directions on where I might find good foundation algorithms?
Ger
|
|
|
|
|
I would like to implement a rectangle tracker with some desired properties over a loaded image window ? How can I implement this and is there already implemented code like this ?
Good days
|
|
|
|
|
When I try to run the dynamically creating Pen comman it returns NULL pointer, What can be the reason ?
Pen* mypen = new Pen(Color::Gold, 3.0f);
|
|
|
|
|
It seems that either you have run out of memory, or the GDI+ isn't supported on the platform you are running on!
Supported platforms (from MSDN)
Windows 98/Me, Windows XP, Windows 2000, Windows NT 4.0 SP6
Ant.
|
|
|
|
|
Either options seem to be not possible, I can not understand this kind wierd behaviours of Visual C++ !
|
|
|
|
|
Hi...
Can somebody pls tell me what these codes do?
==============================================
int size = 5;
vector<int> ** abc; //Create 2d vector???!!!
abc = new vector[int] * [size];
abc[0] = new vector<int> [size * size]
for (int i=1; i<size; i++)
{
abc[i] = abc[0] + i * size;
}
for (int i=0; i<size; i++)
{
for (int j= 0; j<size; j++)
{
abc[i][j].pushback(0);
}
}
================================================
And in the end...how big is the abc array and what is d size of abc[0][0]? Is the code correct in creating a 2d array of 5x5 matrix?
Pls suggest anythg...I'd appreciate it very much...
Thank you...
|
|
|
|
|
You want a two-dimensional array of int s?
You can declare it as vector < vector < int> > abc;
You can subsequently access the elements as abc[i] [j] ,
with i running from 0 to size(abc)-1 and j running from 0 to size(abc[i])-1 .
As a general rule, just remember that abc is one dimension, and the oter dimensions are abc[0], abc[1] and so on. They are independent from each other, epecially can they have a varying lenght.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Use boost::multi_array . It provides a lot of procedures to manage multidimensional arrays and it's safer than vector of vectors, vector with size*size length etd.
See Boost home page.
Robert-Antonio
"CRAY is the only computer, which runs an endless loop in just 4 hours"
|
|
|
|
|
Anybody know how to type unicode characters like arabic, chinese, korean etc directly into an edit box.
I am using windows XP with unicode languages support. I want to paste the unicode text i copied from character map to an edit conrol. But the edit control show junk.
|
|
|
|
|
You should be able to enable your OS IME (Input Method Editor) from the regional settings in the control panel. This allows you to input foreign characters by providing the appropriate input interface for the given language.
I Dream of Absolute Zero
|
|
|
|
|
yes... i have done it already...
but if i copy/paste those arabic or chinese text to a windows standard edit control it only shows junks ("?_?") not the real text...
|
|
|
|
|
Manikandan wrote:
only shows junks ("?_?") not the real text...
Ok.
Then I think the problem is making sure you are using a font that can correctly display the appropriate unicode characters.
For example: Courier will not show asian character types (you will just see either a bunch of square blocks, or question marks). However if you display the same using Tahoma, and you have the language packs installed, it should show up correctly.
Not all fonts cater for unicode characters, you may have to experiment to see which ones do.
I Dream of Absolute Zero
|
|
|
|
|
Hi,
since i was programming in VC++ 2 years ago, i tried some other languages like Delphi,C#,and a lot of web programming so i lost my C++ knowledge a little (maybe to much )
anyway, one of the most important question i need to know is : Where/how do u know if u have to use pointer instead of simple class declaration ? ex:
when do i need to choose between : CFile pFile; or CFile* pFile;
Thanks
Jonathan
|
|
|
|
|
one obvious reason is when you want to allocate ur object in heap you have to use pointer
greatest thing is to do wot others think you cant suhredayan@omniquad.com>
messenger :suhredayan@hotmail.com
|
|
|
|
|
or you want to allocate some resource dynamically.
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
so if i'm understanding :
EX :
CRect rect;
GetWindowRect(&rect);
this will be use to associate the rect variable.
////////////////////////////////////////////////////
CRect* rect = new CRect(0,0,100,100);
Thanks
|
|
|
|
|
Hi,
I read in some book, that every modal dialog based application, creates two message loops, one for caller and other for dialog box itself. Is this correct?? If so, how it is implemented?? How many threads (UI or worker) theads does the SDI & MDI application have??
Thanks and Regards,
Satya
|
|
|
|
|
From my knowledge and the books that i have read, there is always one message loop / thread.
by default there is one thread/sdi or mdi or dialog so only one message loop.
worker initially does not have a message loop. Message loop is created dynamically by windows only when that thread needs one.
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
Yes that absoutely correct Mr.Prakash. U don't have to go long way. Just read Threading in Jeffery Richter book. It has all in it.
cheers!
siddharth
|
|
|
|
|
Yeah i have that book
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
What you said is true for message queues, not message loops. You can have many message loops. Each thread can only have one message queue.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
yeah, in my application also there is one main message loop and few other make shift message loop.
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
You can have as many message loops in your thread as you wish. I commonly have three or four. Another question is how many message queues can a thread have. The answer to that is only one.
When you display a dialog (using standard Windows), it uses it's own internal message loop to process the message while your main application has the primary message loop used for normal processing.
Often, when an application needs to process messages during an operation that will take a lot of time, another message loop is used to pump the messages from the message queue.
So as you can see, you can have many message loops. But you usually only worry about the primary message loop.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|