|
I'm creating a console mode based project where there will be a neat looking menu system! What I'd love to know is, can I place the input focus from one part of the screen to another... e.g.
|--Menu---||-----Please input value----------|
|-Option 1-||--Input value:-------------------|
|-Option 2-||--You inputted..----------------|
|-Option 3-||--------------------------------|
|---focus--||--focus-------------------------|
|----------||--------------------------------|
As you can see - I'd like to be able to transfer focus from the menu to the input box (box shapes are created with ASCII characters and a heck of a lot of careful spacing! lol) whenever the user wants to by the press of a button.
Is this possible, and if so can someone please tell me! I'm using Microsoft Visual C++ Standard Edition. Any help would be well appreciated!!!
drjake
|
|
|
|
|
You mean, you want to move the cursor? SetConsoleCursorPosition .
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
How can i write a program and get it to start during the Windows boot process? Kind of like chkdsk.exe when you haven't shut your computer down properly, it gets displayed during bootup but XP hasn't fully loaded yet.
Kuniva
--------------------------------------------
|
|
|
|
|
The utility is called Autochk.exe. It is a "native application". This category lies somewhere between a device driver and a user mode app.
At boot time, the user mode-style apps cannot run since major window's components used for usermode(user.exe,gdi etc.) are not loaded.
in these cases, a native app is the only choice available. you need the xp/2000 ddk to make this kind of apps.
Notice that when you running autochk.exe after XP/NT has started, you get an error message "The autochk application cannot be run in Win32 mode".
To start such an app at boot time, see the registry key
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager and the value stirng value "BootExecute".
Usually, this value is "autocheck autochk *", but you can change that...
Bikram Singh
|
|
|
|
|
I want to display a large image, so I don't use CScrollView, instead I use CView and add the scroll bar manually with the coolsb library, On the horizontal and vertical scroll bar cross point, that is the bottom-right corner, I want to create a button as a navigation button,just like Gimp(a software like photoshop on Linux) I create it from the child frame class, add some code on the OnCreate()and OnSize(), but the Rect size is difficult to compute, I don't know why. so I need some help.
swandream
|
|
|
|
|
CListCtrl->setbkimage dont work am using a dialog
how do put an image on a dialog box button
how do i make a loop like for(;;) and still be able to send MSG when a button is presed
|
|
|
|
|
Hi,
You must adds follow lines in some init function. For example in InitInstance of the your app:
AfxSocketInit();
AfxOleInit();
Ivan Cachicatari
www.latindevelopers.com
|
|
|
|
|
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
|
|
|
|