|
neha.agarwal27 wrote: I want to convert my LPCSTR value to char* how to do so.
will strcpy help?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Thats wrote: I want to convert my LPCSTR value to char* how to do so.
will strcpy help?
How could he know? Without seeing his problem clearly?
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Offcourse
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
HI...
you using unicode or muli-byte characters??
Best Regards
|
|
|
|
|
If u have compiled your program with UNICODE and _UNICODE defined, then LPTSTR will automatically become LPWSTR (Long pointer to a wide string) u cant assign this to char* but u can assign this to a variable of type wchar_t*.
after using wchar_t* use swprintf() to get proper output.
|
|
|
|
|
Did you read his message ? He was talking about LPCSTR and not LPTSTR.
|
|
|
|
|
Cedric Moonen wrote: LPTSTR.
you forget to bold T i.e. LPTSTR
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ohh sorry then If you use T2A macro, it will work in UNICODE and MBCS.
please go through T2A macro
|
|
|
|
|
Why would it be usefull to use the T2A macro ? A LPCSTR is a const char*.
I think you should read some documentation about the different string types to better understand the different namings.
|
|
|
|
|
correct
then why she wants to do that?
|
|
|
|
|
Probably because the compiler complains about the constness.
|
|
|
|
|
neha
can u mention what exactly u wanna do and where u r facing problem
eplain the scenario
|
|
|
|
|
hi
i need to set transparent color for a perticular color so that when i load bit map the color will be transparent...
i am working with mfc tool bar controls
how to set default transparent color for a perticular color
please let me know
thanks in advance
|
|
|
|
|
What are you doing exactly ? Where are you using that bitmap and how do you 'display' it ?
|
|
|
|
|
thanx for the reply
i have a bit map lets say smily having red color arrond the smily
i wanna put that bit map on the tool bar button
but i dont wanna disply the red color
i know we can make that red color as transparent color so that it wont be displyed ... but how to set red color as transparent color
|
|
|
|
|
|
For button bitmaps in an MFC toolbar, you can use a masked
imagelist to hold the bitmaps.
m_ToolBarImageList.Create(IDB_BITMAP1, 16, 1, RGB(0x00,0xFF,0x00));
...
m_ToolBar.GetToolBarCtrl().SetImageList(&m_ToolBarImageList);
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanx a lot it works fine
|
|
|
|
|
I wrote a class CCamCtrl. I use a Custom message WM_CAPTURE_IMAGE and used message mapping. A dll is to post message. I think dll does not post messsage, sothat OnCaptureData(WPARAM wParam, LPARAM lParam ) event can't be called.
Are there any problem in my code or in dll.
here i mention that dll works well for dialog based application.
Can anyone help me?
Thanks in Advance
Mazhar
header file
class CCamCtrl : public COleControl
{
//some code
///
///
// Message maps
//{{AFX_MSG(CCamCtrl)
afx_msg void OnCaptureData(WPARAM wParam, LPARAM lParam );
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
in cpp i wrote
BEGIN_MESSAGE_MAP(CCamCtrl, COleControl)
//{{AFX_MSG_MAP(CCamCtrl)
ON_MESSAGE(WM_CAPTURE_IMAGE,OnCaptureData)
ON_WM_SHOWWINDOW()
ON_WM_LBUTTONDOWN()
ON_WM_TIMER()
//}}AFX_MSG_MAP
ON_MESSAGE(OCM_COMMAND, OnOcmCommand)
ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties)
END_MESSAGE_MAP()
|
|
|
|
|
Hi all,
I would like to know in general what causes a large amount of virtual memory to be used when creating an application. I.E What within the application causes a large amount of virtual memory to be used.
Thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
If you create a lot of classes with'in huge memory allocation. And you don't release it.
Or if bitmaps are loaded.
I sawed already that the visual studio debugger don't frees the memory at realtime.
If you create a view, close it, create, close, ...
then you get not the initial memory size of your application
|
|
|
|
|
Thank you for your response
Regards
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
|
And... the relevance of this message is.... ?????
If it is related with your old post... why the hell didn't you make what toxxct recommended you?
And BTW... I used the MSDN article as well to make my multiple views... and it didn't work right just with that they explain. If there has been no updates since then... you will have some problems.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
If the article is not good, it will wastes developer's time potentially.
If it is right, I'd like to learn about it.
|
|
|
|