|
I'm assuming you want to set dropdown height.
If so,use MoveWindow ? Rectangle height given will be dropdown height including item height.
|
|
|
|
|
I want to set height of list box in combo box. Either programmatically or design time.
|
|
|
|
|
|
|
The easiest way is at design time. In the resource editor, the combobox has two parts: the edit box, and the dropdown arrow. They are sized individually.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
At design time you can follow method already stated by David and malaugh .
Programatically, you need to change size of rectangle.
HWND hCombo = GetDlgItem(hDlg,IDC_COMBO);
MoveWindow(hCombo,...);
|
|
|
|
|
To set at design time, got to the resource editor
1) Click on the combo box
2) Click in the dropdown symbol (down arrow)
3) Drag the outline that appears to the desired size.
|
|
|
|
|
Hi all,
I need to write a loopback routine to test my PC's ethernet chip - and am
planning to just use winsock to achieve a test out the chip and back
... ie. sending from a local client (on my pc), and receiving from a
local server (on my pc). I think this is refered to as EXTERNAL
LOOPBACK.
QUESTION (1) : if I chose to use the 127.0.0.1 loopback address, will
the IP packets actually leave the PC and go out to the network ... and
back into my PC?
OR does this scenario just loopback the data internally (without
packets to the network)?
If I knew how a ping to 127.0.0.1 actually works I'd be in business ...
ie whether this actually fires packets out to the net.
QUESTION (2) : Should I in fact be using 127.0.0.1 ? ... OR should I
use my PC's address instead ?
QUESTION (3) : Would it be advisable to generate my own UDP packets OR
TCPIP packets for the source of data (to be looped back) ... or is
there a simple way to invoke PING programmatically ?
Many many thanks,
John.
jls
|
|
|
|
|
A1: No. If I remember correctly they won't even reach the NIC, it will take a "shortcut" in the ip-stack.
A2: Doesn't really matter. The result will be the same, but using the address of the machine would generate a look-up operation and conclude that it's the same as localhost.
A3: Depends on your needs in my opinion. If you actually want to include the hardware in the test, you have to involve another device.
I suggest you write a small app that runs on another machine so you can connect to it through the ethernet interface. The remote app then can either use ping or some other self-made-up command set to test the interface. On the other hand; if you can connect to the remote machine, then you probably can assume that the NIC works.
Hope this helps
--
Roger
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
Hi,
Anyone know how to detect keyboard inputs?
I am using VC++ 6.0 with MFC using CHTMLEDITVIEW base class.
When my program runs, I can detect the keyboard inputs but when i go to FILE->OPEN->xx.ppt(powerpoint file), i cannot detect anymore.
anyone knows any solutions?
wanted to use onparentnotify() but it only pass mouse clicks not keyboard inputs.
need help.
tks.
rdgs
terr
|
|
|
|
|
You can always use the pretranslatemessage handler.
|
|
|
|
|
hi,
i did tried using pretranslatemessage but it only works if i open a new document from FILE->NEW.
but i am trying to open a powerpoint from my program. ie. FILE_>OPEN_>XX.ppt. then by using pretranslate, it does not detect any keyboard inputs.
you know why?
thanks..
terr
|
|
|
|
|
OK, you must use a system wide keyboard hook.
|
|
|
|
|
The keyboard messages go to the window that has keyboard focus. If it's another application then
you'll need to use a system hook (SetWindowsHookEx()). If you want just the messages to your app
then you can handle WM_KEYDOWN, WM_KEYUP, and/or WM_CHAR messages in the window class of interest.
Mark
|
|
|
|
|
hi,
I am trying to use my program and when i clicked FILE->OPEN->xx.ppt (powerpoint),the powerpoint appears. afterwhich i need to detect keyboard inputs. is this what you meant by "another application" ?
so i should use setwindowshookex()? is it very tedious?
thanks..
terr
|
|
|
|
|
Yes powerpoint is another application (unless you wrote it, of course )
SetWindowsHookEx Function[^]
It's not very tedious. The API is relatively simple. Processing every keystroke and weeding out
the ones you're interested in may be tricky.
Mark
|
|
|
|
|
Hi,
I am trying to use a function CopyFileEx(from,to).
But it gives me - error C2065: 'CopyFileEx' : undeclared identifier
anything i need to declare?
# define _WIN32_WINNT 0x500 is done. it is still giving an error.
Please help.
Thanks
manasi
|
|
|
|
|
1. You need to have latest platform SDK.
2. Your IDE should be configured to include files from latest SDK. VC 6 doesn't includes latest SDK files by default. You need to set those paths using Tools-->options-->Directories .
|
|
|
|
|
Manasi D wrote: # define _WIN32_WINNT 0x500 is done.
It's not enough to assign _WIN32_WINNT the correct value. It also has to be done in the right spot. I find that it's best to place it before any #include statements in the project's stdafx.h file.
Other than that, ensure that the function's prototype exists in your winbase.h file.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I already had SDK installed...
Adding _WIN32_WINNT before #include statements in stafx.h worked!
Thank you all for your help!
|
|
|
|
|
Whats your compiler?it doesnt any problem on VS2005
|
|
|
|
|
Im working on to Create a Tree control having three state checkbox in VC++,
i have completed coding for Tree control with check box but im stucked over
to create Three state check box. If anybody from the forum have any idea about it, then please help me.
Sagar Mahewar
Software Engineer
Cell - 91-9890144989
Email id - sagar_mahewar@yahoo.com
|
|
|
|
|
Hi
I am writting a dll using MFC and ATL component.i.e ATL component implimented on dialog, but it is not working.
If i use the same thing in simple application, it is working fine.Can any body help me regarding this. so that i can use ATL component in DLL.
Thanx in Advance
Niru
|
|
|
|
|
Can you explain in detail, what you have tried ?
aaaan wrote: i.e ATL component implimented on dialog, but it is not working
|
|
|
|
|
I have created a project. I have taken the EXE from Release and tried to run in a system that doesn't have Visual Studio. Its running in some systems and in some systems it's not.
Do I need to install anything? Please help me.
Thanks in advance.
|
|
|
|