|
ComboBox - turning OFF autocomplete in CE... in Windows CE (VC++ 3.0, Pocket PC 2000) the combo boxes do autocomplete (it looks up the first string with the same first char you type in, then fills the edit box with that whole string). THIS IS VERY ANNOYING in CE, especially when trying to use the soft-keyboard to actually enter or EDIT a new string in it's edit box. One beta tester nearly left the room in a rage because she couldn't figure out how to "beat the system". Ugh...
Any Hints? Anyone? Beuller?
Carlos
|
|
|
|
|
Hmm. I left my pda with the testers today, but as far as I remeber, CComboBox'es doesnt automatically do autocomplete in the edit box, they do it in the small popup window over the SIP. Maybe this is a feature in your program, or maybe Im just remembering it wrong?
Anyway, to disable the autocompletion that the SIP offers (handy on PPC 2000's since they do it for editboxes with ES_PASSWORD too) do this:
<br />
SIPINFO info;<br />
SHSipInfo(SPI_GETSIPINFO, 0, &info, 0);<br />
info.fdwFlags |= SIPF_DISABLECOMPLETION;<br />
SHSipInfo(SPI_SETSIPINFO, 0, &info, 0);<br />
SHSipPreference(m_hWnd, SIP_FORCEDOWN);<br />
SHSipPreference(m_hWnd, SIP_UP);<br />
And to turn it back on:
SIPINFO info;<br />
SHSipInfo(SPI_GETSIPINFO, 0, &info, 0);<br />
info.fdwFlags &= ~SIPF_DISABLECOMPLETION;<br />
SHSipInfo(SPI_SETSIPINFO, 0, &info, 0);
“Our solar system is Jupiter and a bunch of junk” - Charley Lineweaver 2002
|
|
|
|
|
I need a C/C++ program able to detect some peculiarity of the PC (as
the number of the partitions of the hard disk, the number and the label
of the disk C, ecc.) if it is possible without calling the "system"
statement (calling the "system" statement I see alwais the DOS window).
Can you help me ????? - I work with Visual C++ compiler.
Many thanks - Giovanni
|
|
|
|
|
This depends on your target OS.
For both Win9x and NT-kernel based Win32 implementations you can:
To get the drive letters mapped:
GetLogicalDrives() and/or GetLogicalDriveStrings().
To get the label of a volume (note: there is no label for a disk) you can use GetVolumeInformation().
For NT only you can get disk information (partitions and so on) using DeviceIoControl() with e.g. IOCTL_DISK_GET_DRIVE_LAYOUT.
To get the same info from Win9x I believe you have to resort to BCB (DOS, anno 1982) and 16-bit code, but I might be wrong.
If you want to get the GUID's of volumes (introduced in NT5) you can get to them using NT5+ only API's such as FindFirstVolume.
Also, there is no C or C++ "statement" called "system". system() is a C library function.
++luck;
|
|
|
|
|
i need to select a tree item by coding:
CTreeCtrl::SelectItem(hItem);
if hItem is invisible (scroolled out of view range), system auto scrolls the item into view range.
but i don't want to scroll the item.
so, how to call CTreeCtrl::SelectItem(hItem) or other function but not scroll hItem?
thx
includeh10
|
|
|
|
|
Have you tried setting the state directly by:
CTreeCtrl::SetItemState( hItem, TVIS_SELECTED, TVIS_SELECTED );
Dave
|
|
|
|
|
thanks, it is "as is" ok, but...
tree.SetItemState(hSel,TVIS_SELECTED,TVIS_SELECTED);
HTREEITEM h0=tree.GetSelectedItem();
as test, h0!=hSel.
even hSel looks as been selected (it has a selection mask).
do u have more good idea?
thx again
includeh10
|
|
|
|
|
This maybe a vague question but.. I have a fairly simple CAsyncSocket chat application (client/server). I would like to be able to send or receive files through CasyncSocket. Is this possible or do I have to use some other Class?? If its possible where would be a good place to start researching this? If it's not possible what class would be the best for sending and receiving files?
Thanks in advance!!
Rob Jones
|
|
|
|
|
Never mind I figured it out.
|
|
|
|
|
I need your help programmers , i need it for a project .
|
|
|
|
|
Look at the following article first:
http://www.codeguru.com/ieprogram/enumIE.html
After you find the active instance of IE, you can simply use the COM Interface IWebBrowser to do what you want.
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
<nobr>They say I'm lazy but it takes all my time
|
|
|
|
|
Can some one help me?
in my program i need to know when the user hits Enter.
can some one tell me how do I test if the user has hit enter?
thank you.
(I'm programming in C)
|
|
|
|
|
In WM_KEYDOWN, check for VK_ENTER. Something like that.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
In the past, whenever I began noticing erratic behavior in VC++ 6.0 IDE, I would delete the ".dsw" file and let it create a new one when next I do a "Rebuild All".
This time I did exactly that, but when I did a "Rebuild All", strangely, VC++ didn't create a new ".dsw" file, and naturally when it went to link the files, it produced all sort of linkage errors.
First of all, why didn't VC++ create a new ".dsw" file, and perhaps just short of reinstalling VC++, what can be done that will let it resume following tradition? (I've already tried shutting down VC++ and then bring it back up, followed by reloading the project (etc.), but that didn't help.)
As a footnote, there is a Gbyte of memory on the machine, so that is not a factor, and while it is true I haven't hugged my machine lately, this is no way (I feel) for it to treat its user who has never lifted a finger in abuse to it.
Thanks.
William
|
|
|
|
|
AFAIK, .dsw files are the visual studio workspace project file, and should be recreated when loading a .dsp file and doing a "save all". normally, when Visual Studio starts going bad, it's the .ncb file that needs to be removed. and always to be done when the projects are closed.
Max.
|
|
|
|
|
Interestingly, I did delete the ".ncb" file after closing the project, and VC++ would dutifully create another one.
To add to the frustration, it is ONLY when I do a "Rebuild All" that I get all those linkage errors. If I were to just do a "Build", I'd get a clean compile and no error messages, but I'd also NOT get an object module and the program would not run.
UPDATE!!!
After several tries involving reloading the project, VC++ did create a new ".dsw" file, but the creation of a link module still doesn't happen.
William
|
|
|
|
|
You should not delete dsw file. It's a workspace file containig list of projects (stored in dsp files). Delete ncb file when the IDE is making problems.
If you already deleted the dsw file, try to open the dsp file, VS should create an dsw for it - only this one. If you had other projects in the workspace, add them manually.
Pavel
Sonork 100.15206
|
|
|
|
|
I want to get a handle to one of my toolbar buttons to disable it when its function is inappropriate. Yet, none of the CToolBar methods seem to have anything to do with disabling buttons... or am I missing something?
Seems like disabling (graying-out) a button should be easy enough, but my documentation says nothing about it. Anyone...?
|
|
|
|
|
|
Aha.
Anyone know offhand the easy way to get a handle to my mainframe's m_wndToolBar so I can send this message?
|
|
|
|
|
It's kept as m_wndToolbar in your CMainFrame class, however the proper way to disable buttons is to write an UPDATE_COMMAND_UI handler for that particular button's ID. That way MFC will automatically call your handler so you can disable the button (and associated menu item, if there is one).
--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I have a dialog based app, whose main dialog (dlgMain ) has 3 buttons: "Exit App" (which exits the app), "Create Modeless Dialog" which creates a modeless dialog (dlgModeless ), and "Options", which displays a modal options dialog.
dlgModeless also sports an "Exit App" button. dlgModeless 's handler for "Exit App" simply delegates the task to dlgMain by posting it the appropriate WM_COMMAND message.
The user performs the following actions:
- Clicks "Create Modeless Dialog" in
dlgMain , causing the modeless dialog to appear.
- Clicks "Options" in
dlgMain , causing the modal Options dialog to appear.
- Clicks "Exit" in
dlgModeless , causing dlgMain to exit. While exiting, dlgMain properly destroys the modeless dialog. The problem is the modal "Options" dialog is still hanging around as an orphan window. I need to modify dlgMain 's "Exit App" handler to ignore the command if a modal dialog is being displayed.
My question is, how do I detect this without using ugly booleans? I was looking for Afx.../CWnd/Win32 calls to check this, but have come up empty handed.
Thanks,
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Two ways come to mind:- Make the modal dialog a member of your app or main frame class, then you can call
IsWindow() to tell if the dialog is open. - Call
IsWindowEnabled() on your main frame, which will return TRUE if it is disabled because the modal dlg is open.
--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Hi Mike,
Actually the example I gave was a simplistic version of the real problem. In reality, the main dialog can display one of numerous modal dialogs (in response to various commands). I was hoping there would be a generic way to check if a window has a descendant modal dialog in progress.
Your IsWindowEnabled() trick fits the bill poifectly! Now why didn't I think of the obvious?
Many thanks!
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Greetings...
I want a have Excel like flat tab in my application at the bottom of my tab control.
Can somebody suggest me a way or any article on net which tells me how to go through it.
I am not using MFC, only Win32 APIs
Thanks in advance.
Ritesh
|
|
|
|