|
Hi, i have a problem, there are a lot of interesting activex controls - but they are loaded dynamicaly (or not?) so i'm not sure if all the users will have them - can you help me - are there some ActiveX controls that are installed on every win machine ? For example there is "Microsoft Forms Checkbox" (or socalled) is it available on every win-box ?
thanks a lot for explanation
john
|
|
|
|
|
- Can you help?
- Regards,
BigMouth
|
|
|
|
|
|
- Thanks, Mike pal!
- I do not know what you mean? Do you mean "http://comp.os.linux.*" ? How to check? I am a newbie. Can you help?
- Have a nice day,
Maer
|
|
|
|
|
It means newsgroups with names starting with "comp.os.linux". Newsgroups aren't WWW pages, so there's no "http://". Use your newsreader program (Outlook Express, Forte Agent, etc. under Windows) and subscribe to groups in the comp.os.linux hierarchy. If your ISP doesn't support newsgroups, you can use Google Groups (http://groups.google.com).
|
|
|
|
|
- Thanks pal!
- I have known what you mean. I think there are a lot of news groups that conform to your conditon. (starting with "comp.os.linux")
- Can you introduce some of them that is best for newbies?
- Regards,
BigMouth
|
|
|
|
|
I have found the registry entries for the timezone list and the current Timezone setting. I am assuming (maybe incorrectly) that MS use these two areas to setup the timezone selection combo box in the timedate.cpl aplet. The problem is that you can't rely on the bias entry because more than one entry may be present with the same bias. The strings are different in both areas (as in AUS Eastern Std Time) so how do they select the correct one??
Happy programming!!
|
|
|
|
|
I don't quite understand what you are trying to do, but perhaps you should be calling the GetTimeZoneInformation function?
"Am I talking too fast, or are you just playing dumb? If you want I can write it down." -Jarvis Cocker/Pulp
|
|
|
|
|
I am writing an application where the user should be able to specify a timezone other than the one they are in. I therefore want add a combobox for them to select from - like the timedate applet. (this will not change computer settings) During initialization I want to select the computers present timezone in the combobox, because this is the one used by default.
I however cannot find information from GetTimeZoneInformation that matches well enough to make this selection.
Happy programming!!
|
|
|
|
|
Please help!
|
|
|
|
|
|
Yeah it's ok the simplest way is to use _mk_dir ...... but i didnt know it was now in direct.h and not dir.h!
|
|
|
|
|
If you want to link with the C run-time library it is. Some people have an aversion to this.
By the way, check out the source code for mkdir. It just calls CreateDirectory with a NULL security attributes structure. However, mkdir is the more portable of the two.
|
|
|
|
|
How can i wait an event only for 5 sec?
I have DCB,
HANDLE port;
DWORD dwEvtMask;
CreateFile(port,...);
and after i have
fSuccess = SetCommMask(port, EV_CTS|EV_DSR);
event.hEvent = CreateEvent( NULL, FALSE, FALSE, NULL);
if (WaitCommEvent(port, &dwEvtMask, &event))
{
if (dwEvtMask & EV_DSR)
{
//Something to do
}
}
So, i need to wait only for 5 sec, if i couldn't receive something to commport, how can i stop it? And how can i wait 5 sec?
|
|
|
|
|
I need to send keystrokes to another running process. I already have the hwnd to the process to which I want to send the keystrokes. I'm using this to send the keystrokes. It doesn't work:
::SendMessage(m_fwhs.hWndFound, WM_KEYDOWN, nChar, MAKELPARAM(MAKEWORD(0,(byte)nChar), 0));
::SendMessage(m_fwhs.hWndFound, WM_KEYUP, nChar, MAKELPARAM(MAKEWORD(1,(byte)nChar), MAKEWORD(0,8)));
Can anyone provide any clues?
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
My first guess is that SendMessage() is the problem. Normally a message loop converts WM_KEYDOWN/WM_KEYUP pairs into WM_CHAR or WM_SYSCHAR (that's what TranslateMessage() does). When you SendMessage() a WM_KEYDOWN, your app blocks until the message is processed by the target app. Since the WM_KEYUP isn't in its queue, the result is foobared.
Try changing it to PostMessage().
</wildguess>
--Mike--
http://home.inreach.com/mdunn/
"Not our fault we are intellectually superior to the rest of the office." -- Paul Watson in the Lounge, 12/12/2001
Sonork - 100.10414 AcidHelm
|
|
|
|
|
I had this problem before, and I found some code here http://wwwthep.physik.uni-mainz.de/~frink/nt.html that helped. Scroll to the middle of the page and look for "pushkeys for C".
Hope this helps.
"Am I talking too fast, or are you just playing dumb? If you want I can write it down." -Jarvis Cocker/Pulp
|
|
|
|
|
Recently I ummm ... figured out ... how Microsoft did SendKeys and it is just a bunch of keybd_event calls. So IMHO, just go with the link Daniel listed. It has some examples.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Well yes but with keybd_event you have to rely on the app having focus - the classic vb example calls AppActivate before SendKeys - might be nicer without that.
|
|
|
|
|
Hi,
This example is really a good example but while using it be warned that it is US Locale specific! It may not work with other keyboard locales!
Kind regards
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
|
|
|
|
|
Got caught up in this. Yep, I think PostMessage helps (as you may have already seen), and setting the proper transition flag - on for WM_KEYUP. I think you already have the repeat count right.
The ugly processor hogging code below also borrows from the sample mentioned to get the scan code and stuff, but I don't think the scan is needed.
This code doesn't check the alt, shift, ctrl keys etc, but I assume it could send things like Alt+F4 if it did. Could be one for the FAQ with a bit of work. - 'Write a SendKeys(HWND, LPCTSTR) function...'
Note the elegant hardcoding of the hwnd (er... Calculator )
#include "stdafx.h"
#include "crtdbg.h"
#include "conio.h"
#include "windows.h"
#include "winbase.h"
int main(int argc, char* argv[])
{
HWND hwnd = (HWND) 0x025c;
INT Vk;
INT Scan;
CHAR character[2];
CHAR oemchar[2];
CHAR ch;
do {
while(!_kbhit());
ch = getch();
character[0]=ch;
character[1]='\0';
Vk = VkKeyScan(character[0]) & 0xFF;
CharToOem(character, oemchar);
Scan = OemKeyScan(oemchar[0]) & 0xFF;
printf("Key = %c, VK code = %d, scan = %d\n", ch, Vk, Scan);
UINT lKeydata = 0;
UINT mask = 1;
lKeydata |= mask;
lKeydata |= Scan << 15;
::PostMessage(hwnd, WM_KEYDOWN, Vk, lKeydata);
lKeydata |= mask;
lKeydata |= Scan << 15;
lKeydata |= mask << 31;
::PostMessage(hwnd, WM_KEYUP, Vk, lKeydata);
}
while(1);
return 0;
}
|
|
|
|
|
That helped A LOT! Only problem is it doesn't support shifted keys (capital letters, etc). Is there something special I have to do?
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I _think_ the first thing I'd try is sandwiching the key to be shifted (or ctrl'd or alt'd) between the up and down messages for the VK_SHIFT (or VK_CONTROL, VK_MENU).
send keydown for shift
send keydown for char
send keyup for char
send keyup for shift
If the char gets there before the shift key goes up it should look like the user pressed it while the key was held down.
Hmmm... should work, but why is my spidey sense tingling...
|
|
|
|
|
My view class is richeditview ,and users enter some string
into it,the length of string is unlimited,it maybe
become one page or two page or...How should I set the attribute
for printing?I mean how does my application should determine
the legnth and size of printing pages and print it correctly
in each page?(something like ms word or notepad do)
|
|
|
|
|
Hi.
I often post questions about C++ status relative to other programming languages as well as how to get specific programming working under C++.
I want to switch direction for once and ask about good programming technique. I am at a point where programming with C++ is no longer intimidating unless it involves something that requires creating an entirely new data structure.
How do you define good programming technique?
Ultimate, the better the programming technique including program design, the more efficient the final program will operate. Furthermore, the program file should be smaller while undoubtedly producing the same result. I often find myself implementing if/else, while/do while and using bool as a "count" to manage the if/else and loops. In terms of effective programming, is that good practice? Do not get me wrong. I use only what is required and nothing more. It is just that sometimes the section of the program I work on need that kind of technique. I would like inputs from experience programmer about implementations that increase performance.
Last, I read Deitel & Deitel C++ How to Program and Accelerat C++ by Andrew Koenig and Barbara E. Moo quick because it is such a short book. I prefer Deitel & Deitel C++ How to Program because it is a complete book. I have never come across a more complete and effective C++ book such as C++ How to Program. Nonetheless, I find Koenig and Moo implementing more involved programming techniques such as using more STL in function parameters, returning STL and lastly calling functions within functions. Maybe these technique seems different because of the way Koenig and Moo wrote their book when. They seems to like everything compact.
Kuphryn
|
|
|
|