|
Hi
Thanks a lot for help.
I think there is no way to execute exe file from memory.
So i am going to use ShellExecute().
well if i find out any way i'll ley you know.
thanks
|
|
|
|
|
I've a Project with many sub-projects attached to it, in that there are many MDI classes with several Dialogs. I need to change the property(appearance,font,color) of text in those dialogs, making it look equally applied throughout.
I dont think so, i can manually code every dialog to appear same, so i'm looking to write a class that would change the appearance of the text throughout the projects(all dialogs). I'm wondering how to go about this, any one could give me an idea in detail plssss.
Mohan
|
|
|
|
|
I'm using ini file for translation purpose, and to translate dialog I have a call DlgTranslate(this) from OnInitDialog in every dialog. This function traverses all dialog controls, changing text accordingly.
This was long preface The key is that recently I need to adjust font of static controls, and doing this in DlgTranslate was a good choice (while not very structured). You can do similar thing in your case too.
Igor Green
http://www.grigsoft.com/ - files and folders comparison tools
|
|
|
|
|
hi all,
i am working on parser..
i want to write Context free grammar in c++ using templates
can one tell me is it possible if so how and provifde some links
thanks
geeta
Gets
|
|
|
|
|
Spirit[^] is an object oriented recursive descent parser framework implemented using template meta-programming techniques. Expression templates allow us to approximate the syntax of Extended Backus Normal Form (EBNF) completely in C++. Parser objects are composed through operator overloading and the result is a backtracking, top down parser that is capable of parsing rather ambiguous grammars.
The Spirit framework enables a target grammar to be written exclusively in C++. Inline EBNF grammar specifications can mix freely with other C++ code and, thanks to the generative power of C++ templates, are immediately executable.
Spirit is part of Boost[^] Libraries, a peer-reviewed, open collaborative development effort.
|
|
|
|
|
How to Change of Background Color of dialog box,with options?
Manmohan
|
|
|
|
|
Handle the WM_ERASEBKGND message for the dialog.
OnEraseBkgnd(CDC* pDC)<br />
{<br />
CRect rect;<br />
GetClientRect(&rect);<br />
pDC->FillSolidRect(&rect,RGB(255,0,0));<br />
return TRUE;<br />
}
this is this.
|
|
|
|
|
for first time, i'm able to find a different reply for this query.
"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]--
|
|
|
|
|
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.
|
|
|
|