|
I'm trying to retrieve the Datbase Name, Server Name, and, if Oracle, the Net 8 Name set in an ODBC DSN without first opening the ODBC Connection. The idea is for the user to specify an ODBC DSN and the application will get the information about the DSN to open an ADO Connection. The only way that I've found to retrieve this information is to first open the connection using ODBC. This seems like an very inefficient way to get the information. I know that i can retrieve if from the registry, but that way has already been shot down by my supervisor. Preferabley I need to get it from some kind of Win32 API call. Anybody have any idea how to do this?
...
|
|
|
|
|
Is it possible to hide or to disable the access to the hard drive by using the registry? If not: Could somebody give me a source code (Win32 APP).
|
|
|
|
|
I renumbered via a utility (see http://www.annasplace.me.uk/resorg/)my resouces. This was due to the Icon not being displayed, the help Memu not being displayed and a check box not operating correctly.
I now get the Assertion at
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);<br />
ASSERT(IDM_ABOUTBOX < 0xF000);
in my OnInitDialog routine.
The current value of IDM_ABOUTBOX = 0x10
Are they any way for the resources to be checked
A snipit of the resource.h file is as follows:
#define IDM_ABOUTBOX 0x10<br />
#define IDR_MANIFEST 11<br />
#define IDD_SSIC_EXAMPLE_DIALOG 12<br />
#define IDR_HTML_GENERICRTSIM 13<br />
#define IDR_MAINFRAME 14<br />
#define IDM_MAINFRAME 19<br />
#define IDD_GEN_RT_SIM 20<br />
#define IDD_SCRIPTING 21<br />
#define ID_SCRIPTS_VIEWLOGS 22<br />
#define ID_Menu 23<br />
#define IDD_SIMULATION 24<br />
#define IDD_DIAGNOSTICS 25<br />
#define IDD_ABOUTBOX 26<br />
#define IDS_ABOUTBOX 27<br />
#define ID_TESTGUIS_SIMULATION 102<br />
#define ID_STAGE_TRACKS 103<br />
#define IDD_STAGE_TRACKS 104<br />
#define ID_TESTGUIS_CDNUGUI 106<br />
#define ID_RECORDING_REPLAY 107<br />
#define ID_TESTGUIS_IGIGUI 108<br />
#define IDD_IGI_EMU 109<br />
#define IDC_TOGGLECTRL1 1000<br />
#define IDC_TOGGLECTRL2 1001<br />
... etc<br />
#define IDC_CHECK_SA25T 1333<br />
#define IDC_CHECK_SA27T 1335<br />
#define IDC_AIRCTRL1 1355<br />
#define IDC_LONG 1414<br />
#define IDC_ROLL_LABEL 1417<br />
...<br />
#define IDC_STATIC_AMP_B 1450<br />
#define IDC_WAYPOINTS_LABEL10 1451<br />
#define ID__NEWPROJECT 32776<br />
#define ID__LOADPROJECT 32777<br />
...<br />
#define ID_FILE_EXIT 32787<br />
#define ID_HELP_ABOUT 32788<br />
...<br />
...<br />
#ifdef APSTUDIO_INVOKED<br />
#ifndef APSTUDIO_READONLY_SYMBOLS<br />
#define _APS_NEXT_RESOURCE_VALUE 110<br />
#define _APS_NEXT_COMMAND_VALUE 32789<br />
#define _APS_NEXT_CONTROL_VALUE 1452<br />
#define _APS_NEXT_SYMED_VALUE 1552<br />
#endif<br />
#endif
I assume that they are bugs with the IDE, any suggestion please.
Graham.
grahamfff
|
|
|
|
|
Your question is not exactly clear. What is the problem? The ASSERT ? Well, change the value of IDM_ABOUTBOX then! What are the bugs you suspect in the IDE? The resource.h look ok to me.
|
|
|
|
|
I get the following error
Unhandled exception at 0x0043448e in SSIC_Example.exe: User breakpoint.
BOOL CSSIC_ExampleDlg::OnInitDialog()<br />
{<br />
CDialog::OnInitDialog();<br />
<br />
<br />
---> ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
with the IDM_ABOUTBOX value of 0x10 and 0x01 and 0x0100, these are the values I have tried.
The icon I have done for my project is not displyed. Also one (out of about 16) check Boxes is not working; the control variable appears to produce a false value when checked in the program; but since I have renumbered the resources I have not been able to check it out again due to the about error. Also the Help file is not displayed when actioned.
The program is a MFC Dialog application with 8 dialogs.
Any futher comments or suggestions,
Graham.
grahamfff
|
|
|
|
|
The lines:
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
means just what the comment says, IDM_ABOUTBOX mst be in a special range. ASSERT breaks if an expression returns FALSE , that is ASSERT( FALSE ) will always break. The expression in the ASSERT in the first line above will return TRUE if the bit mask 0xFFF0 is set. 0xFFF0 & 0x10 equals 0x10, so using this value, the first ASSERT will not trigger.
The second line just checks for the value being smaller than 0xF000. Of course, 0x10 returns TRUE in this case.
So, if you have given 0x10 as the value, and one of the ASSERT s triggers, the value is obviously not the one you have defined. It's easy to check what it really is, by for example including the line
int test = IDM_ABOUTBOX;
in InitInstance of the application class and setting a breakpoint on the line below. Run, and check the value of test in the watch window.
Now, you are stating that the error is an unhandled exception rather than an ASSERT - we have a quickly moving target here, obviously.
For stuff like this, you might want to check the call stack backwards to the first line of code that lies in your application rather than MFC or Windows. You might also want to check all ASSERT s that was triggered before the exception.
|
|
|
|
|
I did mange to get pass the Assertion error, but still unable to display the Help file or the program Icon for this application.
Any suggestions.
Are they any tools out there to check that the program and its resources are OK. The AboutBox Assertion seemed to be a 'Red Herring'.
Graham.
grahamfff
|
|
|
|
|
I have a report mode list control on which I've set up NOTIFY_REFLECT so I can change text color based on the content of the subitem, but I'm not receiving NM_CUSTOMDRAW messages. I've set up the message maps as described in Archer & Whitechapel's Visual C++ .Net (not to mention a slew of places on the web), but there must be something else required. My environment is eVC++ 3.0. I'm using the emulator (because it runs faster than an actual PocketPC. What else can I tell you?
Any suggestions would be appreciated.
Thanks, Mike
|
|
|
|
|
did u set style of listbox as owner draw?
includeh10
|
|
|
|
|
No, I didn't set owner draw. Archer & Whitechapel describe owner draw as a second option for handling ListViews (requiring you to draw the entire control in one fell swoop). When I check owner draw fixed in the resource editor (without making any other changes), the LVN_GETDISPINFO events that currently drive the drawing process in the content area stop being sent as well. Changing to owner draw therefore requires a complete redesign of the way the content area of the control is drawn (ouch).
Archer & Whitechapel describe custom draw as a third approach, distinct from owner draw, giving you more flexibility and less responsibility (for clipping and such), i.e. I think its something else.
|
|
|
|
|
ON_NOTIFY_REFLECT message wont work with the NM_CUSTOMDRAW message (I dont have any idea why exactly it is not ). Try it with the control's parent class with ON_NOTIFY macro.
sdgsdfg
|
|
|
|
|
How to call MFC DLL in installShield 6.x
---------------------------------------------
hi..Dear
Plz tell me How to call Dll in installshield.
there me be proble of DLL type so can you send me Sample DLL prject + Calling method ...
just one function in dll...any any any ...void abc()...
PLease Please....Please...anybody help me please...
i'm posting again & again..but no body ready to help me...Can U..please...
i hope u help me..
my e-mail is:
sumit_kapoor1980@hotmail.com
Thanks
---Sumit Kapoor---
|
|
|
|
|
If you are not getting any help, even though you post several times, you can probably conclude that noone has any example of what you want to accomplish.
You might want to see if there is any help in your Installshield documentation - there might even be a sample project. You might want to try the Installshield site. You could try Google or any other search engine.
|
|
|
|
|
Hi
I use waveOutSetVolume API to set the volume of the wave out audio I play in my application.
MSDN says : If a device identifier is used, then the result of the waveOutSetVolume call applies to all instances of the device. If a device handle is used, then the result applies only to the instance of the device referenced by the device handle.
So I use the handle I get from waveOutOpen API to change the volume of my Applcation not the system wide sound..
Simply this does not work as intended and the system wave volume changes and my code affects other programs..
code :
HWAVEOUT m_WaveHandle;
waveOutOpen(&m_WaveHandle,WAVE_MAPPER,&m_wfx,hThread->m_nThreadID,NULL,CALLBACK_THREAD);
MMRESULT res;
res=waveOutSetVolume(m_WaveHandle,MAKELONG(leftVol*0xFFFF/100,rightVol*0xFFFF/100));
any ideas to solve this ?
I use Win2000/VC++6.0
|
|
|
|
|
I have been playing around with Wave files, and I have a little console application that plays a wave file. It works fine. I wanted to create a Windows application that did the same thing, but every time I try to compile it I get a ton of errors saying that HWAVEOUT, WAVEHDR, WAVEFORMATEX and WAVEOTCAPS have a syntax error (C2061). I made sure that I copied all of the includes exactly as they are in the console app. I can't figure out why the compiler does not know about these types. Could anyone please shed some light on the situation? Thanks!
|
|
|
|
|
Who knows about how to get into hardcore scripting for online MMROPG as I want to develope and learn all at the same time, what would be the best scripting language for those games?
Jimmy
|
|
|
|
|
|
I do have to say how much I appreciate your help and if there is any learning curves that you could throw at me, that would be greatly appreciated as well. I do thank you once again. Also, how's the weather down there?
One more note, I dig your work too man.
P.S. Anyone else have any suggestions as well?
Jimmy
|
|
|
|
|
|
Well, I even donated to those guys some $$$ to show my appreciation, now the thing is to get started on this, I have no clue where to start lol. Hey stay cool down there, Washington been lil warm lately as well. How do you figure you could take an item and duplicate it ? Kind of a question I ask myself over and over. Oh yes very impressive Resume also I would say, as me being a Chief Engineer in the Glazing Industry does not compare up to that lol.
hmmmmmmmm
|
|
|
|
|
I build a empty project of win32 application and want to constuct a dll by it(just a try),my codes as follow:
#include <windows.h>
HINSTANCE g_hinstThisDll = NULL; // Our DLL's module handle
UINT g_uDllLockCount = 0; // Count
BOOL APIENTRY DllMain ( HINSTANCE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved )
{
switch ( ul_reason_for_call )
{
case DLL_PROCESS_ATTACH:
{
g_hinstThisDll = hModule;
DisableThreadLibraryCalls ( hModule );
}
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
I have set the Project->Settins->Link->OutPut:EntryPoint:DllMain and set Project->Settins->Debug:Win32.dll,But there is a link error:unresolved external symbol _main.
now I want to know whether this method is practical or not
|
|
|
|
|
if you want to create a DLL, start with a Win32 DLL project, not with a Win32 Application project.
Software | Cleek
|
|
|
|
|
I just want to the probability in this way,I have changed the entry point into DllMain,but there is a link erro (above).
|
|
|
|
|
there is more to a DLL than just a DLLMain. you also have to tell the linker to make a DLL and not an EXE . there may be other things, too. but that's what VC takes care of when you select a DLL project.
Software | Cleek
|
|
|
|
|
I have been able to print to PDF document (It's just attaching CDC to distiller printer DC). But I want to also change its first default save location.
Could I do it without buying PDF API ?
Somebody, please help me.
Hky
|
|
|
|