|
hello,
thanks for giving some solution.but please tell me that in which i use this code in OCX or in my project.now i am used that in OCX like this:
CString dStr;
char temp[100];
dStr.getbuffer(temp,dStr.getLength());
but it is giving error like this:
ACR120RWCtl.cpp(810) : error C2660: 'GetBuffer' : function does not take 2 parameters.
So please will u tell me how can pass the parameters.i am not getting back the result to the form.please HELP me.
Thanku,
savitri
|
|
|
|
|
can anybody tell me how to execute an exe from my application in vc++.i tried with winexec but was not able to execute my exe but it worked for executing Notepad.exe..... can anybody help
|
|
|
|
|
philiptabraham wrote: tried with winexec but was not able to execute my exe but it worked for executing Notepad.exe
So why can't you just show us what you tried? Are we supposed to guess how you're writing code?
Also, consider using ShellExecute[^].
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
use CreateProcess or ShellExecute, Does your exe normally runs when you execute it not programmatically.
|
|
|
|
|
Have you read this?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
ThatsMe. wrote: please help me its urgent.
Its better to avoid doing the above task in urgent. Otherwise since it is context sensitive help you end up with incorrect context.
If you are not in urgent give a precise subject and modify the message following guidelines[^] to get an answer
|
|
|
|
|
Rajkumar R wrote: Its better to avoid doing the above task in urgent. Otherwise since it is context sensitive help you end up with incorrect context.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
ThatsMe. wrote: its urgent
That is considered rude on this site.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi all,
I want to convert CString to WCHAR;
i have done this:-
WCHAR wsz[MAX_PATH];
CString szLinkName = _T("Test Mail");
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)(LPCTSTR)szLinkName, -1,
wsz, MAX_PATH);
but i only get "T" in wsz i.e first element....
I am working in VC2005
Can anybody help me in this...
Thanks in advance
|
|
|
|
|
This is the Gabababazillionth time this question is asked. Please learn to use Google[^].
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
neha.agarwal27 wrote: MultiByteToWideChar(CP_ACP, 0, (LPCSTR)(LPCTSTR)szLinkName, -1, wsz, MAX_PATH);
how and why do you decided to use MultiByteToWideChar here?
|
|
|
|
|
Why do it the hard way when there are macros in ATL to do it for you.
#include <atlconv.h>
void MyFunc(WCHAR* s)
{
USES_CONVERSION;
CString str = W2T(s);
}
Just make sure you don't use W2T() in a loop since it allocate memory from the stack.
then use W2T_EX instead and USES_CONVERSION_EX;
|
|
|
|
|
neha.agarwal27 wrote: but i only get "T" in wsz i.e first element....
How are you verifying this?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Google for ipaudit.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
i see ipaudit in google but havn't get ans..?Do you give function or method name?
|
|
|
|
|
What do you mean you did not get an answer? Ipaudit is an opensource software which does what you were looking for.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Do you give me exame link?Becouse i didn't get from google Ipaudit .
|
|
|
|
|
mirtu wrote: me exame link
What is an exame link? Anyways, IpAudit[^].
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
This is puzzling indeed...
Considering that nobody can be that stupid (not being able to google for a simple word), maybe googling from India returns similar nonsense as some of the questions on this board?
|
|
|
|
|
Cranky wrote: maybe googling from India returns similar nonsense as some of the questions on this board?
Not really. I am Googling from India too and I get excellent results.
PS: I did not down-vote you. I've balanced it with a 5 vote.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Well, I wasn't serious.
Thinking about it, it seems that he is simply to lazy to read through the documentation and just needs a quick "fix" for his problem.
|
|
|
|
|
If I have Excel open with multiple documents inside (as an MDI) like this[^], is there a way to get the title of the active child window (or document window) inside? For example, in that screenshot, I'd want "Book3". I can get the names of all child windows using EnumChildWindows, but I don't know how to find out which one is currently active.
A few things I've tried...
- childWindow.isWindowEnabled() returns true for all child windows.
- GetForegroundWindow(..) just gives me "Microsoft Excel".
- fgwin.GetTopLevelFrame(..) gives me nothing.
- CFrameWnd::GetActiveDocument() access to the CFrameWnd object.
Your help will be most appreciated. If it's not obvious, I'm fairly new to Win32 programming.
|
|
|
|
|
Use Excel Automation.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|