|
in the message map, is it ON_WM_ERASEBKGND() ??
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1"> --[V]--
|
|
|
|
|
Exactly.
In the message-map:
ON_WM_ERASEBKGND()
In the header:
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
In the implementation:
BOOL CWhateverDialog::OnEraseBkgnd(CDC* pDC)
I am about to go eat some cake. Happy birthday to this!
this is this.
|
|
|
|
|
thanks for this technique.
|
|
|
|
|
i'll try this, anyhow anything from Mr Khan has always worked fine. so my 5 to you inadvance.
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1"> --[V]--
|
|
|
|
|
try this also , see what you get:
CYourDialog::OnEraseBkgnd(CDC* pDC)
{
return TRUE;
}
I've used this for writing joke programs for my friends sometimes
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
Handle WM_CTLCOLOR.
--
======
Arman
|
|
|
|
|
Manmohan_1983 wrote: How to Change of Background Color of dialog box,with options?
WM_CTLCOLOR[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I have a function inside a DLL that acts as a hook procedure. it has an __stdcall attribute. When i tried to retrieve the function pointer via another exe with GetProcAddress it always fails, and it only works after i remove the __stdcall attribute. How can i retrieve the function pointer of this callback function properly?
Is there any difference in the way of retriving function pointer of regular function and callback function?
*** code ***
this is the hookproc function:
LRESULT CALLBACK HookProc(int nCode, WPARAM w, LPARAM l)
{
return CallNextHookEx(NULL, nCode, w, l);
}
and this is how i call it in another exe:
FARPROC HookProc = NULL;
HookProc = GetProcAddress(HookDLL, "HookProc");
*** end of code ***
thank you very much.
- Ganeshwara
|
|
|
|
|
goto www.dependencywalker.com [^]and download the tool - use it to see how your function is being exported.
You can use a .DEF file to control how your function is being exported (see MSDN for details). You can also use the /EXPORT linker switch if you are using visual-c
james
http://www.catch22.net
|
|
|
|
|
thank you, i'll try it =)
|
|
|
|
|
I also STRONGLY reocmmend you call your HookProc something ELSE. That name is too common and might also get you into trouble with other linkage and project dependencies later.
No shirt, no shoes, no brains, no service.
|
|
|
|
|
How to insert soft enter in Rich Edit Control.
Thank You,
|
|
|
|
|
How to insert soft enter in Rich Edit Control.
What does it mean "soft enter"?
--
======
Arman
|
|
|
|
|
It is SHIFT+ENTER in MS Word
|
|
|
|
|
Is your RichEditCtrl a control in a CDialog or a CRichEditView? As a control you will need to use PreTranslateMessage() to trap the shift+enter keys (VK_SHIFT, VK_RETURN) or the dialog will close via the default button (usually CDialog::OnOK()).
<code>BOOL CSampleControl::PreTranslateMessage(LPMSG lpmsg)
{
BOOL bHandleNow = FALSE;
switch (lpmsg->message)
{
case WM_KEYDOWN:
switch (lpmsg->wParam)
{
case VK_UP:
case VK_DOWN:
case VK_LEFT:
case VK_RIGHT:
bHandleNow = TRUE;
break;
}
if (bHandleNow)
OnKeyDown(lpmsg->wParam, LOWORD(lpmsg
->lParam), HIWORD(lpmsg->lParam));
break;
}
return bHandleNow;
}
</code> - Source: MSDN Help Documentation. In a CRichEditView class the RichEditCtrl will respond to a SHIFT+VK_RETURN keyboard event and insert a soft carriage return (\par). If you hit the enter key (VK_RETURN event), it inserts a hard return (\par\par). This is, if your document class serializes as richtext.
CRichEditDoc::m_bRTF = TRUE; If you are serializing as text then you can insert a newline character with
GetRichEditCtrl().ReplaceSel("\n"); In both cases of serialization the RichEditCtrl responds to the (SHIFT+ENTER)keyboard event the same.
Post a litle more info on what you are trying to do.
Mark
|
|
|
|
|
myself and one of my friend develop one simple project. project include one server and many client. use socket at both ends. one socket for server side and one socket at client side. write Create(), Listen(), Send(), Bind(), Receive() kind of basic functions. Establish connection between server and client. perform some basic operations on client from console side. I want to know if same project is rebuild using some other techniques or concepts which are present in networking field. how we can develop this entire project better way. or if you suggest good topic for networking project kindly give me a reply.
Regards
kedar
|
|
|
|
|
well if i am to code a project on net. then i'll go for SMTP server( it can be a smtp server for newsletter kind od app)or FTP server or something similar to it.
|
|
|
|
|
vcforums wrote: if you suggest good topic for networking project kindly give me a reply.
What about making NETWORK ShutDowner
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi All,
I have been using CString for years and was very much comfortable with it.
Now i am using STL's string.
while debugging i am not able to get the value of a string variable.it shows the address and not the value(string::c_str).
if it was a CString variable, just by putting the variable in the Quick Watch i was able to see its contents.
How do i get the value of a string variable during debugging ?
Thanks in advance
|
|
|
|
|
It almost sounds like you need to add an entry to your autoexp.dat file. You'd see the same thing with CString if it weren't for that file.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi David,,
I'd be very interested to know what you exactely mean with your answer. I thought there was no (easy) way to see the content of stl strings while debugging... What is autoexp.dat ?
~RaGE();
|
|
|
|
|
Rage wrote: I thought there was no (easy) way to see the content of stl strings while debugging
I don't use STL, so that may very well be the case.
Rage wrote: What is autoexp.dat ?
It's a file located in the C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin folder. There is a good description at the top of it.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
DavidCrow wrote:
It's a file located in the C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin folder. There is a good description at the top of it.
This is very interesting, thank you David, for the explanation.
~RaGE();
|
|
|
|
|
Could this be of any help :
Article[^]
~RaGE();
|
|
|
|
|
How to open a default fil by using the CFileDialog class
I open the dialog box like this .
I want to keep one file as default selection
CFileDialog dlg(TRUE,"bmp",NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,"Only BMP (*.bmp)|*.bmp|");
dlg.DoModal ();
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|