|
You should ask Tom Archer or Nish for that. They are the experts for this.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hi There,
I've made a key accelerator table, and I've linked this one to my app. But how do I associate the message from the accelerator to a function?
Is this also possible in a dialog based app?
Thanks,
|
|
|
|
|
A keyboard accelerator generates (through the ::TranslateAccelerator function) a WM_COMMAND message with the identifier you've assigned in the accelerator table.
In MFC, CFrameWnd::PreTranslateMessage calls ::TranslateAccelerator for you. Handle the message with an ON_COMMAND macro. For a raw API application, you should add a call to TranslateAccelerator in your message loop and handle the message in your window's window procedure.
For an MFC dialog-based application, override PreTranslateMessage and add a call to TranslateAccelerator . Again, handle with ON_COMMAND .
Note that menu items, command buttons, toolbar buttons and accelerators all generate WM_COMMAND messages. You should assign all items in the above categories which perform the same operation the same identifier (e.g. ID_FILE_SAVE for the File > Save menu item, the Save button in the toolbar, and the Ctrl+S key combination).
|
|
|
|
|
hi,
i want to use the function StrRetToStr(...) in a Console Application, i have included the corresponding file Shlwapi.h and the library Shlwapi.lib but the function isn't declared in them ? is this a bad joke from microsoft ??
Does this function exist at all ?
Thanks in advance !
|
|
|
|
|
Hi,
What IE version u have ?
Use the func below. Check if same thing happening with this also
StrRetToBuf
The chosen One
|
|
|
|
|
StrRetToBuf also doesn't exist/work !
|
|
|
|
|
What @ IE version u r having on ur machine?
The chosen One
|
|
|
|
|
|
i have the one which came with VS6!
Can you give me a favour, and send me the shlwapi.h which came with the SDK ?
Thanks in advance!
|
|
|
|
|
All these functions are exported from Shlwapi.dll (7/24/2002) as (ASCII: StrRetToBufA, UNICODE: StrRetToBufW etc)
If not included in your version of Shlwapi.h you could consider checking in the latest W32 SDK (note that the standard MSDevStudio files are usually quite out of date).
Quick solution might be to add its declaration yourself in your code.
You would need of course to make sure that the right version of Shlwapi.dll is installed on the target system
|
|
|
|
|
After using VS.NET c++ for several hours and doing many "find in file" operations. Find in files will hang at the begining of a search and you will not be able to interrupt it. If subsequently you try to do a normal Find the whole application hangs.
Has anyone else noticed this?
I seen a newspost saying that pressing ctrl scroll
lock may fix this, but I tried that and it does not work.
I am using Microsoft Development Environment 2003 Version 7.1.3088 under Windows XP.
|
|
|
|
|
Hi.
I'm using FindFirstChangeNotification to get an event about a new file being created in a specific directory. for some odd reason, calling DeleteFile on that file doesn't do anything.
Even when calling the deleteFile after calling CloseChangeNotification.
Any idea ?
|
|
|
|
|
Have you tried using ::GetLastError() after the delete to check why it fails? Also from memory you can't delete r/o files.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Is the file on your local drive or on a network drive? I could not get it to work on a network drive, only on my local c: drive. I have found some articles on the internet that says it works with network drives and other articles that says it does not work with network drives.
|
|
|
|
|
Hi,
How do i toggle a checkbox? if lets say i want it to be FALSE initially...the moment i click on it...i want it to be TRUE, and so on...how do i do that?? Also, how do i get the state of the check box? Thanks 4 ur help!!
|
|
|
|
|
checkbox is button with style as BS_CHECKBOX
Use GetState() and SetState() of CButton class.
The chosen One
|
|
|
|
|
If you give it the BS_AUTOCHECKBOX style, it toggles automatically when you click.
otherwise, as already said, it's internally a BUTTON class, you can query and change the check state with BM_SETCHECK and BM_GETCHECK (or CButton::SetCheck, GetCheck)
"Vierteile den, der sie Hure schimpft mit einem türkischen Säbel."
sighist | Agile Programming | doxygen
|
|
|
|
|
Hi all,
I have the file strings.mc (from the message compiler).
i want to read it using CStdioFile class....
performing :
CStdioFile file(szFile,CFile::modeRead);
char buff[MAX_PATH];
do
{
file.ReadString(buff,MAX_PATH);
} while (buff != NULL);
doesn't work so good.....
can any1 help?
thanks in advanced
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hi,
add "_UNICODE" in project/settings/C++/general/Preprocessor definations.
CStdioFile file;
CString str;
while( file.ReadString(str))
{
//Do something
}
if u get any linking error with libraries starting or ending with "u" (e.g. uafxcwd.lib), then u need to install unicode support for VC ide on ur machine.
The chosen One
|
|
|
|
|
thanks
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
You need to take into consideration using TCHAR instead of char cause all the charaters in your program are in two bytes.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hello,
(VC++ 6 SP5)
I have a simple MFC dialog-based app with ActiveX control in it.
This is a control written by friend of mine.
VC created a nice wrapper class for me.
Control displays just fine during execution.
THE PROBLEM:
When I try to access a method from the wrapper class, the program compiles
BUT during execution MFC throws exception : Wrong number of parameters.
BUT THE NUMBER OF PARAMETERS IS GOOD!!
Wrapper for the method has a good prototype etc.
This method can be invoked in ActiveX Control Test Container and in some other 3rd party tool.
So... what's going on??
The message pops out during Debug. In Release, no message, no action.
Thanks in advance for any input
Przem
BTW.
Original method prototype:
BOOL CPrismEdCtrl::LinkReport(long report_handle)
Wrapper class method prototype:
BOOL CPrismEd::LinkReport(long REPORT_HANDLE)
----------------------------
"Fate it'seems is not without a sense of irony"
|
|
|
|
|
hi, i am hoping someone can give me some hints as to how to debug a layered service provider.
I have got microsoft's latest sample code from the SDK and it's up and running. i really just want to play around with it to see how it works. The problem comes because after i have compiled and loaded in the LSP dll using the install exe, all the network services are using it even after i uninstall it. this means i can't recompile and overwrite the old dll with a new one because my computer is still using the old one. i can reboot my machine to free it up and then install the new dll but i don't really want to reboot everytime i want to test alterations to my code.
Can anyone help me come up with a way of developing my LSP which avoids this problem?
many thanks
andy
|
|
|
|
|
Hi, I'm a little confused...
Under MBCS the following code works...
---------------------------------------------------------------------
main_doc->SelectByID(au2B(CEditUPara::UComp),au2B("COMPONENT"), 0, 0, 0, &retval);
main_doc->ShowComponent2 ( );
=====================================================================
But under Unicode, i needed to do this for a particular part of the code...
---------------------------------------------------------------------
CString type = "COMPONENT";
BSTR ucomp = CEditUPara::UComp.AllocSysString();
BSTR Type = type.AllocSysString();
main_doc->SelectByID(ucomp,Type, 0, 0, 0, &retval);
main_doc->ShowComponent2 ( );
=====================================================================
The weird thing is that,
---------------------------------------------------------------------
main_doc->IParameter(au2B(Diameter), &dim );
=====================================================================
still works in some other parts of the code...I can compile and run it successfully...Why is this so??
Thanks!
|
|
|
|
|
In MBCS, a 'character' as the user thinks of it may be one or two bytes and in Unicode, it is two bytes.
More info regarding conversion from Unicode to mbcs refer MSDN with key as "MBCS/Unicode conversion"
The chosen One
|
|
|
|