|
Ravi Bhavnani wrote:
If you can't get yourself to use a goto ... you could instead throw an exception
I disagree. If goto is evil then throw ing an exception just to avoid using a goto is even worse! Which one is clearer to the person maintaining the code? Which one are you more likely to get wrong? Sometimes a goto is the right way to do something so long as it's well commented and isn't abused.
|
|
|
|
|
Hi,
I am writing a projet in C++ according to "CCSDS RECOMMENDEDATION FOR LOSSLESS DATA COMPRESSION" that is base on Rice coding algorithm. I am wondering if anybody has the source code that I can referce it.
Thanks a lot!
|
|
|
|
|
|
Hi, Ravi Bhavani,
Thank you for your information. I found this algorithm is different. What I am going to code is bassed on the NASA's Lossless Data Compression recommendation that modified the original Rice
code algorithm and seperated the algorithm into two parts: preprocessor and Adaptive Entropy Coder( http://www.ccsds.org//ccsds/). I searched throught the internet and found the corresponding source code named "SZIP", but I can not get any idea from there. I am wondering if you have heared
anything about this special Rice coding?
|
|
|
|
|
huffmancoding wrote:
I am wondering if you have heared
anything about this special Rice coding?
No, I haven't - sorry.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I placed a 'Reset' button on my property sheet right by the 'OK', 'Cancel', and 'Apply' buttons. I was wondering if anybody knew if there was a standard ID number for a 'Reset' button?
OK - IDOK - 1
Cancel - IDCANCEL - 2
Apply - ID_APPLY_NOW - 12321
Reset - ID_RESET??? - ???
I have currently defined a value of ID_RESET to 10055.
"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!
|
|
|
|
|
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
|
|
|
|