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: branyesz
  • Order by date
  1. branyesz

    How to get the process handle?

    The following code fragment looks for any process you wish to kill. You just have to replace the "ProcessToKill.exe" with the desired process. OSVERSIONINFO OSVersion; OSVersion.dwOSVersionInfoSize=sizeof(OSVERSIONINFO); if(!GetVersionEx(&OSVersion)) return; HANDLE hProcess...
  2. branyesz

    Declare and call function of DLL in VC++

    This is a sample code how to call a DLL function. In this case the DLL is "Kernel32.dll" and the function is "CreateToolhelp32Snapshot". HMODULE handleToDLL; /* you will need this handle in the "GetProcAddress" function call*/ /* here you load the desired DLL in...
  3. branyesz

    Declare and call function of DLL in VC++

    Yes. First you have to load the DLL with LoadLibrary function, and then you have to find the address of your DLL function by calling GetProcAddress. MSDN has enough info on these functions but if you are interested in details, please reply Lorand
  4. branyesz

    Set dialog text font style and color

    You need to define your own desired fonts with CreateFont. After that you can select the returned handle with SelectObject into the device context for painting the control. You should do this in the OnPaint function of each control. In this case you have to derivate your own classes for the...
  5. branyesz

    how to print out value into the edit box

    Hello, Amulet The RegQueryValueEx function returns in its last parameter the size of the data actually read (in bytes). So you just have to check this value (in this case dwBufLen) and you know if the barcode is 8 or 10 bytes long. Try the following modification in the code: ......... lRet =...
  6. branyesz

    how to print out value into the edit box

    Maybe the buffer you display is not initialized with the default values (0) before you fill it with the numbers. Can you show me the code for filling the buffer with the values and displaying it in the editbox?
  7. branyesz

    how to print out value into the edit box

    Is m_txtType a CEdit control? The code you use to display the value has to work. The problem must be something else. Do you use the default settings for the edit control properties(in the resource editor)? Is your editbox long enough to visualize the whole data? Have you tried to display in it...
  8. branyesz

    Making a VC++ app have process "priority" on WIN2K programatically

    Yes it is, this is what MSDN writes about it: The SetPriorityClass function sets the priority class for the specified process. This value together with the priority value of each thread of the process determines each thread's base priority level. BOOL SetPriorityClass( HANDLE hProcess...
  9. branyesz

    Set dialog text font style and color

    The font style can be changed easily on the "General" tab of the dialog properties by pressing the "Font..." button. To change the color, you have to implement your own message handler function for WM_CTLCOLOR. It can be added by ClassWizard. In this function you have to...
  10. branyesz

    how to print out value into the edit box

    Normally, a 29 char string can be displayed in an editbox. Do you have a fixed length string variable attached to your editbox? How do you try to display that value?
  11. branyesz

    Problems Getting OCX Events

    I don't know, but just for curiosity, try it without adding a member variable to the control(referring to it instead by (CYourControl*)GetDlgItem(ID_YOURCONTROL,m_hWnd)->...) I cannot guarantee that it will solve your problem, but I should try... [bigcheeks]
  12. branyesz

    Reading data in from Excel

    Yes, it is possible to automate Excel with Visual C++. If you are interested in details, tell me.
  13. branyesz

    VC6++ resource editor

    No, the shared resource cannot be the problem. Maybe if in the resource.h there is something else declared with the same ID...I don't know. Is your app multithreaded? How do you display the dialog box(modal or not)?
  14. branyesz

    VC6++ resource editor

    Do you use a picture control, with a bitmap resource? Check the properties of the picture control, if it is visible and its type is "Bitmap".
  15. branyesz

    formatting of data

    Your example was 12345. This is 3039 in hexa. So you can send first 30H and after that 39H(the order is irelevant) ...... __int16 yourNumber=12345; BYTE firstByte, secondByte; firstByte=BYTE(yourNumber>>8);//now firstByte is 30H yourNumber=yourNumber<<8;// yourNumber become 3900H...

Part and Inventory Search

Back
Top