|
You can't have jagged arrays in C. Try this:
char* FrameTitles[INSTANCES] = { "lineSync", "DoorClosed", "DoorLocked" }; And if you do that you can drop the INSTANCES constant as well.
--Mike--
PROCRASTINATION: Hard work often pays off after time, but laziness always pays off now.
BUY MY SOFTWARE!! (please?) RightClick-Encrypt | 1ClickPicGrabber
My IntarWeb Homepgae!!!11
|
|
|
|
|
I am trying to write a device install program to get around the problem of xp sp1 installing a driver that i do not wish to use. The ftdi usb-serial device has an approved driver in sp1 that is installed when the device is plugged in.
In order to install the device you must cancel the driver request from windows, go to device manager, and manually update the driver xp installed.
I have played with SetupCopyOEMInf(), UpdateDriverForPlugAndPlayDevices() and calling "rundll32 SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 c:\temp\drivers\ftd2xx.inf" with no real success.
Is there any way to automate the manual install process?
Cheers,
Dave
|
|
|
|
|
Hi all - new here, first post on CodeProject;
My simple, bottom line question : Is there a way to *reliably* install and *use* JUST THE GDI+ functionality from the Platform SDK CD (FEB 2001); without installing the entire Platform SDK? (feedback on a couple of the tutorials implies that there are problems with trying to JUST extract GDI+).
OR: If I *have* to install the Feb 2001 Platform SDK, please see "gotcha's" noted further down - I need advice on installing the Platform SDK (but again I'd rather not IF I can just extract the GDI+ stuff).
I've read a couple of the GDI+ tutorials here and now I am interested....
More detail / background ("experts" please read this, and "READ BETWEEN the LINES" and offer any advice you deem appropriate): I have Visual C++ 6 Professional Edition, Service Pack 5, the Processor Pack/MASM (which I'm thinking about NOT installing after my next HD reformat; I simply can't think of a good use for the Processor Pack and I haven't used assembly in quite a while); and I am using the MSDN Library OCT 2001 (my subscription ran out about a year after that, but for certain reasons I am sticking with OCT 2001 / and the MSDN->Web based Library - at present I am NOT getting into .NET); in addition to installing the simple one-CD MSDN Library that comes with VC+6.
MOST of my C++ experience has been with OLD DOS compilers (Borland C++ 3.0); on occasion I have played with Visual C++ using the WROX books as a guide, working my way through the tutorials. My experience with VC+6 should be considered : "Intimidated Beginner".
Platform SDK Gotchas: a long time ago (a couple of HD reformats ago) I ordered the Platform SDK (Feb2001); installed it ; it CRIPPLED my VC+6 installation (mainly DirectX SDK, but I am sure there where other "gotchas" waiting...). Apparantly the Platform SDK installs from DX 8.0a stuff (presently I am using DirectX *9* runtimes!). I stopped using the DirectX SDK a long time ago; got tired of re-learning it every time a new DX SDK came out.
After reading the beginners GDI+ tutorial here, I extracted the GDI+ stuff from the Platform SDK to examine it; they have peculiar names after extracting (and there are TWO .LIB files in there, I assume the larger of the two is a debug LIB). I need step-by-step instructions... ALSO reading the Platform SDK ReadMe implies that installing the entire Platform SDK MIGHT interfere with my computer (WinME, presently using DirectX *9* runtimes - again, I stopped messing with the DX SDK some time ago).
Also - apparantly there is an updated GDI+ DLL on Microsoft MSDN download (?) - is it safe / advised to use that newer DLL in conjunction with the FEB 2001 material (.LIB, *.h etc)?
Basically : I want to work my way through the GDI+ tutorials here; I want to install JUST GDI+ functionality WITHOUT installing the FEB 2001 Platform SDK CD if I can - the simplest and most trouble-free approach.
-Thanks
-JeffBAbil
|
|
|
|
|
I have never had problems with the Platform SDK. It don't change anything with your DirectX, because it only contains the header/lib-files, not the binary ones.
I really don't think you can use GDI+ without installing the Platform SDK, and there's a lot of other new stuff you can't use either, then.
IMHO it's hard to do any Windows development without installing the Platform SDK, the headerfiles included in your VC6 installation are old.... From 1996 or something.... Lot of stuff have changed since then.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
MS in their wisdom no longer supports devlopment on any 9x OS, so don't bother installing the Platform SDK as it won't work. Not that it's broken on 9x, MS just won't let you.
--Mike--
PROCRASTINATION: Hard work often pays off after time, but laziness always pays off now.
BUY MY SOFTWARE!! (please?) RightClick-Encrypt | 1ClickPicGrabber
My IntarWeb Homepgae!!!11
|
|
|
|
|
Michael Dunn wrote:
MS in their wisdom no longer supports devlopment on any 9x OS
I knew that for .NET and VS.NET, but don't the platform SDK work on Win9x anymore?
Hmmm, fortunately I have not used Win9x as platform for development, only for testing, since NT4 was released
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
|
Is there any easy way to determine the number of columns a CListCtrl has?
I have a base class function that iterates through derived class list controls, saving all the data. I can't see anything in the CListCtrl class that would indicate how many columns are being used in the control!
Any ideas?
|
|
|
|
|
If the control is in report mode, you can get the header control and call GetItemCount:
int a_iColumns = GetHeaderCtrl()->GetItemCount();
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
|
Thanks to everyone!
I knew it would be simple, I just couldn't find it. I opted for a quick and "dirty" approach of keeping track of it with an array of ints (yuk). I'll switch to GetItemCount now.
|
|
|
|
|
You can retrive it from the associated header control.
e.g.
CListCtrl m_lstItems;
int nNumCols = m_lstItems.GetHeaderCtrl()->GetItemCount();
Dave
|
|
|
|
|
Maybe i should refresh more often...
Dave
|
|
|
|
|
I'm set up to load every page... Of course DSL makes that an easy choice!
|
|
|
|
|
All I need are two buttons that have an up arrow and a down arrow. I looked at CBitmapButton class but I dont need it to look different when pressed etc. If I could just draw on a regular button - thats all I need.
So I am looking at the spinbutton ctrl. I dont need the autobuddy stuff, just access to a function that fires if I press the up arrrow, and a different one for the down arrow of the spinbutton ctrl.
If neither of these is suitable, I can just write the text "Up" and "down" on my regular old buttons ,,,,it just wont look so cool........
Suggestions?
Appreciate your help,
ns
|
|
|
|
|
Well, the spin button control sends a WM_VSCROLL message when you click on the arrows (if it's vertically aligned). Also the MSDN says it sends a UDN_DELTAPOS message, but I've never used that before. So, hook up a handler for WM_VSCROLLL and look for SB_LINEUP and SB_LINEDOWN or SB_PAGEUP and SB_PAGEDOWN (can't remember which ones are sent by the spin button).
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
|
Hi all,
This is just a shot in the dark but is there someone out there who has used Crystal Reports 9 successfully with unmanaged visual c++ code, preferably in a MFC application? The examples on crystal decisions website are too terse to understand and there seems to be no sample files that don't need managed code.
Cheers,
Clint
|
|
|
|
|
I use a CEdit Control among other controls like a CListBox and a CCombox (but in DropDownList mode) in a CView window. Everything goes well except that when i click on the CEdit Control I don't succeed in obtaining the focus on it. I succeed in obtaining it only with a double click, and there are some visual artefacts when I click on the other controls (the appearance of the Edit stays selected). And if I active an other application or if I open a Dialog Box when the document frame is activated again, the simple click is working quite well. And when it begins to work it work until i exit from the application. Is somebody has an idea about that?
|
|
|
|
|
What gains focus if not the edit control? Check if the view is set to focus another object upon single mouseclick.
Kuphryn
|
|
|
|
|
It seems that the focus stays on the control which had the focus before the click. Another strange thing about the CEdit Control if I strike TAB we do not go to the next control and we have a bip.
I am perfectly sure that the focus is not set to another object on sigle mouseclick
|
|
|
|
|
Hi everybody
I have to show a list of values in a list in different columns.
There is a simple way to show them right aligned?
Ex
YEAR PRICE BOYS GIRLS E.T.
1992/1993 200 5 4 7
1993/1994 3.000 27 45 126
Thanks in advance.
Best Regards
Dr. Pi
|
|
|
|
|
Sorry the example looked good in the editor but not in the final message
Dr. Pi
|
|
|
|
|
If you want the columns right aligned, specify LVCFMT_RIGHT for the nFormat parameter of the InsertColumn function. This will work nicely for all columns except the first one. For some reason, you can't right align the first column I don't think.
YourListControl.InsertColumn( 0, _T("Column0"), LVCFMT_RIGHT, 100 );
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
You can, but you have to set the style to right align after you have created the column.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|