|
MsmVc wrote: Plz help me
Sure why not. If you don't know how include files work then you need better study material for learning how to program in C/C++. You are using one or more books that are introductions to C/C++ to learn from yes?
led mike
|
|
|
|
|
Hi,
I have a application that communicates with server (Java) and communication is done using SOAP. I am able to communicate properly as much as I can in DEBUG mode but the same code is not running in RELEASE mode.
There is one function (freememory(PBYTE&)) which we are calling to free the memory. this works fine in DEBUG mode but not in RELEASE. if I put message box in this function then it is working fine.
Please suggest I do not want to use messge box.
Thanks
SNI
SNI
|
|
|
|
|
|
SNI wrote: I am able to communicate properly as much as I can in DEBUG mode but the same code is not running in RELEASE mode.
See here.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
void CTestView::OnPaint()
{
CPaintDC dc(this); // device context for painting
Invalidate(FALSE);
}
void CTestView::OnDraw(CDC* pDC)
{
CTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
CFont font;
font.CreatePointFont(20, "Garamond");
CFont *pFont = pDC->SelectObject(&font);
pDC->TextOut(20, 18, "Christine", 9);
pDC->SelectObject(pFont);
font.DeleteObject();
}
In the above code, even though I am calling Invalidate inside OnPaint(), it is not getting inside the OnDraw(). Pls suggest me some ways how to get inside OnDraw()
|
|
|
|
|
HWND Hwnd = GetSafeHwnd();
::SendMessage(Hwnd , WM_PAINT, 0,0);
?
|
|
|
|
|
How can this call OnDraw(). Pls Explain... Also Tell me where to include your code
|
|
|
|
|
If you send PAINT message in your CTestView class windows can call OnDraw(CDC* pDC).
|
|
|
|
|
Why are you mapping the OnPaint?
See the MFC code of CView
void CView::OnPaint()
{
CPaintDC dc(this);
OnPrepareDC(&dc);
OnDraw(&dc);
}
It is calling the OnDraw. So you should not map OnPaint.
|
|
|
|
|
It's risky to call Invalidate () inside an OnDraw () or OnPaint () handler because it can potentially cause an infinite loop. Call Invalidate () right after the change to your data that you want to appear on the screen.
|
|
|
|
|
Hi all,
I want to open a connection with portable device connected to my pc for this i am using COM and a interface called IPortableDeviceManager.
To get devices i am using GetDevice function from this interface but i am
not getting how to pass parameters to this function
http://msdn.microsoft.com/en-us/library/ms739556(VS.85).aspx[^]
Can anybody please help me in this...
Thanks in advance
|
|
|
|
|
I have a wstring str which has data like
This is an apple
This is a Bat
This is a Cat
And i try to write the str into file using
FILE* outfile;
fputws(str.c_str(),outfile);
When i saw the ouput file it shows:
This is a Bat
This is a Cat
Can anybody help me out?????????????
|
|
|
|
|
Can you show how are you using wstring, how is str filled?
-Saurabh
|
|
|
|
|
str = L"This is an aple";
str+=L"\n";
str+=L"This is a bat";
str+=L"\n";
str+=L"This is a cat";
str+=L"\n";
fputws((wchar_t*)str.c_str(), outFile) ;
Did u get it or i need to be more clear.
|
|
|
|
|
I just tried this using VS 2008 and it is working fine. I am not sure what is the problem, is str used at some other place.
-Saurabh
|
|
|
|
|
Your code works fine with VS6.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi,
Id like to be able to intercept the output of some of the basic
windows drawing functions and record it somewhere. In particular drawtext.
Ive read that this can be achived by CBT hooking.
Despite reading several articals including the ones on this site im totally confused.
In my mind I image the process should work like this ...
I write a function call mydrawtext which takes in the same parameters as drawtext.
Writes the incomming info to a file and then calles the real drawtext.
I store it in mydrawtext.dll file and then compile it into a mydrawtext.lib
Next ...
I write a small .exe which when exectued figues out where the real drawtext function lives in memory
places a copy of mydrawtext.lib into the same address space
and then writes a few intructions to the location of the real drawtext fuction so that all calls to it are diverted to mydrawtext.
All the examples ive seen are totally confusing. Injecting insructions are inside the .dll. I cant work out whats going on ?
What would be really great is dead simple abc example of something like how to capture the input/output of the windows drawtext function.
Thanks,
Mark.
|
|
|
|
|
Hi Experts,
How can I create a entry for spacific file on right click in context menu of windows. Like if we create entry for all files, we create entry under
"*\\shellex\\ContextMenuHandlers\\OurKey" but what to do only for .txt file or .pst file?
|
|
|
|
|
|
i have a simple dialog project with a button and multiline edit control.
button click runs a worker thread which updates edit control data.
and i have also mapped the ON_WM_CTLCOLOR() to change colors of controls
and dialog.
if i run the thread 2-3 times my program crashes.but if i comment all
my coloring code from ON_WM_CTLCOLOR() it runs fine without any problem..
|
|
|
|
|
You should not update UI from workerthread.
Regards,
Sandip.
|
|
|
|
|
Hi,
I'm trying to create a manifest file in order to set the setting for UAC in Vista.
I already refer to msdn document. If I want to develop codes that need to be run in Vista and XP, I need to use the notes for-Building and Embedding a Manisfest with Microsoft Visual Studio 2005 for Windows Xp and Windows Vista Applications.
This is my manifest file.
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestversion="1.0">
<ms_asmv2:trustinfo xmlns:ms_asmv2="urn:schemas-microsoft-com:asm.v2">
<ms_asmv2:security>
<ms_asmv2:requestedprivileges>
<ms_asmv2:requestedexecutionlevel level="asInvoker">
But when I run, I got this error message:
general error c1010070:failed to load and parse the manifest.
FYI, I already go to Project Properties-Linker-Generate Manifest - NO.
Beside that, I also change at Project Properties-Manifest Tool-Input and Output-Additional Manifest File (i type the manifest file name).
Any ideas about this?
Thanks
|
|
|
|
|
Any help here?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi,
I need to get notification when ever a Db exception is occuring in my application.
Is there a way to hook the DBException when it occus anywhere in the application?
Thanks
|
|
|
|
|
See if SetUnhandledExceptionFilter() helps
-Suhredayan
|
|
|
|