|
hi,
Iam using a barcode reader which reads barcodes into any open windows
text,excel files.
the thing is, iam catching this barcode text into an edit box.
but i have found there is no way to tell wether the edit box is filled
by barcode reader or user typed into it.
the barcode reader has no driver and just reads and displays text
inside an open document/editbox.
by debugging, i have seen the reader generates WM_KEYDOwn messages
which is same as when a keyboard is physically pressed.
can any one tell me how to tell if a user has actually pressed the keyboard
instead of a virtual message generation.
Rgds,
Mahesh
|
|
|
|
|
Look at MW_KEYDOWN, WM_CHAR, and WM_KEYUP - read then *all* carefully and that should give you what you need.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
ACtually spart from the Pretranslate message, where in i check for the
WM_KEYDOWN message for filtering, im not getting any keydown evenet
either in OnKeyDown,Onchar functions.. this is strange and am
trying to figure out whats the issue !
Rgds,
Mahesh
|
|
|
|
|
Hello
My doubt is regarding printer UI page that appears when we select print from an application. Can we replace the default printer page that appears when we select Print from an aplication program such as MS_Word with our own custom print dialog page ? If it is possible, which function in GDI, i have to redirect to ?
Thanks in advance
|
|
|
|
|
I added a C# webservice in C++ but how do you use it in C++?
My brain is 2 small for all the knowledge that I need.
|
|
|
|
|
How do you quote or post code?
[code]text[/code]
[quote]text[/quote]
text
got it!
|
|
|
|
|
Use the
pre and code
items on the Formatting bar below the message compositin area.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
I would like to know how to code using vc++ to find the current processes and applications .
|
|
|
|
|
|
You could try the following code I modified to determine if a process is still running, deals with multiple instances:-
bool CExampleDlg::CheckProcess(CString processName, int instance)<br />
{<br />
<br />
<br />
HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);<br />
PROCESSENTRY32* processInfo = new PROCESSENTRY32;<br />
processInfo->dwSize = sizeof(PROCESSENTRY32);<br />
bool returnValue = false;<br />
bool handleFound = false;<br />
DWORD processID = 0;<br />
HANDLE CSLProcess = NULL;<br />
<br />
<br />
returnValue = false;<br />
handleFound = false;<br />
processID = 0;
Process32First(hSnapShot,processInfo);<br />
<br />
if(strcmp(processInfo->szExeFile, processName) == 0)<br />
{<br />
processID = processInfo->th32ParentProcessID;<br />
if(instance == 0)<br />
{<br />
returnValue = true;<br />
handleFound = true;
}<br />
else<br />
{<br />
if(processID == Idux_ProcID[instance - 1])<br />
{<br />
handleFound = true;
returnValue = true;<br />
}<br />
}<br />
}<br />
while((Process32Next(hSnapShot,processInfo)!=FALSE) && (handleFound == false))<br />
{<br />
if(strcmp(processInfo->szExeFile, processName) == 0)<br />
{<br />
processID = processInfo->th32ProcessID;<br />
if(instance == 0)<br />
{<br />
returnValue = true;<br />
handleFound = true;
}<br />
else<br />
{<br />
if(processID == Idux_ProcID[instance - 1])<br />
{<br />
handleFound = true;
returnValue = true;<br />
}<br />
}<br />
}<br />
}<br />
<br />
CloseHandle(hSnapShot);<br />
delete processInfo;<br />
<br />
return returnValue;<br />
}
|
|
|
|
|
need information regarding the compatibility abt the vc++ 6.0 with vc++.net
can code written in vc+ 6.0 will run on vc++.net?
pls give me all compatibility issues between these two technology
|
|
|
|
|
What's the difference between type RGB and YUV type?
free like a bird
|
|
|
|
|
http://encyclopedia.thefreedictionary.com/YUV
rrrado
|
|
|
|
|
See if either of these help:
http://www.bnoack.com/index.html?http&&&www.bnoack.com/video/RGB_YPrPb.html
http://www.animemusicvideos.org/guides/avtech/colorspace.html
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello everyone!
I want capture a picture from a playing file(the file is now playing at my display)
it support 16-bit YUYV type.
BITMAPINFOHEADER bih;
the question is:
How to write the parameters of bih?
such as
bih.biCompression,
bih.biXPelsPerMeter,
bih.biYPelsPerMeter,
bih.biBitCount.
Cause I'm a freshman,please explain in detail!
Thanks!
free like a bird
|
|
|
|
|
go on the former question..........
Should I write the parameter bmiColors of BITMAPINFO?
if need,how?
And what's type it is?
what's regulation should I must obey?
Thanks!
free like a bird
|
|
|
|
|
|
Just started to try and use the CToolbar class on my MFC Dialog application.
Finding it a bit strange to use and dont know where to put the events (e.g. open file etc).
Does anyone have/know where a good example is as all I have found are MDI and SDI examples.
Note I have got he Toolbar on display, but would like to position it and attached events.
Regards,
|
|
|
|
|
I wang to get all font supported by system with API EnumFonts,but i don't know how to use it ,and i dont know what i should do in callback.if u know how to do,give me some code,thanks.
Happy Gemini
|
|
|
|
|
Have you consulted MSDN?
int CALLBACK EnumFontFunc( CONST LPLOGFONT, CONST LPTEXTMETRIC, DWORD, LPARAM )
{
return 1;
}
int nReturn = EnumFonts(hDC, lpszFaceName , EnumFontFunc, 0);
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
What is the difference between
char *ptr="babu"
char ptr[]="babu"
babu
|
|
|
|
|
Nothing...
The 2nd declaration is more readable through the program, as it is clear that you are using an array.
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
There is a difference, check the disassembly
127: char aaa[] = "ssss";
004B423D mov eax,[string "ssss" (005fd498)]
004B4242 mov dword ptr [ebp-18h],eax
004B4245 mov cl,byte ptr [string "ssss"+4 (005fd49c)]
004B424B mov byte ptr [ebp-14h],cl
128: char *bbb = "bbb";
004B424E mov dword ptr [ebp-1Ch],offset string "bbb" (005fd46c)
129:
130: char *cc;
131:
132: cc = bbb;
004B4255 mov edx,dword ptr [ebp-1Ch] ; address of string is loaded from memory
004B4258 mov dword ptr [ebp-20h],edx
133: cc = aaa;
004B425B lea eax,[ebp-18h] ; cc just gets address
004B425E mov dword ptr [ebp-20h],eax
rrrado
|
|
|
|
|
char *ptr -> ptr is pointer to memory, where the string is stored, you can set it later to point to another string.
char ptr[] -> array, you can only change string content ... i think shis will consume 4 bytes less memory than first definition
rrrado
|
|
|
|
|
hi,
i have an application wich load a dll:
typedef void (__cdecl DRDNDLL)(int);
void CProjectDoc::OnTest() {
CString str = "DrDnDll.dll";
HMODULE hmodule = ::LoadLibrary(str);
if(hmodule != NULL) {
DRDNDLL* dllFunc=(DRDNDLL*)GetProcAddress(hmodule,"Test");
if (dllFunc != NULL)
dllFunc (1);
else
AfxMessageBox("Error-GetProcAddress");
else {
CString dllstr = "Error-LoadLibrary: Can't find "+str;
AfxMessageBox(dllstr);
}
FreeLibrary(hmodule);
}
in the dll i have a dialog which is non-modal:
extern "C" __declspec(dllexport) __cdecl Test (int tst) {
Dlg_Test* dlg;
dlg->Create();
}
but the dialog calling crashed.
can anybody help me?
thanks frank
|
|
|
|