Solved

new common controls

Posted on 1998-07-07
5
457 Views
Last Modified: 2013-12-03
Hi,
I was wondering if anyone could help me out with the 'values' for the new common controls masks.  Specifically the Date and Time picker.
I've recently tried to include it in a project but the compiler keeps complaining.

I load the new comctl32 library, get the function address for InitCommonControlsEx but then I have no values to pass to it.
InitCommonControlsEx takes a INITCOMMONCONTROLSEX structure as an argument but I don't know where this thing is defined so I created one myself.
The second value of the structure needs a flag specifying which control to initialize (ICC_DATE_CLASSES) but I don't know where this is defined either or what its value is
(I went through the comctl32.dll with dumpbin trying to find anything to help but only found functions, bmps, string tables; no kind of message value definition table.)

Is there anywhere I can get these values to use (a header or something) like
DATETIMEPICK_CLASS
ICC_DATE_CLASSES
DTS_LONGDATEFORMAT
DTS_SHORTDATEFORMAT
DTN_DROPDOWN
DTN_CLOSEUP
etc, etc

or does anyone know how I might include the new Date Time common control in my VC++4.0 project?

Thanks
0
Comment
Question by:bod_1
  • 3
  • 2
5 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 60 total points
ID: 1409559
Download the latest Platform SDK at http://www.microsoft.com/msdn/sdk/platform.htm. It contains all the header files and import libraries.
0
 

Author Comment

by:bod_1
ID: 1409560
I got the SDK.
I don't have a clue whats going on with the linker/compiler now.  I #include "commctl32.h" in my project.  That header has the INITCOMMONCONTROLSEX structure defined but when I try and declare one, the compiler doesn't know what it is.
I tried just replacing the older commctl32.h file in my INCLUDE directory with the new one and the compiler still doesn't have a clue.

Around the definition of the structure (in commctl32) is a
#if (_MS_IE_VER <= 0x0300)
which is the only thing that I can think of.  Maybe it's hiding that section from the compiler?

At least I have the numbers I need from the header file.
Maybe this SDK thing won't work with VC4 since in the help files they keep emphasizing that it hasn't been tested with prior versions.
Anyway I'm gonna go tinker with the mask values, maybe I won't need the header or the library.

0
 

Author Comment

by:bod_1
ID: 1409561
I figured out what was wrong I think.
For some reason I didn't have a PATH set up for MSDEV in my autoexec.bat file.  
I needed a reboot.

0
 
LVL 23

Expert Comment

by:chensu
ID: 1409562
Besides setting the PATH environment variable, you may do it from the IDE. Select the menu Tools/Options.../Directories (this is for Visual C++ 5.0, 4.0 might be different). Add the Include path and Lib path before any existing directories.
0
 

Author Comment

by:bod_1
ID: 1409563
thanks Chensu
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Winform not working on 64 bit machine 31 102
VBA Error Since Excel 2016 x64 5 123
Is AWS.RDS considered a part of "Big Data"? 4 114
Why is "packages element is not declared"? 2 347
This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question