Click here to Skip to main content
15,921,959 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow can i get the DSN list? Pin
Peter Keung2-Jun-03 3:57
Peter Keung2-Jun-03 3:57 
AnswerRe: how can i get the DSN list? Pin
David Crow2-Jun-03 4:05
David Crow2-Jun-03 4:05 
GeneralRe: how can i get the DSN list? Pin
Peter Keung2-Jun-03 4:17
Peter Keung2-Jun-03 4:17 
GeneralRe: how can i get the DSN list? Pin
basementman2-Jun-03 4:38
basementman2-Jun-03 4:38 
GeneralRe: how can i get the DSN list? Pin
basementman2-Jun-03 4:39
basementman2-Jun-03 4:39 
GeneralRe: how can i get the DSN list? Pin
Peter Keung2-Jun-03 5:59
Peter Keung2-Jun-03 5:59 
GeneralRe: how can i get the DSN list? Pin
David Crow2-Jun-03 6:51
David Crow2-Jun-03 6:51 
GeneralInitCommonControlsEx sets Error 2 Pin
psychicfriend2-Jun-03 3:56
psychicfriend2-Jun-03 3:56 
Help!
I am having a problem initializing the common controls using
InitCommonControlsEx(), specifically that when I call it I am
getting Error 2 (The system cannot find the file specified.).
This is a wind32 SDK application. Other than this control,
it works. The only (potentially) pathological thing I'm trying
to do is make this control (ListBox) a child of the main
application window, but the program isn't even getting to that
point.
I am using VS.NET 2002 with the latest (Feb 03) Platform SDK.
According to depend.exe, the comctl32.dll that my program is
using is located in C:\windows\system32 and has the following
properties:
File Version: 5.82.2800.1106
Product Version: 6.0.2800.1106
Image Version: 5.1
ALSO, comctl32.lib is included in my "Link/Input/Additional Depndencies"
settings for the project. I have my global settings for VC.NET
set so that the SDK paths are searched first for lib and
include files.
Here is a code snippet illustrating the problem:


///////////////// CODE SNIPPET ///////////////<br />
#include "main.h"<br />
#include "WindowFinder.h"<br />
#include "resource.h"<br />
#include <tchar.h><br />
#include <stdio.h><br />
#include <CommCtrl.h><br />
<br />
....<br />
<br />
BOOL InitializeApplication(HINSTANCE hThisInst, <br />
			   HINSTANCE hPrevInst, <br />
			   LPTSTR lpszArgs, <br />
			   int nWinMode )<br />
{ <br />
...<br />
	// Register the frame window class. <br />
...<br />
	// Register the main window class. <br />
... <br />
(initialize wc)<br />
...<br />
	if (!RegisterClass(&wc)) <br />
	{<br />
		return FALSE; <br />
	}<br />
//HERE'S WHERE THE PROBLEM IS:<br />
	INITCOMMONCONTROLSEX icrtl;<br />
	icrtl.dwSize		= sizeof(INITCOMMONCONTROLSEX);<br />
	icrtl.dwICC		=	ICC_LISTVIEW_CLASSES <br />
					| ICC_STANDARD_CLASSES <br />
					| ICC_TREEVIEW_CLASSES;<br />
	<br />
	if ( !InitCommonControlsEx( &icrtl ) )<br />
	{<br />
		DWORD err = GetLastError();<br />
//ERROR: err == 2 (The system cannot find the file specified.)<br />
		return FALSE; <br />
	}<br />
...<br />
}


Dr. Walter Tackett
Alden Management LP
e m a i l : walter underscore tackett at msn dot com
GeneralRe: InitCommonControlsEx sets Error 2 Pin
psychicfriend2-Jun-03 4:56
psychicfriend2-Jun-03 4:56 
GeneralChanging fonts on the button Pin
Jump_Around2-Jun-03 3:36
Jump_Around2-Jun-03 3:36 
GeneralRe: Changing fonts on the button Pin
basementman2-Jun-03 4:41
basementman2-Jun-03 4:41 
GeneralEmbedding Flash movies in my app Pin
Florin Ochiana2-Jun-03 3:32
Florin Ochiana2-Jun-03 3:32 
GeneralRe: Embedding Flash movies in my app Pin
Zibar2-Jun-03 5:41
sussZibar2-Jun-03 5:41 
GeneralRe: Embedding Flash movies in my app Pin
abc8762-Jun-03 10:33
abc8762-Jun-03 10:33 
General#ifdef Pin
Zibar2-Jun-03 2:31
sussZibar2-Jun-03 2:31 
GeneralRe: #ifdef Pin
melwyn2-Jun-03 2:44
melwyn2-Jun-03 2:44 
GeneralRe: #ifdef Pin
Zibar2-Jun-03 3:19
sussZibar2-Jun-03 3:19 
GeneralRe: #ifdef Pin
Joaquín M López Muñoz2-Jun-03 3:56
Joaquín M López Muñoz2-Jun-03 3:56 
GeneralRe: #ifdef Pin
Zibar2-Jun-03 4:31
sussZibar2-Jun-03 4:31 
GeneralRe: #ifdef Pin
Daniel Turini2-Jun-03 5:28
Daniel Turini2-Jun-03 5:28 
GeneralRe: #ifdef Pin
Zibar2-Jun-03 10:39
sussZibar2-Jun-03 10:39 
Generalcorrection Pin
Zibar2-Jun-03 4:29
sussZibar2-Jun-03 4:29 
GeneralShell Programming ICopyHook....Please help Pin
rohit.dhamija2-Jun-03 2:15
rohit.dhamija2-Jun-03 2:15 
GeneralInverse of a matrix Pin
affzan2-Jun-03 1:42
affzan2-Jun-03 1:42 
GeneralRe: Inverse of a matrix Pin
Niall Barr2-Jun-03 2:26
professionalNiall Barr2-Jun-03 2:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.