|
|
I am currently confused as to which control I should be using in my dialog.
The control is to display information as steps are completed. I want it to have the following capabilities.
1. Output only.
2. Multiple lines.
3. Add lines one at a time.
4. Handle different fonts.
CEdit - 1, 2 and 4
CStatic - 1 and 2
Am I missing something? Can one of these controls do all I want? Or is there another control that can do whatI want?
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
"Don't belong. Never join. Think for yourself. Peace"
- Victor Stone
|
|
|
|
|
I do that with our console in Win32 like this:
::SetFocus (editControl);
::SendMessage (editControl, EM_SETSEL, (WPARAM)length, (LPARAM)length);
::SendMessage (editControl, EM_REPLACESEL, 0, (LPARAM) ((LPSTR) str.c_str()));
::SendMessage(editControl, EM_LINESCROLL, 0, (SendMessage(editControl, EM_GETLINECOUNT, 0, 0)));
Essentially I select the caret position at the end, and replace it with the text I want to append, thus adding a line. I also catch the message that tells me the edit is full and trim from the top to make room at the bottom, but I've not shown that. The last line scrolls the edit box down to the line I just added.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
If you need (4), you'll have to abandon CEdit and CStatic. I think you should use CRichEditCtrl or custom-draw CListCtrl.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I want get the data of cell(X,X) from a Excel document ,how to implement the COM object?
Please pardon my weak English!
|
|
|
|
|
|
Thanks a lot,I got it!
Please pardon my weak English!
|
|
|
|
|
This is a great article located here:
http://www.codeproject.com/combobox/customcombo.asp
Its a CListBox. Can someone, anyone help me make it variable row height? Some of my text is really short, just one (1) line? Some of my text is really long, 3-6 lines. How can I make it variable row height?
Please, please, please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
Will this do?
http://www.codeproject.com/useritems/changerowheight.asp
|
|
|
|
|
|
Anyone know how I could set the Zorder of my window or how i would go about setting an application or window behind the desktop icons?
Any ideas, theories or opinions would be great,
Ryan
|
|
|
|
|
Hello, the codegurus around the world.;)
I'm curious why you need this kind of capability in your application?
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
im going to make a custom desktop for myself. And was just wondering if their was away to get the desktop icons to still show. Its not a big deal I will probably just make it go full screen over my desktop.
Pretty much going to make something like Stardocs ObjectX or DesktopX
|
|
|
|
|
No, for two reasons. 1) The desktop window is the parent of all top-level windows, and 2) The desktop is a list control - the icons aren't on their own plane in the Z order.
--Mike--
http://home.inreach.com/mdunn/
"The Earth is doomed." -- Rupert Giles
your with and
|
|
|
|
|
Hi,
I just installed the latest Platform SDK, aug 2001 release. I've integrated it in Visual C++ 6.0 by adding the SDK include and lib directories before the old ones, like the documentation says. But i still can compile code using the UpdateLayeredWindow function it still give an error C2065 "UpdateLayeredWindow" : undeclared identifier.
What is wrong ? Any clues ?
Best regards.
Johan Janssens
JJanssens@mail.ru
|
|
|
|
|
That's a Win2000 function ? Have you set WinVer properly ? If you don't do the #defines to say you're compiling for Windows 2000, it's probably being #ifdef'd out.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
|
A comment on the part of the FAQ addressing the SDK Update vs. full download via FTP: It's possible to download the full SDK from the ms site. At http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ you just click "Full Download" in the menu band. The rest is trivial.
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Thanks, Steen. MS must've added that full download link recently; it wasn't there when I first went to the SDK Update site.
--Mike--
http://home.inreach.com/mdunn/
"The Earth is doomed." -- Rupert Giles
your with and
|
|
|
|
|
Sirs,
this is my first COM adventure so I need your advise.
I have an in process server with lots of interfaces and even more methods in it.
The manufacturer of the dll provides a sample code snippet of how to get pointers to all the interfaces:
//First object
HRESULT hr = ::CoCreateInstance(...
if ( !FAILED( hr ) ) {
//First interface
hr = pIUnknown->QueryInterface(...
if ( !FAILED( hr ) ) {
//Second interface
hr = pIUnknown->QueryInterface(...
if ( !FAILED( hr ) ) {
//Third interface
hr = pIUnknown->QueryInterface(...
if ( !FAILED( hr ) ) {
...
//Here comes the code that uses the interfaces
...
} else {
...//Third interface failed
}
} else {
...//Second interface failed
}
} else {
...//First interface failed
}
} else {
...//CreateInstance failed
}
Why are the QI calls NESTED? I tried putting them after each other but the same code taken from the nested structure didn't work (Runtime library: abnormal program termination) although all interfaces were succesfully created.
I would like to create the appropriate interfaces in my dialogs' OnInitdialogs and release in the OnDestroyWindow. Is that possible? Any sugggestions?
Thanks for your help in advance.
Bunburry
A subject that is beautiful in itself gives no suggestion to the Artist. It lacks imperfection. (O.Wilde)
|
|
|
|
|
Hi all!
Let's say I have 5 combo boxes in 1 dialog box. Instead of having 5 different functions to control the OnSelChange() events of those combo boxes, can I just have 1 function to handle all 5 combo boxes?
I guess what I am asking is that if there exists a function call so that you can tell which one sends the request.
Thank You
Vu
vucsuf
|
|
|
|
|
You can call CWnd::GetCurrentMessage() which will return the MSG struct for the notification message. Combobox notifications are sent with WM_COMMAND, so you can grab the control ID/HWND from wParam and lParam.
--Mike--
http://home.inreach.com/mdunn/
"The Earth is doomed." -- Rupert Giles
your with and
|
|
|
|
|
Hello, the codegurus around the world.;)
The other way is that you create only one OnSelChange(), and assign this
function inside the message map. That is, all five ComboBoxes share one
OnSelChange(). (Or create your own function associated the message)
And, we can check which ComboBox get the input focus when this message
is checked.
I guess that this works.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
Hello, i am trying to begin in Win32 programing and wondering where some good win32 resources are to help begin in it (not books). And if you know a really good book on it please let me know, although im primarly looking for web (free resources) since i dont have $60+ to shell out.
Also MFC but i think its a good idea to learn win32 before mfc.
|
|
|
|
|
I don't think it's so great to learn Win32 first, I found it better to go back and learn Win32, now I appreciate all the ways MFC made it easy to learn by simplifying tasks. A bit like Stroustrup saying you should learn C++ before C ( not that I've ever done C ).
However, THE Win32 reference is Programming Windows by Charles Petzhold. You'll have trouble finding much on Win32 on the web, it's 99.99% MFC. I know, because we're not using MFC in our current project, and my only sources of info are MSDN, Petzhold and asking questions here. Not many articles are helpful because they all use MFC.
Windows Developers Journal is a good source of Win32 info, they rarely print MFC articles, except in their annual MFC issue.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|