|
Does anybody know what to do to use the new Open File Dialog
that is now standard on Windows 2000 ? My app works fin on
W2000 but the Open File Dialog looks exactly the same way as
under Windows 95/98/NT.
Thanks
|
|
|
|
|
You probably need to get the latest version of the shell DLL's for each OS. which may or maynot be available in a Service pack.
==================
The original message was:
Does anybody know what to do to use the new Open File Dialog that is now standard on Windows 2000 ? My app works fin on W2000 but the Open File Dialog looks exactly the same way as under Windows 95/98/NT.
Thanks
|
|
|
|
|
In any case, it might be safer to use the old dialog box, unless you are planning to make your program only W2000 compatible. The other option is to use an OS check and open a different box for each setting...however, this might complicate things depending on how the API for the new boxes works. It may auto-detect for you, but you never know. Best thing is to get the docs from MS and then implement it.
==================
The original message was:
Does anybody know what to do to use the new Open File Dialog that is now standard on Windows 2000 ? My app works fin on W2000 but the Open File Dialog looks exactly the same way as under Windows 95/98/NT.
Thanks
|
|
|
|
|
New Open File dialog is available only on Windows 2000 and in order to use it you have to use new version of OPENFILENAME structure that is defined in platform SDK 2000 as following:
typedef struct tagOFN {
DWORD lStructSize;
HWND hwndOwner;
HINSTANCE hInstance;
LPCTSTR lpstrFilter;
LPTSTR lpstrCustomFilter;
DWORD nMaxCustFilter;
DWORD nFilterIndex;
LPTSTR lpstrFile;
DWORD nMaxFile;
LPTSTR lpstrFileTitle;
DWORD nMaxFileTitle;
LPCTSTR lpstrInitialDir;
LPCTSTR lpstrTitle;
DWORD Flags;
WORD nFileOffset;
WORD nFileExtension;
LPCTSTR lpstrDefExt;
DWORD lCustData;
LPOFNHOOKPROC lpfnHook;
LPCTSTR lpTemplateName;
#if (_WIN32_WINNT >= 0x0500)
struct IMoniker **rgpMonikers;
DWORD cMonikers;
DWORD FlagsEx;
#endif // (_WIN32_WINNT >= 0x0500)
} OPENFILENAME;
The new element of this structure that you will be primarily interested in is FlagsEx. It can be set to the following value:
<<<<
OFN_EX_NOPLACESBAR
If this flag is set, the places bar is not displayed. If this flag is not set, Explorer-style dialog boxes include a places bar containing icons for commonly-used folders, such as Favorites and Desktop.
>>>>
Regards
Andrei Zenkovitch
Dundas Software
==================
The original message was:
Does anybody know what to do to use the new Open File Dialog that is now standard on Windows 2000 ? My app works fin on W2000 but the Open File Dialog looks exactly the same way as under Windows 95/98/NT.
Thanks
|
|
|
|
|
Have a look at www.microsoft.com/msj
The "Microsoft Systems Journal" dated Aug 1999. Aticle "The logo and beyond..."
Regards
Jerry
==================
The original message was:
Does anybody know what to do to use the new Open File Dialog that is now standard on Windows 2000 ? My app works fin on W2000 but the Open File Dialog looks exactly the same way as under Windows 95/98/NT.
Thanks
|
|
|
|
|
Hi Michael,
have a look at http://www.codeproject.com/dialog/win2000fd.asp
Best regards,
Thomas
|
|
|
|
|
I desperately want a class that does a couple of specific things. It's a personal thang - I'm writing an app that will be freeware, but it's such a challenge that I'm almost willing to pay for the help! I'm tired of hunting for info, and hackiong for results. I can't get my head round the bitmap structires enough to write my own functions - hence a public request for a class.
I want it to:
~ be derived from CDC so that I can draw & blit to it, etc
~ be able to load from and save to 8,16,24 and 32bit DIBs
~ flip (mirror vertically)
Any takers?? If so, I have an existing CDIB class that does nearly all of the above and will send it to anyone who wants it.
Thank you in advance
|
|
|
|
|
The easiest thing to do would be to modify your CDIB class to use a DIBSection instead of direct memory - the only thing to change here would be the way you allocate your memory - but you probably use Global Alloc any way so that too shouldnt matter. I have a DIB class which i attach to a DibSection everytime i want to use one of the GDI functions to draw into the DIB . If you have a problem, let me know at rrajivram@hotmail.com and Ill try to send you a stripped down version which will show you the way.
Cheers,
Rajiv
|
|
|
|
|
Maybe http://www.codeproject.com/gdi/WebImageDC.asp will provide a starting point...
==================
The original message was:
I desperately want a class that does a couple of specific things. It's a personal thang - I'm writing an app that will be freeware, but it's such a challenge that I'm almost willing to pay for the help! I'm tired of hunting for info, and hackiong for results. I can't get my head round the bitmap structires enough to write my own functions - hence a public request for a class.
I want it to:
~ be derived from CDC so that I can draw & blit to it, etc ~ be able to load from and save to 8,16,24 and 32bit DIBs ~ flip (mirror vertically)
Any takers?? If so, I have an existing CDIB class that does nearly all of the above and will send it to anyone who wants it.
Thank you in advance
|
|
|
|
|
I have a RichEditCtrl that "initially" does not diplay text that is pasted into it (using my_RichEditCtrl->Paste() or by Shift-Insert,Ctrl- V). The text "is" displayed if you then obscure the window and cause a redraw.
What do I have to do to get the text to be made visible after the paste? Is it something to do with the configuration of the RE Ctrl, e.g in the Create call, or something I must do after the paste?.
Thank-you
Steve
|
|
|
|
|
==================
The original message was:
I have a RichEditCtrl that "initially" does not diplay text that is pasted into it (using my_RichEditCtrl->Paste() or by Shift-Insert,Ctrl- V). The text "is" displayed if you then obscure the window and cause a redraw. What do I have to do to get the text to be made visible after the paste? Is it something to do with the configuration of the RE Ctrl, e.g in the Create call, or something I must do after the paste?. Thank-you Steve
Dear Steve,
Offhand, it sounds like you need to invalidate the area of the control after doing the paste,
so that the new text will pop into view right away. I'm not an RE expert, but there should be a
way to do an OnUpdate() or OnDraw() call for the control, which is after all a window.
I hope this helps,
Wes Rogers
|
|
|
|
|
I am looking for a way to list the files in a project open in the IDE. I cannot seem to find the right object/method. I want to operate on the files in a macro. I need to optionally see only the "selected" files. I tried recording the action of selecting some files, right clicking them and then hitting "compile" but it basically gave me an empty function. This may be part of the VCS interface that Microsoft is holding secret.
|
|
|
|
|
I would like some generic code that opens a database lets say access, and bind it to VC. This class should not be derived from RecordSet or DaoRecoredSet.
|
|
|
|
|
The original message was:
>>I would like some generic code that opens a database >>lets say access, and bind it to VC. This class should >>not be derived from RecordSet or DaoRecoredSet.
I've been looking into ODBC recently myself and would love to see an article using the Win32 API for ODBC.
If anyone's interested in a library similar to JDBC for accessing ODBC databases, there's libodbc++ at http://www.orcane.net/freeodbc++/
Would also be interested to know if anyone has run across a library for connecting to Access without going through ODBC. I've seen one for xbase (Dbase III/Clipper) at http://www.startech.keller.tx.us/xbase/xbase.html
|
|
|
|
|
A colleague of mine and I am currently working just a thing. We are developing three C++ classes that will use the ODBC API to access database information.
The classes will be named something like:
CODBCTable
CODBCDatabase
CODBCDriver
Not exactly sure when they will be finished, depends how much time we can dedicate to the project.
|
|
|
|
|
i'm looking for a code generator
that does the following:
either software or a product that will
take a c struct definition, and generate a method with two parameters.
One parameter is an stl stream and the other is a ref to the struct.
the method would then dump the the instance of the struct into an
the stream in xml format. the element names for the xml tags
would be the corresponding name of the element in the
c struct. do you know of anything out there or a way
i can use pre-existing tools to do the job?
|
|
|
|
|
Hi
I'm very new with Visual C++ and MFC. I'm trying to write a simple expression evaluator with GUI. However, I can't find any way to write output in a way such that user can type in the next line, like cout C++. I tried to use GetWindowText, SetWindowText but the problem with SetWindowText is that the cursor will come back to point (0,0) and I can't set it to the next line of the written line. I also want this edit window can change wordwrap state dynamically like NotePad. Have anyone ever written any app like that, can you show me how to do it. Thank you very much.
Tung
|
|
|
|
|
Hi all,
I need an algorith to wildcard match two strings similar to what happens when you do a dir *.* - I`d require it to support both * and ? - nothing too fancy !!
Appreciate any help in this !!
Thanks in advance !!
Rajiv
|
|
|
|
|
Hi, this code should do the trick. It's an adapted function from SysInternals' FileMon application.
Regards,
Gertjan Schuurmans
Amsterdam
//---------------------------------------------------
// MatchWildCard
//
//Parameters
// LPCTSTR pszWildCard
// LPCTSTR pszFileName
//
//Returns
// BOOL
//
//Remarks
//
// MatchWildCard tests whether the given filename matches the wildcard. pszWildCard
// can contain * and ? special characters.
//
BOOL MatchWildCard(LPCTSTR pszWildCard, LPCTSTR pszFileName)
{
#define UpCase(ch) ((ch) >= 'a' && (ch) <= 'z' ? (ch) - 'a' + 'A' : (ch))
TCHAR chFile, chWild;
// End of pattern?
if (!*pszWildCard)
{
return FALSE;
}
// If we hit a wild card, do recursion
if (*pszWildCard == '*')
{
pszWildCard++;
while (*pszFileName && *pszWildCard)
{
chFile = UpCase(*pszFileName);
chWild = UpCase(*pszWildCard);
// See if this substring matches
if (chWild == chFile || chFile == '*')
{
if (MatchWildCard(pszWildCard + 1, pszFileName + 1))
{
return TRUE;
}
}
// Try the next substring
pszFileName++;
}
// See if match condition was met
return (*pszWildCard == 0 || *pszWildCard == '*');
}
// Do straight compare until we hit a wild card
while (*pszFileName && *pszWildCard != '*')
{
chFile = UpCase(*pszFileName);
chWild = UpCase(*pszWildCard);
if (chWild == chFile || chWild == '?')
{
pszWildCard++;
pszFileName++;
} else
{
return FALSE;
}
}
// If not done, recurse
if (*pszFileName)
{
return MatchWildCard(pszWildCard, pszFileName);
}
// Make sure its a match
return (*WildCard == 0 || *WildCard == '*');
==================
The original message was:
Hi all, I need an algorith to wildcard match two strings similar to what happens when you do a dir *.* - I`d require it to support both * and ? - nothing too fancy !!
Appreciate any help in this !! Thanks in advance !!
Rajiv
|
|
|
|
|
Can anybody can integrate CVS version control with the Visual Devstudio IDE? My company is migrating there right now(BIG mistake), so I am trying to find a civilized way to work with it instead of the command line or WinCVS things...
|
|
|
|
|
Preston Bannister (http://members.home.net/preston) is leading an effort to write a wrapper that will integrate WinCVS (www.wincvs.org) with the Visual C++ IDE. The project so far can be found at http://members.home.net/preston/cvsscc.html, but it's not really functional yet. If you open a VC++ workspace with Preston's CVSSCC installed, the icons in the VC++ workspace window reflect whether the files in the project are under source control and whether they're modified, but the actual CVS functionality is not yet implemented (i.e., you can't get histories, logs, or diffs; can't check in, commit, or update).
Part of the problem with this is that while there is a desire for this to be an open source project, the actual specifications for the Source Code Control (SCC) interface to VC++ are a trade secret of Microsoft and are available only under Nondisclosure Agreement, so Preson can't release the source willy-nilly.
That said, Preson's site requests volunteers to help with the task and there are a number of things that can be done even without signing Microsoft's NDA for the pieces that hook into the VC++ IDE. Preston's architecture is to make WinCVS a COM Automation server and call it from a small DLL that hooks into the IDE. The IDE part is pretty much done and the COM Automation interface is stubbed out in WinCVS, so the real work is to hook up the COM automation functionality.
I will also note that while I am helping out on that project in my copious spare time, I am also finding WinCVS so easy to use in conjunction with VC++ that I don't really miss the integration with the VC++ IDE.
|
|
|
|
|
The Preston approach goes to far perhaps, since I don't quite care about the icons in the project files view if M$ is making so big deal about that. The quite simple ADDIN could solve the problem, together with, let's say, Window Tabs Oz addin... There is one tool called CVSThings, but this one is an external tool, I want addin, no need to be integrated at first (can't have it all see)...
==================
The original message was:
Preston Bannister (http://members.home.net/preston) is leading an effort to write a wrapper that will integrate WinCVS (www.wincvs.org) with the Visual C++ IDE. The project so far can be found at http://members.home.net/preston/cvsscc.html, but it's not really functional yet. If you open a VC++ workspace with Preston's CVSSCC installed, the icons in the VC++ workspace window reflect whether the files in the project are under source control and whether they're modified, but the actual CVS functionality is not yet implemented (i.e., you can't get histories, logs, or diffs; can't check in, commit, or update).
Part of the problem with this is that while there is a desire for this to be an open source project, the actual specifications for the Source Code Control (SCC) interface to VC++ are a trade secret of Microsoft and are available only under Nondisclosure Agreement, so Preson can't release the source willy-nilly.
That said, Preson's site requests volunteers to help with the task and there are a number of things that can be done even without signing Microsoft's NDA for the pieces that hook into the VC++ IDE. Preston's architecture is to make WinCVS a COM Automation server and call it from a small DLL that hooks into the IDE. The IDE part is pretty much done and the COM Automation interface is stubbed out in WinCVS, so the real work is to hook up the COM automation functionality.
I will also note that while I am helping out on that project in my copious spare time, I am also finding WinCVS so easy to use in conjunction with VC++ that I don't really miss the integration with the VC++ IDE.
|
|
|
|
|
If you don't want to hook up with the MS SCC API, then why bother with an add-in? To me, running WinCVS and
switching between it and VC IDE is no pain. It's not clear what you would want the Add-In to do.
==================
The original message was:
The Preston approach goes to far perhaps, since I don't quite care about the icons in the project files view if M$ is making so big deal about that. The quite simple ADDIN could solve the problem, together with, let's say, Window Tabs Oz addin... There is one tool called CVSThings, but this one is an external tool, I want addin, no need to be integrated at first (can't have it all see)...
|
|
|
|
|
>>why bother with an add-in?
Because it does not require NDA...
>>It's not clear what you would want the Add-In to do.
I want it to perform the basic operations on the open documents to begin with, also tell me the status, install watches on the file etc. Later on it can evolve of course...
>>To me, running WinCVS and switching between it and VC IDE is no pain.
To me it is, and more-other, it is dangerous! We already have two accidental removal of the files from repo, and some missing changes as well. It is not correct to launch the external tool to do the job. This is good example of something I call UNIX syndrom (with all respect) - why I need a windows, I have a command line!? The truth is that the command line tools are powerful indeed, but without the GUI wrappers are source of troubles. That is why you like WinCVS, isn't it? So, to stuff the thing into your IDE environment is just the same thing, but gives even more security! This is the next step, and the only way to make the job done.
Yes, I don't like CVS. But if I have to use it, I will use it properly, make it working for me, not me working for it. Because it is a computer who is going to do the job, not me wasting my time and doing the things should be done automatically. Simple.
COMPUTER IS FOR SERVING THE HUMAN, NOT THE HUMAN IS TO SERVE THE COMPUTER!!! Otherwise, we don't need this things at all, lets just use pencil and paper!?
==================
The original message was:
If you don't want to hook up with the MS SCC API, then why bother with an add-in? To me, running WinCVS and switching between it and VC IDE is no pain. It's not clear what you would want the Add-In to do.
|
|
|
|
|
I would like to see an article or sample programs about drawing text with "antialiasing" ("smooth text") effect using Windows GDI functions.
|
|
|
|
|