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...
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...
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
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...
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 =...
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?
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...
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...
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...
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?
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]
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)?
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".
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.