|
I don't get template-related syntax errors when compiling the code in VC6 after simply changing the parentheses to brackets...there is a missing semi-colon after B<c>* b in struct A, but other than that, no problems. (I'm able to create instances of the structs, too; link and running is no problem.)
Walter Gildersleeve
Freiburg, Germany
walter.gildersleeve@pe-gmbh.de
|
|
|
|
|
Hi there,
I am trying to add a small table to my MFC application. I want this to be kind
of like Excel cells, except for I don't want to use Excel. I want to be able to
draw the border lines and also be able to edit the code within each cell.
Being able to extend the width is not necessarily an issue.
Is this possible? What class should I subclass from? I tried using CRichEditView
and CEditView since they seem to be the only ones that allow editing, but drawing
on these wasn't possible, at least within my knowledge.
Could you give me some tip on this.
|
|
|
|
|
You need Chris Maunder's grid control, available on this site. ( at least I seem to recall it was Chris's )
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
or u could subclass a listview control to allow editing in any cell
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
I am trying to get some kind of multiline on my CButton. I am using this to center my text:
case vxCBMiddleCenter:
if (m_bMultiLine == TRUE)
{
pDC->DrawText (Caption, ControlRect, DT_WORDBREAK);
}
else
{
pDC->TextOut (Window.Width() / 2 - csSize.cx / 2,
Window.Height() / 2 - csSize.cy / 2,
Caption);
}
break;
Of course I have different case's for the other alignments on my CButton. I am using TextOut to write my CString (Caption), but I can't find a way to break to another line if I cross the Rect (Window) bounds. DT_WORDBREAK will work in my CString contains spaces (This is a test...), but how do I get this (ThisIsATest...) to break to the next line?
Thanks,
Chris
|
|
|
|
|
call DrawText with the DT_CALCRECT flag and the width of the button set ... then get the size of the bounding rect ... then figure out (using GetTextExtent) how many chars will fit on a line (u can use the average font char width to get a rough approx) ... then draw the text in 2 or more goes using what will fit on each line
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
Is it possible to split a view so it looks like this:
-----------------
|A |B |
| | |
| | |
| | |
-----------------
|C |
| |
-----------------
view a, b, c,... and can I split view B again, and so on....
if so how???
Peter Marino
|
|
|
|
|
u can split views in very twisted ways ... just check out the reuters terminal software (if you're in the financial markets) ... i've never seen so many splitter windows on one screen but surprisingly it is easy-ish to use
so how to do it? heh ... use CSplitterWnd::Create() instead of CSplitterWnd::CreateStatic() ... then use CSplitterWnd::SplitRow() or CSplitterWnd::SplitColumn() and have fun
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
it doesn't work I get an assert all the time,
SIZE s;
s.cx = 100;
s.cy = 100;
m_SplitterWnd.Create( this, 1, 2, s, pContext );
m_SplitterWnd.SplitColumn( x );
I tried using different values for x
|
|
|
|
|
Does anyone know where to find the source it IRotView, the MSDEV tool for viewing the contents of the running object table? Actually I'd be happy with any rot view app.
Thanks,
Aaron
|
|
|
|
|
Hello,
(1) Does someone know how I can display the Windows dialog for connecting a HDD to the network? (sharing it)
(2) I would also like to know how to display the Properties for a specific map (directory).
Cheers,
Henrik
|
|
|
|
|
Does anyone know how to use the ADO DataGrid Control or has an example on how to use it in Visual C++
|
|
|
|
|
See my home page under Software:
http://userpages.umbc.edu/~bcorfm1
|
|
|
|
|
How i get a control over the GetScrollPos() return values?
|
|
|
|
|
...you can minimize the size of a whole mfc program, for my program, it takes ~1,5 mb just for a small hello world app, grrrr
so my question is : how do i have to setup my project options to minimise the size of the program ?
please help me
|
|
|
|
|
goto the 'general' section and then 'tips' here on codeproject ... there are several articles on exactly what u are looking for
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
Usually the release version is much smaller when options set to MINIMIZE-CODE.
But when you want to have very small code than there is no better way then using raw WinAPI.
( WinAPI "Hello world" is about 25k - so any more question about MFC *ggg* ! )
Greatings Mario ///
----------------------
www.klangwerker.de
mario@klangwerker.de
----------------------
|
|
|
|
|
well, ok, but the .exe file size doesnt matter to me
i think about all those dll files (mfcu42.dll,.........)
so, my question is "If i want to give my program to a friend, what do i have to do for the smallest size possible" , do i always have to give him the dll files, or is there any special option that reduces the project files to one , maybe two dlls ?
PLease help :P
|
|
|
|
|
Well, unless you are using the Learning Edition, you can compile staticly, it will create one large application (not counting the use of new versions of common controls and ActiveX).
|
|
|
|
|
Does anybody know how to develop pseudo-printer driver like Adobe Acrobar Writer?
|
|
|
|
|
you would need the windows ddk (device driver kit) and a generic printer driver skeleton ... then the icky work would start ... sheesh ... isn't it just easier to buy adobe acrobat?
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
Hi. I need open a txt file to an user can modifies it content (the option "save as" have to stay disabled) How can i do open a file which only have "save" option enabled? Thanks.
|
|
|
|
|
ummm ... assuming u mean in an mfc mdi or sdi app with a file/save and file/save as menu option on it ... just remove the file/save as option in the resource editor
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
In order to create a worker thread from a member function you need to make it static. Making it static prevents it binding to any instance of a particular class. Given this, how do I access the member functions or variables of my class from within the thread function?
For instance, if I have the thread function below, how would I update a dialog control or status bar with the threads current progress or even access a member variable?
// Static thread function
UINT CDemoDlg::ThreadFunc( LPVOID pParam )
{
// DO: Time consuming thing
// Update dialog control
// or update status bar etc?
return 0;
}
What is the standard procedure for dealing with such things? Some kind of polling a non-member global variable or is it possible to resolve the scope of a class member variable or function from within a static member function??? My attempts to do the latter failed would you believe
Thanks...
|
|
|
|
|
Hmm, helps to check the articles list before posting a question that is already covered there huh?
Apologies to all!
|
|
|
|