|
We need a bit more information. Are you using CFormView? What criteria do you want to use to determine the size used for each view?
|
|
|
|
|
I figured one way out already, but thanks for replying. The way I am doing it I have a seperate Child Frame class for each document type. Then i just modify the window's size in the Child Frame's PreCreateWindow function. If you know of a better way to accomplish this, though, feel free to let me know! Thanks again!
|
|
|
|
|
If you are using CFormView, probably you can use ResizeParentToFit() in your OnInitialUpdate().
|
|
|
|
|
I am using a HP-Jornada 420 Palm/PC and was wondering if it is possible to display the QWERTY keyboard (the one at the bottom of the screen) when I set focus on an edit box (or if the user presses an onscreen button).
I thought I saw a function call to display/hide the keyboard, but I can't find it - anybody help.
Joe.
|
|
|
|
|
This was posted on the CE mailing list a while back by David Baldauff:
#include <aygshell.h>
BOOL CInputPanel::Show(BOOL bShowThePanel)
{
SIPINFO siThePanel;
memset(&si,0, sizeof(siThePanel));
siThePanel.cbSize = sizeof(siThePanel);
if ( SHSipInfo( SPI_GETSIPINFO, 0, &siThePanel, 0))
{
if(bShowThePanel)
siThePanel.fdwFlags |= SIPF_ON;
else
siThePanel.fdwFlags &= ~SIPF_ON;
return SHSipInfo( SPI_SETSIPINFO, 0, &siThePanel, 0);
}
return FALSE;
}
|
|
|
|
|
Do I need to link in some library because when I compile the sample I get the following error:
--
Deleting intermediate files and output files for project 'TestCeDlg - Win32 (WCE SH3) Release'.
--------------------Configuration: TestCeDlg - Win32 (WCE SH3) Release--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
TestCeDlg.cpp
TestCeDlgDlg.cpp
Generating Code...
Linking...
TestCeDlgDlg.obj : error LNK2001: unresolved external symbol _SHSipInfo
WCESH3Rel/TestCeDlg.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
TestCeDlg.exe - 2 error(s), 0 warning(s)
--
Thanks for your help so far.
Joe.
|
|
|
|
|
Hello to all programmers out there !!!
I have a CListCtrl with 5 column headers and single select option. When I want to select a line I can
only use the first header. How can I make it so that when I click on the last header (or any of them) the line gets selected ???
Thanx in advance for any help
Have a nice day !
|
|
|
|
|
Set the full-row select style of the list control. Unfortunately, you can't set this in the dialog editor, so you have to do it with code:
mylist.SetExtendedStyle ( LVS_EX_FULLROWSELECT );
You need v4.70 or greater of the common controls for this to work.
|
|
|
|
|
Hello,
I need a fast algorithm to sort a CTypedPtrArray, that is, the pointers it
contains. Here is roughly the class which is stored in the Array. It's
called CClient:
class CClient{
public:
CClient();
~CClient();
ULONG GetID(){return m_ID;};
CString GetName() {return m_Name;};
private:
CString m_Name;
ULONG m_ID;
}
Now in my code I attach to a given datasource (which contains quite a large
amount of data) and start adding new CClients to the array. I would like to
know what is the most effective way to insert each new CClient pointer so,
that the items in the array are sorted descending by the m_ID member
variable of the CClient class.
Thank you for your time.
|
|
|
|
|
Hi,
This won't answer your question but why don't you just use the STL. The STL has some very efficient
sorting algorithms that I think you will find useful. If you don't know STL, I think you can get up to
speed in just a few hours. If I had to do anything like this I would prefer the STL over the MFC collections.
sayed
|
|
|
|
|
What is the best way to go about implementing a dropdown combobox as the edit mode in a listview? Ie. when the listview gets the LVN_BEGINLABELEDIT. Should I track the mouse position and create the combobox based off the mouse position? Should I go ownerdrawn? Or should I try and piggyback the combobox off the positions of the edit control. Thanks..
|
|
|
|
|
I got a problem with the STL.
It seems like the names coming from the STL are to long for the browse information.
So I need a easy method to get rid of the warnings because they are about 100 and still growing.
c:\programme\microsoft visual studio\vc98\include\list(176) : warning C4786: '?rbegin@?$list@PAVCOCIStatementHandle@@V?$allocator@PAVCOCIStatementHandle@@@std@@@std@@QAE?AV?$reverse_bidirectional_iterator@Viterator@?$list@PAVCOCIStatementHandle@@V?$
allocator@PAVCOCIStatementHandle@@@std@@@std@@PAVCOCIStatementHandle@@AAPAV4@PAPAV4@H@2@XZ' : identifier was truncated to '255' characters in the browser information
i:\eldis3\bib_source\eurotools\eflist.h(45) : see reference to class template instantiation 'std::list<class cocistatementhandle="" *,class="" std::allocator<class="" *=""> >' being compiled
i:\eldis3\bib_source\dbaccess\ocidatabase.h(147) : see reference to class template instantiation 'EFList<class cocistatementhandle="" *="">' being compiled
Thank you
|
|
|
|
|
put this line just before you #include the STL headers:
#pragma warning(disable:4786)
likewise, you can suppress any warning by just changing the number in this pragma.
-c
|
|
|
|
|
You could try to put the following line at the start of the source file.
#pragma warning(disable:4786)
This only works for the Microsoft C++ compiler. But beware - this doesn't always work. This is a bug in the compiler - Microsoft admit to this - see this link: http://support.microsoft.com/support/kb/articles/Q167/3/55.ASP.
So - no help from Microsoft here.
Good Luck.
|
|
|
|
|
hi
please tell me
good bye
|
|
|
|
|
Take a look at the ATL string conversion macros. Try something like:
USES_CONVERSION;
CComBSTR bstrText(_T("String to convert"));
TCHAR* asciiText = W2T(bstrText);
Note that this uses TCHAR* instead of char* so that you can compile as unicode. Use W2A if you want to use ASCII explicitly. These functions allocate storage on the stack so don't try to access the converted string outside local scope - copy it if you want to return it from a function.
|
|
|
|
|
|
I am trying to create a type library for a 16-bit dll, but I am getting a compile error from MkTypLib.
The error message is:
fatal error M0001: Syntax error near line 9 column 29: unknown type
According to: http://msdn.microsoft.com/library/books/inole/S111F.HTM, the problem seems to be "caused by mismatched OLE DLLs".
My ODL file is:
#define PASCAL pascal
[uuid(9CE95330-3640-11d4-A110-0000C50D034E)]
library ZAPIlibrary {
[dllname("ZAPI.DLL")]
module ZAPImodule {
[entry("zapiGetVersion")]
DWORD PASCAL zapiGetVersion([in] WORD Component, [out] DWORD *Version);
};
};
The error is in the area near the end of "[entry("zapiGetVersion")]". I have tried other things and the exact position of the error varies depending upon what else is in the line but is always close to but before the closing bracket. I have tried adding other attributes such as helpsting after the entry attribute and the column specifed by the error message moves to the end of the other attributes, indicating that it is not really the entry attribute that is a problem.
I am using the following make file:
ZAPILib.tlb : ZAPILib.odl
MkTypLib /D "WIN16" /win16 ZAPILib.odl
I loaded a fresh copy of NT yesterday and still got the error. If anyone can tell me that my ODL file should work as-is for MkTypLib, then I will know that I need to search further for whatever the problem is in my system.
Thank you.
|
|
|
|
|
Does anyone have any suggestions for the following delayed clipboard rendering problem?
I created a new class derived from COleDataSource and overrided the OnRenderXXX() functions and call the new class' SetClipboard() function to register my formats, specify delayed rendering via DelayRenderXXX() for those formats and then call COleDataSource::SetClipboard(). All seems well at this point (i.e. the formats register properly).
My new class' OnRenderXXX() methods don't get called when I paste from another application. However, they DO get called as soon as I END my application (I set breakpoints in all of the OnRenderXXX()'s to verify this).
I've been following the article by Keith Rule posted at codeguru and I can't see any obvious oversights on my part.
Any suggestions?
|
|
|
|
|
Hello,
Any body knows good links or samples on Pluggable protocols and monikers besides MSDN?
thanks
Mahesh
|
|
|
|
|
Hi,
I saw your posting about APP(Asynchronous Pluggable Protocol).
I'm in same situation. I have a sample on MSDN but I can't make it "RUN" from VC++ 6.0.
It looks working in normal situation, but I can't trace the codes in VC++.
I hope to get advice to trace APP sample or similar sample in VC++.
I'm working in IE 5.5, Windows 2000 with sp1, VS with sp4.
Thanks in advance.
Regards,
Ryan
|
|
|
|
|
Hi all,
I have a dialog which has a static textbox that says "The file c:\foo\bar.txt cannot be loaded. You must decide what to do now." and a few buttons beside the textbox to present the user with the choices. There is no problem with the dialog except when the pathname is really long (i.e. 4095 characters long), then the textbox cannot include the whole sentence. What do I do?
I have think of a few ways already but these won't fix the problem:
1. Use a messagebox(but I need more buttons than just OK and Cancel)
2. Use a ellipsize function. (but I want to present the user with the full filename, that's the whole point of having another dialog box)
3. Use "Resizing text to fit in rect" in an earlier article by Jason Phillips. (but this will result in some really ugly code and break a lot of other codes)
What I'm thinking of is, is there some GUI design techniques that will solve this common problem of long filename?
Thanks in advance.
|
|
|
|
|
Instead of a static text box, I recommend you use a "Read-Only" edit box. This will still chop off the name when it's long, but at least the user will be able to scroll through it with the cursor and even copy it to the clipboard if he/she wants.
Regards,
Alvaro
|
|
|
|
|
Dear eng,
I agree; a read-only edit box is the way to go. Also, you can turn on its "Word-Wrap" style simply by turning of the Auto HScroll and Horizontal Scroll styles.
Then make it so that it looks like a listbox (as in area), so that the filename will wrap and add a Vertical Scroll bar (but turn off Auto VScroll) so theu user can scroll the text. They also get a context menu that they can use to copy text to the cliboard with!
Yours,
Brian Hart
|
|
|
|
|