|
or you can use
<br />
char szBuffer[101];<br />
ZeroMemory(szBuffer,101);<br />
...<br />
...<br />
|
|
|
|
|
Hello,
how can I cancel(close) the popup menu when I decide to do that in the WM_INITMENUPOPUP notification handler ?
I've tried to call DestroyMenu() on provided menu handle but it does not work althought it returns 1 (success).
Thank you!
rrrado
|
|
|
|
|
How you are creating menu, can you show it?
Because,I suspect, you are using temporary handle to menu(which is supposed not to use), to destroy menu.
|
|
|
|
|
User is creating the menu so I think that handle is temporary. I haven't found this information that it's not for destruction - so how can I close the menu ?
I've also tried PostMessage(WM_CHAR,VK_ESCAPE,1); to owning window's handle it also failed.
rrrado
|
|
|
|
|
I've got it. It seems that sending WM_CANCELMODE does the trick
rrrado
|
|
|
|
|
Hi,
only a (untested) proposal.
Have you tried WM_MENUSELECT?
This message is (possible) send before WM_INITMENUPOPUP.
-> catch the selection before the popupmenu is created
HTH
Frank
|
|
|
|
|
rrrado wrote: User is creating the menu
How ?
rrrado wrote: I haven't found this information that it's not for destruction - so how can I close the menu ?
It can be used for destruction, but its temporary, means you cannot store it ,and use from some other function.
Can you show some code?
|
|
|
|
|
User press context menu key or right click. I'm not storing handle for later use.
But it does not matter now as I've wrote before i've solved it by sending WM_CANCELMODE message.
Thank you all guys for your time!!!
rrrado
|
|
|
|
|
rrrado wrote: I've wrote before i've solved it by sending WM_CANCELMODE message
I've seen your post , after posting mine. And today, there seems to be problem with modifying post. So, it is there as it is.
|
|
|
|
|
Hi,
I want to display a text with underline in my view class.
Can we do this in our coding?Any functions is there?
Ex: TEXT
I do not use CPoint to display there.
I am copying the text to somevariable and then i pass this to dll function and then it display in view window.
code:
strcpy(czTemp"TEXT");
Anu
|
|
|
|
|
hi,
check for CFont in MSDN.
//
CFont fntArial, fntBoldSwiss;
fntArial.CreateFont( 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, "Arial" );
fntBoldSwiss.CreateFont( rcClient.Height()/20, 0, 0, 0,
FW_BOLD, TRUE, FALSE, 0, ANSI_CHARSET,
OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY, DEFAULT_PITCH | FF_SWISS,
NULL );
Uday kiran
|
|
|
|
|
Your question doesn't really make sense. If you pass a char array to a dll that is in charge of the display of the string and if you cannot change it, then it is impossible. A char array doesn't contain any formating informations, it contains data only (so, only the letters of your string).
|
|
|
|
|
You can set fdwUnderline to true in CreateFont and if you use of CDC for write to screen use SelectObject
|
|
|
|
|
Hi
MessageBox(NULL, "Hello World", "Message Box Title -- Hello World", MB_OK);
Error:
error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [12]' to 'LPCWSTR'
IDE:VS2005
I don't understand why it gives this error.
Can you please tell me what the problem is and how i can solve it.
Thanks
|
|
|
|
|
hi,
L"Hellow World"
in the MessageBox.
Uday kiran
|
|
|
|
|
The default project charset setting in VS2005 is using UNICODE, so the MessageBox maps to MessageBoxW , which takes unicode strings as its input.
You can 1. changing your project's setting from using UNICODE to MBCS 2. enclose each of the string appeared in your source files with _T() . Or you can do both.
The _T macro will map the string to wide char string constant if the project is set to use UNICODE, and will map the string to normal ANSI string constants if the project is set to use MBCS charset.
|
|
|
|
|
thanks for fast reply
but
for _T("Message Box Title -- Hello World")
error C3861: '_T': identifier not found
for L"Message Box Title -- Hello World"
same error C2664
|
|
|
|
|
sorry friends
L is ok.
It works.Thank you.
But _T macro can not find it says.
How can i tell compiler to see this macro.I opened only empty win. application.
Thanks again.
Edit/Delete Message
|
|
|
|
|
|
thanks friends
TEXT() is working; also for _T macro #include <tchar.h> is solve the problem.
|
|
|
|
|
sawerr wrote: But _T macro can not find it says.
What does this mean? _T() macro is defined in tchar.h; But again finally expands to L""
|
|
|
|
|
what type of project u r using?
|
|
|
|
|
hi all,
i am having doubt in Socket Programming, What is the need of select(...) Api in Socket. Please give me a neat explation of what the select(...) Api do in Socket and where we can apply this Api.
Also i want the Difference between Blocking and NonBlocking Sockets.
please help me out.
Uday kiran
|
|
|
|
|
uday kiran janaswamy wrote: need of select(...) Api in Socket.
If an application is using several sockets then the select() function may be used to find out which ones are active.
uday kiran janaswamy wrote: Also i want the Difference between Blocking and NonBlocking Sockets.
See here. You will get a lot of information relating to blocking and non-blocking sockets.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
hi all,
i want the difference of heap and stack in memory related area.
also when you populate the CDialog i am having doubt.
CDialog d; ---> First
d.DoModel();
CDialog *d = new CDialog; ---->Second
d->DoModel();
both First and Second will populate the Dialog but can i know what is the difference of the First and Second Memory Concept.
please let me know.
Uday kiran
|
|
|
|