|
I don't think so. The only "standard" ids I found in winuser.h were:
#define IDOK 1
#define IDCANCEL 2
#define IDABORT 3
#define IDRETRY 4
#define IDIGNORE 5
#define IDYES 6
#define IDNO 7
#if(WINVER >= 0x0400)
#define IDCLOSE 8
#define IDHELP 9
#endif /* WINVER >= 0x0400 */ /ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Thanks Ravi.
I also found those IDs. It is just that ID_APPLY_NOW is not in that list. It is in AfxRes.h along with the other property sheet buttons. So I was just wondering if the reset button was defined some where. I prefer to use standard IDs if there are any.
I will will leave it as it is.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
Hello there
As a beginner in windows application programming I've run into a few problems - the most annoying being at a message posting procedure where the message never receives the intended recipient.
I've got a DLL which is intended for posting messages to an dialog at certain events. This posting are carried out by PostMessage. But the problem is that the message never arrives at the dialog. I've used Spy++ to check the handle of the intended recipient and the handle stored in the DLL, and they match. The return code of the PostMessage, is 0 = successful posting, but the dialog never receives the message (I've checked this with Spy++).
If I use HWND_BROADCAST as the first argument for PostMessage, my dialog receives the message correctly, thus i assume that my event handler in the dialog is correct.
What can be wrong?
Best regards
Thomas René Sidor
|
|
|
|
|
If the function fails, the return value is zero. To get extended error information, call GetLastError.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
I have used GetLastError, and the function itself does not fail. The problem is just that the message never arrives at the intended window.
Best regards
Thomas René Sidor
|
|
|
|
|
PostMessage 's return type is BOOL . 0 means FALSE , which means that the message was NOT posted. Again, use GetLastError to work out why.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
The method does not return 0. Therefore the use of GetLastError just tells that the command was succesfull.
|
|
|
|
|
McByte wrote:
The method does not return 0.
This is from your original post:
The return code of the PostMessage, is 0 = successful posting...
So what is the return value of PostMessage() ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Damn, maybe I could be a little more clear on what I'm trying to say
My PostMessage does not return 0, that means that it does not fail. By using GetLastError() - i get Error code 0: Succesful...
Sorry for the mixup
|
|
|
|
|
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
|
|
|
|