|
«_Superman_» wrote: uOffset is declared as UINT (unsigned int). So it is not a string.
uOffset is an offset to a string. I was wondering whether the string it's "pointing" to was ANSI or Unicode.
«_Superman_» wrote: ANSI or UNICODE is not dependent on the OS.
It depends on whether the macro UNICODE or _UNICODE is declared or not.
For example, LPTSTR (TCHAR*) becomes LPSTR (CHAR*) if UNICODE is not declared and LPWSTR (WCHAR*) if UNICODE is declared.
I know about the TCHAR stuff. The reason I mentioned the OS was because I was thinking since Win9x used ANSI internally (mostly, I think) and WinNT used Unicode (but supported programs compiled for ANSI for compatibilty), the string inside the PIDL where uOffset is "pointing" would be that type.
|
|
|
|
|
In that case, the string is a unicode string.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
«_Superman_» wrote: In that case, the string is a unicode string.
Um, if you don't mind me asking, how do you *know*. I was just guessing on how it (the PIDL) works internally.
|
|
|
|
|
Please can someone help.
I am trying to run an application on a machine that does not have Visual Studio 2008 installed.
I am getting an error message "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem."
It's only a one dialog application. Nothing fancy. The controls used are combo boxes, edit control, static text control and list control.
I have installed the distributable libraries on this machine. I have compiled my code under release mode. Update the machine with all patches from Microsoft update as well.
I used the setup and deployment wizard too to see if that would solve my problem.
What else could I have missed?
Can someone please help.
|
|
|
|
|
Are you trying to run Debug/Release version?? Debug version will cause lot of these kind of problems.
|
|
|
|
|
FISH786 wrote: I have installed the distributable libraries on this machine.
How did you do that exactly ?
TO be able to run such an application on a machine were Visual Studio is not installed, you need to install the Visual C++ 2008 Redistributable package[^] on the target machine. This takes care of installing the required libraries (C run-time and MFC libraries). You can't do the same as with VC6: simply copying manually some files won't work.
|
|
|
|
|
Cedric Moonen wrote: you need to install the Visual C++ 2008 Redistributable package[^] on the target machine.
Yes, I read about that when I searched for this error before posting this message.
Not sure what else to do, even reinstalled the operating system, got all the current updates. and installed the redistributable and yes I did compile it in the release instead of debug. Are there any options that need to be changed when I do a release compile.
I even tried a new project created by the wizard same result in the realease mode.
Do I have to change any other options when in release mode?
|
|
|
|
|
Hi
I derived a class from "CString". I defined a function "Value" as following. I got a compiling error. How can I fix it?
float& CStringEx::Value(float& n) const
{
n = (float)atof(GetBuffer());
return n;
}
error C2663: 'ATL::CSimpleStringT<BaseType,t_bMFCDLL>::GetBuffer' : 2 overloads have no legal conversion for 'this' pointer
with
[
BaseType=char,
t_bMFCDLL=true
]
modified on Tuesday, June 9, 2009 6:41 PM
|
|
|
|
|
The problem is with const keyword because GetBuffer() returs non-const.
And you may also have to use _tstof() instead of atof().
|
|
|
|
|
Ozer is right in that GetBuffer() is the problem. But you don't need to call that since you don't need write access to the CString 's buffer. Pass *this to atof() and the compiler will insert a call to the LPCSTR converter for you.
--Mike--
|
|
|
|
|
|
I have an MFC form that can be opened in a 'read-only' mode. Is there a way to somehow keep the selection shown while disabling a group of radio buttons
|
|
|
|
|
Use EnableWindow(FALSE) .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Disabling a radio button doesn't change the state of it. If it's selected/checked before disabling, it will remain selected/checked but dimmed.
|
|
|
|
|
Yes, but you can't tell the radio button is selected by looking at it (it loses the black circle indicating selection). You can access that information in code, but how does the user know what was previously selected?
|
|
|
|
|
Normally, its visual state (black circle) shouldn't be changed, too, except for dimming, of course. Normally means, at first, your radio button is in windows' standard RADIOBUTTON class (or its MFC counterpart, CButton).
It's possible that it may be an owner draw button or sub-classed one or even a complete custom control. if so, the problem may be with its drawing routine.
Sometimes, OS itself shows some strange behavior due to a sw./hw. problem (may be graphic card driver). I recommend to try it on another machine.
Although I think that this is standard behavior, (latest) windows version differences should also be considered (e.g. Windows7, Vista).
|
|
|
|
|
So, this isn't the same request as most other requests of this topic.
My idea is to hook it just for one particular application. I'm desiring to sandbox an application, aka application virtualization.
So, take a written application, wrap it with my code which hooks all the CreatefileA, CreatefileW, etc... made by this application. I assumed it would be easier than hooking the system api, but honestly, I'm not so sure after I've been looking around!
My hope is to start an open source application virtualization which will be like ThinApp (Thinstall), and the microsoft one too.
Any ideas, or pointers to existing open source projects? (I haven't found one...)
Dave Smith
|
|
|
|
|
Perhaps Detours[^] will help you.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Can you modify how the application is built? If so, you could create a replacement for kernel32.lib, user32.lib etc that the application could link against. This CP article[^] could help with creating the interception DLL
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Does anyone knows how to create a dynamic recorset in c++? like in VB recordset rs=new adodb.recordset, rs.fields.add...
|
|
|
|
|
|
rajeshkumar1.s wrote: Does anyone knows how to create a dynamic recorset in c++?
What about:
recordset rs = new recordset();
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Great!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I've got a custom control class that derives from CStatic that should handle WM_RBUTTONUP within its code. unfortunately this message is always redirected to the parent window (a CDialog). What can i do?
Don't try it, just do it!
|
|
|
|
|
Just a guess here but does your static maybe have the SS_NOTIFY style set? If yes then try removing it.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|