|
When I set the m_strFilter on an SQL query as
m_pSet->m_strFilter="[MyStringField] ="+"'"+MySearchString+"'";
Everything work great unless there is an apostrophe in MySearchString. Then the Jet engine coughs and sputters to a halt.
Any ideas on how to handle CStrings with single qoutes in them?
Richard
|
|
|
|
|
CString str ="[MyStringField]\" + "MySearchString + "\"";
Cheers!!!!
Carlos Antollini.
|
|
|
|
|
I'm a little confused, maybe someone can point me in the right direction. I have never done bitmaps in win32 apps before, and no I don't mean I've never put a bitmap in a dialog, or toolbar, I mean displaying on the actual app. I need help because I have a project due in a week or so, and need to display a certain bitmap in the app. Yes, I took training, but you tend to forget what you don't need over the years, and I need to know what header file to insert into the main program source file. I REALLY NEED HELP ON THIS ONE.
"The world doesn't care about your self esteem. The world expects you to get something done BEFORE you feel good about yourself." ~ Bill Gates
|
|
|
|
|
|
Hi,
I want to learn how to create a toolbar which docks on the desktop, similar to the LiveTask bar used with Creative Soundblaster products. I want to be able to autohide, and add other menus / controls to it. The thing i have in mind is also similar to the office startup toolbar or even the windows start menu bar that pops up at the bottom of your screen.
Whats it called and where can i find some sample code / further reading ?
Thanks
Jase
|
|
|
|
|
You want to read this article,
Shell application toolbars.
http://www.microsoft.com/msj/defaulttop.asp?page=/msj/archive/s274.htm
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
I have a regular DLL using MFC and within this DLL is a worker thread. While this thread is running, it is trying to update a dialog box (owned by the DLL) with some information on the thread's progress. Everything works OK except that the WPARAM and LPARAM values I pass to the dialog are not getting through, and are always zero. Is there some special reason for this?
|
|
|
|
|
While this thread is running, it is trying to update a dialog box (owned by the DLL) with some information on the thread's progress.
Can you post the code running in worker thread that updates the dialog?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
thanks, but I didcovered a much simpler way to do this, which works well.
|
|
|
|
|
Is is possible to disable the Cancel button, or to get rid of it?
I tried to GetDlgItem(IDCANCEL)->EnableWindow(FALSE), but the program asserted.
Thanks,
Jon Sagara
"Go Banana!" -- Ralph Wiggum
|
|
|
|
|
Are you calling it in your sheet's OnInitDialog? Or where?
And what code asserts? ASSERT(::IsWindow(m_hWnd)) ?
|
|
|
|
|
Paolo,
Thanks for the response. Your question triggered my brain, and I figured it out. Here is the correct (or working, anyway) code:
pSheet->GetDlgItem(IDCANCEL)->EnableWindow(FALSE);
Thanks again,
Jon Sagara
"Go Banana!" -- Ralph Wiggum
|
|
|
|
|
I need one I want need some text to blink on a dialog.... You know, like a dialog that pops up and the word DOWNLOADING blinks until the download is complete....
Any ideas?
- John
|
|
|
|
|
Set up a timer and call ShowWindow(SW_SHOW/SW_HIDE) on alternate calls. I'd override the static control and make it nice and internal. Then you can use it over and over.
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|
|
I'm not quite sure how I should do this. I need it to blink, while the the rest of the application keeps running...which means I need to have a seperate thread for the blinklabel?
|
|
|
|
|
Not at all. Have you not used WM_TIMER before ? There is a tutorla here on how it's done, but the essence of it is on startup:
SetTImer(42,1000,NULL);
in OnTimer
if (nIDEvent==42) // I may have the variable name wrong ;0)
{
m_bFlash = !m_bFlash; // You need to create this
m_MyStatic.ShowWindow(m_bFlash ? SW_SHOW : SW_HIDE);
}
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|
|
I am creating these four radio buttons dynamically.
The behavior is so random and confusing. At some point I got some text, and then I can't get it anymore. I have been told by friends at this forum that maybe the width is not enough, one time that fixed the problem but not anymore!!!!!!!
Here is the code:
if (OneGrpPosition != NULL)
{
pConfig->m_OneRadioBtn = (CRadioBtn *) (((CGrpBox*)pConfig->m_OneGrpBox)->m_GrpRadioBtn).GetNext(OneGrpPosition);
int len= ctrlRect.right - ctrlRect.left;
ctrlRect.right = ctrlRect.left +len+ 60;
if (ctrlRect.right >= 542)
::MessageBox(0, "Running out of screen width to display radio button", "Warning", MB_OK);
ctrlRect.bottom = ctrlRect.top + 25;
if (nDex == 0)
//
{
m_RadioButtonArray[nDex].Create((pConfig->m_OneRadioBtn)->m_RadioLabel,
WS_GROUP | WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON, ctrlRect,this, (pConfig->m_OneRadioBtn)->m_RadioGuiID );
m_RadioButtonArray[nDex].SetFont(&m_font, TRUE);
}
else
{
m_RadioButtonArray[nDex].Create((pConfig->m_OneRadioBtn)->m_RadioLabel,WS_CHILD| WS_VISIBLE | BS_AUTORADIOBUTTON, ctrlRect,this,(pConfig->m_OneRadioBtn)->m_RadioGuiID);
m_RadioButtonArray[nDex].SetFont(&m_font, TRUE);
}
nDex= nDex+1;
ctrlRect.left = ctrlRect.right +10;
//This radio button has already been added to the memory structure
}
}
//This ia a new radio button that needs to be added to the memory structure
}
I am in Paradise.
Voltaire
|
|
|
|
|
what value is ctrlRect initialized with?
|
|
|
|
|
top=35
bottom=60
L=120
R=220
I have tried L=120 and Right = 170 through 220.
It is really confusing. Thanks for your time
I am in Paradise.
Voltaire
|
|
|
|
|
Are you sure the radio buttons gets created? Can you see the dot?
the if clause in your code is doing the same for both conditions... why?
|
|
|
|
|
Yes, I see all my four radio buttons are being created. The first one is different from the other three, because I need to have them in a group. Meaning if I click on of them the other three are unselected.
I do see the four of them being created. But no text next to them. I am thinking of just creating the first one to see if the text displays there.
It is a weird one. I really am looking forward to solve this one!!
Thanks again for your time.
|
|
|
|
|
It's very weird, but to my experiece this kind of bugs are really stupid.
Did you tried to use a hard-coded CRect for the creation, just to make sure it's not something else?
However, if you would send me a small demo project, I'll give it a look. I hate this kind of bugs!
Paolo.
|
|
|
|
|
Hi,
Is there a way that I can monitor all the operations in the clipboard(Copy/Cut - that happens on any application) and get notifications.
Thanks,
Ganesh.M.Ramaswamy
Ganesh.M.Ramaswamy
|
|
|
|
|
See my article ClipSpy for an app that monitors the clipboard.
--Mike--
http://home.inreach.com/mdunn/
"Make sure that if you are using a blow torch that you don't set anything on fire."
-- Chris Maunder
|
|
|
|
|
I have a progress bar in a CDialog and I want to step it as soon as the dialog becomes visible.
I can't do that in InitDialog, because the dialog is not visible yet.
Where would I do that?
Thank You
XP
|
|
|
|