Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: crux
  • Order by date
  1. crux

    Transfer Data between C++ and Excel

    The simple way is: Create a file in '.csv' or '.slk' format. Then open the file with 'ShellExecute' command. NOTE: These formats don't support graphs, only data.
  2. crux

    Disable System Keys?

    This problem only occurs in Dialog Based Projects, or in dialogs. You can overwrite the OnCancel() function: void CYourDlg::OnCancel() { } then change the id of the cancel-button and add to this button the original OnCancel: void CYourDlg::OnCancel() { CDialog::OnCancel(); } In...
  3. crux

    Create DLL

    creation of DLL: create a project with MFC AppWizard (dll) in the .def file you name your entry's without arguments: FUNCTION1 FUNCTION2 etc. in the .cpp file write the functions: int FUNCTION1( char* a , etc ) { } or if this does not work, try: int __stdcall FUNCTION1( ) { } to...
  4. crux

    Converting Micro-Focus To RM/Cobol-85

    Thanks Betty, In fact you can use both in MF-Cobol: pic 9(02) comp-x. pic x(02) comp-x. comp-x is used to store unsigned binary data. If you use 'pic x' the physical size of the item is exactly the size you define, and if you use 'pic 9' the size is calculated: pic x(02) comp-x is 2 bytes. pic...
  5. crux

    Can't register DLL

    Try this: HINSTANCE h = LoadLibrary( "xxxxxx.DLL" ); if ( h == NULL ) { AfxMessageBox( "unable to load 'xxxxxx.DLL'." ); return; } typedef int ( *REG ) ( void ); REG f_reg = ( REG ) GetProcAddress( h , "DllRegisterServer" ); if ( f_reg == NULL ) { FreeLibrary(...
  6. crux

    Converting Micro-Focus To RM/Cobol-85

    RonaldB, i agree.
  7. crux

    Converting Micro-Focus To RM/Cobol-85

    Obviously Betty never worked with MF-cobol. Pic x(2) comp-x copiles very well. I would appreciate she first checkes things before acusing me of puting code on this forum that will give compile errors.
  8. crux

    MY MENU ITEMS ARE DISABLED WHEN BUILT AND RUN EVERYTIME

    Get some books, i recommend: Teach yourself Visual C++ in 21 days by Gurewich+Gurewich Programming with MFC for Windows by Jeff Prosise
  9. crux

    Converting Micro-Focus To RM/Cobol-85

    In MF comp-x is unsigned binary starting with the high-order bytes. For example: pic x(4) comp-x value 1 would be hex: 00 00 00 01 pic x(4) comp-x value 255 would be hex: 00 00 00 FF so: pic x(1) comp-x is 1 byte maximum value 255. pic x(2) comp-x is 2 bytes maximum value 65535. pic x(4)...
  10. crux

    Best way to run an external program.

    OK, this code works with notepad: it will put your executable in the foreground, in the clients rectangle: STARTUPINFO si; PROCESS_INFORMATION pi; memset(&si, 0, sizeof(si)); si.cb = sizeof(si); si.dwFlags = STARTF_USESHOWWINDOW | STARTF_USEPOSITION | STARTF_USESIZE...
  11. crux

    Best way to run an external program.

    // starting an executable: STARTUPINFO si; PROCESS_INFORMATION pi; si.cb = sizeof(si); si.dwFlags = STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOWMINNOACTIVE; CString exe = ... CString dir = .... CreateProcess( exe , NULL , NULL , NULL , FALSE , 0 , NULL , dir , &si , &pi ); // ending the...
  12. crux

    how can I auto-validate a dialog after it displays?

    in OnInitDialog: SetTimer( 1 , 100 , NULL ); Add WM_TIMER and then: void CYourDlg::OnTimer(UINT nIDEvent) { if ( nIDEvent == 1 ) { KillTimer( 1 ); AfxMessageBox( ........... ); } CDialog::OnTimer(nIDEvent); }
  13. crux

    Is it numeric

    If you create a derived class from CEdit and overwrite the fuction OnChar() ( WM_CHAR ) than you can prevent alpha-characters coming in to the control: void CYourClass::OnChar(............) { if ( nChar < 48 || nChar > 57 ) { MessageBeep( ( WORD ) ) - 1 ); return; }...

Part and Inventory Search

Back
Top