|
andrew.truckle@atkinsglobal.com wrote:
I have tried this code below, and it does indeed show a control on the left. But for some reason it still doesn't list "Favourites" as one of the choices.
Does the Places Bar normally contain the Favorites folder? A little research indicates it's not normally there, but it can be added with a registry tweak. In the following registry key, which doesn't exist by default:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\ComDlg32\PlacesBar
you can specify up to five folders. Each folder is identified by an entry called Place0, Place1, and so forth, up to Place4. The value of these entries can be either a fully qualified path name or a CSIDL value that identifies a special folder independent of the particular machine. If you want to specify an absolute file system path, create a REG_SZ, or REG_EXPAND_SZ, entry. If you plan to use a CSIDL, then a REG_DWORD entry is mandatory. CSIDL values are defined in shlobj.h. Make sure you get the one that ships with the latest Platform SDK if you want the new IDs specific to Windows 2000.
andrew.truckle@atkinsglobal.com wrote:
Also, it means I loose all the benfits that were in the CFileDialog class. It seems like I am trying to re-invent the wheel here..
This is a "bug" with CFileDialog in that it uses a hook, thus preventing the Places Bar from showing up. It's a well documented issue.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
It is a whole new concept in programming. I have not heard of a "Places Bar" or anything, let alone the bug fix. I have been trying to find how to do it on msdn and all that, to no avail.
You are the first person to atleast offer a solution. I suppose i was surprised because the person who wanted this, has been using autocad 2004, and its file dialogue shows the vary same control on the left but with the bar...
can you inform me of the "bug" articles?
Andrew
|
|
|
|
|
andrew.truckle@atkinsglobal.com wrote:
can you inform me of the "bug" articles?
Yep. See here and here.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I have build an i/o device. The devices are plugged with PC
over a serial cable. Now I want to replace the cable by a bluetooth
connection. I built in a bluetooth serial adapter in the devices and
installed an USB-Bluetooth-Adapter with the widcomm software on PC. My
application sends to the virtuell com port generated by the widcomm
software. But we have some problems with the widcomm software and I hope anyone
can help me.
When your device is out of range, the connection will break down. When the device is in range again, the widcomm bluetooth software does not reconnect. So my solution: I close and open the com port in a loop until the device is in range again and then a new connection is established.
But first the opening of the port needs a lot of time (10s -20s). Second the widcomm software hangs up after com port is closed and opened for a few times.
Best re
|
|
|
|
|
Hi
I'm having big problems trying to úse the GetCalendarInfo function with VC++ 2003 and seemingly no matter what I do, I get the error shown below
error C3861: 'GetCalendarInfo': identifier not found, even with argument-dependent lookup
I'm trying to the the locale version of the shortdate and the code I try to compile is like this
<br />
#include <windows.h><br />
#include <winnls.h><br />
LPTSTR calinfo2 = new TCHAR[81];<br />
GetCalendarInfo(LOCALE_SSHORTDATE,CAL_GREGORIAN,CAL_SSHORTDATE,calinfo2,81);<br />
Can anyone help me out, please
Thomas
|
|
|
|
|
The include for winnls.h is not necessary as Windows.h includes it.
Also have you tried ::GetCalendarInfo?
Ant.
|
|
|
|
|
You need to define WINVER >= 0x040A
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
Thanks..
I had tried ::GetCalendarInfo, but with no luck.. The define WINVER >= 0x040A did the trick however
Thanks,
Thomas
|
|
|
|
|
Hi,
I want to build an additional special keypad with 16 keys. This keys should send scan codes to the keyboard driver and the keyboard driver should translate these scan codes in virtual key codes and send them to the system.
In Windows I want to map these scan codes to spezial functions. For these I need scan codes and virtual key codes which are processed by the keyboard driver, but which are not available on a common keyboard and which cannot generated by a key combination of a common keyboard.
Can anyone help me?
Julius
---
|
|
|
|
|
Where is your keypad connecting to ?
If you're using the PS/2 adapter or the USB bus, you need to rewrite the keyboard driver and/or filter driver to support the signals sent by your keypad.
If your extra-device connects to a serial port, you've got an easier path: just load a program that supports serial device connection, and is capable of intrepreting the signals sent by the keypad.
If you connect it to the printer port, you're in for an even more easier ride, as the pareller port supports up to 7 simultaneous data bits, and you can create each of the 16 key codes by using different bit patterns. Then just make a software that can understand your input and translate it into commands that can be executed by the system.
From all these options, if you want to have the best possible performance for your device, I suggest familiarizing yourself with Windows Driver Development. That is a LONG path to trek, but certainly a worthwhile one, as it offers lots of insight on the world of Windows OS.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
I use the USB bus. But I use a standard keyboard controler, so I haven't to write the driver. For windows it seems, that there are two keyboards. So there is no problem.
But what scancodes can I use, that are not used by a standard key board, but interpreted by the keyboard driver.
Julius
|
|
|
|
|
You could try this list, provided by Microsoft: http://download.microsoft.com/download/whistler/hwdev3/1.0/WXP/EN-US/scancode.exe[^]
Yeah, I know it's an executable, but I've downloaded it myself, readed it through, and it seems like a virus-free self-extracting zip archive. It contains a big (2 Mb) document describing the scan codes of Windows OS. Especial interest can be placed on the 101/102 standard keyboard scan codes list starting from page 16. There seems to be a collection of free scan codes that are not generatable by a standard keyboard. Note, though that these scan codes might be in use by an extended-key keyboard, such as Logitech Internet Navigator SE keyboard.
Also, the USB key code list on page 30 might prove interesting. I suggest you read the entire document with thought. Then, after choosing the scan codes, write a system-wide keyboard hook that can trap WM_KEYDOWN codes, and see what virtual keys Windows assigns (the standard keyboard driver supports the scan codes listed there)
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Hi folks!
I have a problem with the recordset.
i would like to check a database field whether
a field is null or not (straight with CRecordset ).
the function isfieldnull only works if you derived form a
CRecordset class (DataFieldExcahnge).
Is there another way to check a field directly with a CRecordset
(CRecordset::Open(...,"select field from table")).
I mean microsft implemented the IsFieldNull function, so i guess it should be a possibility to implement without IsFieldNull.
Thanks...
|
|
|
|
|
Hi All,
I have a CMDIChildWnd application where each child window loads a FormView.FormView contains some edit controls,comboxes etc.
when i double click on any edit box to select the contents,the focus is always going to first control in the tab order.
Please some one tell me what might may be the possible reason.
Thanks in advance...
|
|
|
|
|
Anybody knows a simple way to remove the *.* option in the Save as type combobox in the File Save dialog? Sridhar Rao has written an article that precisely covers this issue, but it seems a wee complicated.
Regards, Haakon S.
A sure cure for seasickness is to sit under a tree.
Spike Milligan
|
|
|
|
|
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"
|
|
|
|