|
It may happen if your application (wrongly) relies on some initial state of the serial device (and the Hyperterminal alters it).
As remarked by Roger Stoltz, without posting the relevant code, you hardly will get any help.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I'd like to use owner_draw on a button, but I'd like to draw a little bit and let windows draw the left.
How can I do this?
|
|
|
|
|
If I remember correctly, you could call Default() (but I've been proven wrong many times)
In my experience, either you do it or not do it; there is no middle ground when owner drawing controls.
This signature was proudly tested on animals.
|
|
|
|
|
|
The easiest way is probably to let the button draw itself then draw over the top of it - so, call DefWindowProc at the start of your owner draw handler then do your own drawing
|
|
|
|
|
Hey guys,
Sorry to be bugging everyone with silly questions, I am just wandering I have a project that I have used VC 6 to create, and I've just recieved a message from a client saying it doesn't work on the 64 bit version of Windows.
Is there a way of getting VC 6 to compile projects that work with 64 bit operating systems or am I stuffed. If not is there an emulator software you can use that will allow 32 bit apps to run on 64 bit systems.
Any help would be greatly appreciated.
All the Best
Danny
|
|
|
|
|
Are they running on the 64-bit Itanium or something? Unfortunately VC6 is unable to produce 64-bit compatible binaries.
If your client is on a pure 64-bit architecture then you may have to compile your project with Visual Studio 2005 or higher which supports both x86-64 and IA-64 depending on the edition.
Another possible solution is to use the free compiler which comes with Microsoft Windows SDK[^] which also supports x86-64 and IA-64. This option may become a problem... especially if your using MFC.
Best Wishes,
-David Delaune
|
|
|
|
|
I think you must first understand why your 32-bit app does not work on 64-bit systems.
And VC 6 does not have 64-bit compilers.
«_Superman_»
|
|
|
|
|
A thought I had after posting the thread. Could it be the target operating system is missing the mfc42.dll? My project does use MFC.
Danny
|
|
|
|
|
Ideally all the dependencies must be part of your application's installation.
But then it shouldn't have worked on the 32-bit system either.
Mfc42.dll is not part of the OS.
It is installed when you install Visual Studio.
«_Superman_»
|
|
|
|
|
|
|
How is that going to help with VC6?
Best Wishes,
-David Delaune
|
|
|
|
|
I saw it afterwards and I thought its not good idea to delete my reply but why 1?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hamid. wrote: I thought its not good idea to delete my reply but why 1?
Hello Hamid,
It wasn't me who down-voted your response. Want me to give 5 to bring it back up?
Best Wishes,
-David Delaune
|
|
|
|
|
No thanks but It was not bad link.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I was actually trying to code to open multiple files with no extensions those were inside a folder. I looked up for methods but I coudn't find. Please help me with this as soon as possible. Can I do so with turbo C++??
|
|
|
|
|
|
I was actually trying to code to open multiple files with no extensions those were inside a folder. I looked up for methods but I coudn't find. Please help me with this as soon as possible. Can I do so with turbo C++??
|
|
|
|
|
I have a problem with a 3 state check box (push style) with new common controls 6.0 vista look, no problem with older common controls. I have created a very simple application of one button if someone needs the code, where I want the check box(which really looks like a push button) to behave as 3 different state, ( ON -I set to a color), (OFF- I set it to another color), (INdeterminate- I want it to be Gray or something), works fine for ON & OFF, but 3rd state, somehow the text seems to get shifted or something on the button, it shows half gray, half red..... Anyone with similar problem...here is the meat of the code...Keep in mind, it works fine if I don't use it as tri-state, or if I don't use common controls 6.0 with the linker.
Thanks
void CColoredButton::OnClicked()
{
if(!m_IsEnabled){
SetCheck(FALSE);
return;
}
if(GetCheck()==2){
ModifyStyle(BS_BITMAP,0);
InvalidateRect(NULL);
}
else{
ModifyStyle(0,BS_BITMAP);
SetColoredCheck(GetCheck(),m_FontSize);
}
WPARAM wParam=MAKEWPARAM(GetDlgCtrlID( ),BN_DOUBLECLICKED);
GetParent()->SendMessage(WM_COMMAND,wParam ,(LPARAM)m_hWnd);
}
void CColoredButton::SetColoredCheck(int nCheck,int FontSize)
{
COLORREF Color = m_UpColor;
if(nCheck==1)
Color=m_DownColor;
if(nCheck==2)
Color=RGB(255,0,0);
CString Label=GetText(FALSE);
CRect Client;
GetClientRect(Client);
CClientDC dc(this);
CDC dcMem;
dcMem.CreateCompatibleDC(&dc);
CFont* pFont = GetFont();
CFont MyFont;
m_FontSize=FontSize;
CBitmap* pOldBitmap = dcMem.SelectObject(&m_Bitmap);
CBrush brBackground(Color);
CBrush *OldBrush=dcMem.SelectObject(&brBackground);
dcMem.SetBkColor(Color);
dcMem.FillRect(Client, &brBackground);
if(!m_IsEnabled){
CBrush *PHalfBrush=dcMem.GetHalftoneBrush( );
if(PHalfBrush!=NULL)
dcMem.FillRect(Client, PHalfBrush);
}
CFont *OldFont=dcMem.SelectObject(pFont);
int OldBkMode = dcMem.SetBkMode(TRANSPARENT);
dcMem.DrawText( Label, Client, DT_CENTER | DT_VCENTER |DT_SINGLELINE );
dcMem.SetBkMode(OldBkMode);
dcMem.SelectObject(pOldBitmap);
dcMem.SelectObject(OldFont);
dcMem.SelectObject(OldBrush);
if(FontSize>0)
MyFont.DeleteObject();
dcMem.DeleteDC();
SetBitmap( HBITMAP(m_Bitmap) );
SetWindowText(Label);
SetCheck(nCheck);
}
sft
|
|
|
|
|
Sorry about the long code, In summary, THis is what I want
void CColoredButton::OnClicked() {
if(GetCheck()==2){
ModifyStyle(BS_BITMAP,0);
InvalidateRect(NULL);
}
else{
ModifyStyle(0,BS_BITMAP);
SetColoredCheck(GetCheck(),m_FontSize); }
......
When GetCheck() ==2 for the indeterminate state, it always worked where the button was pretty much disabled or Kindda grayed out, but with the new common controls, its not the case any more, the text somehow gets overlapped and shows 2 different colors... Any idea what the problem might be there, or how I can may be get around this?
sft
|
|
|
|
|
Hello All
I am planning to write an application using VC++ to find the free-meeting rooms in my office. All the meetings rooms are listed in outlook. what i am doing right now is to run thru all the meeting room one by one to find the free one for a perticular time. is there any way i can connect to
MSoutlook calender using VC++ program and search for a free room?
Thank you
|
|
|
|
|
I don't know if this is possible (I guess it is) but if it is possible, it would be done through automation. Google for "outlook automation" and you'll get plenty of examples.
I'm not an expert in automation, so it's the only help I'm able to provide...
|
|
|
|
|
Yes - you need to connect to Outlook through COM (use ProgID "Outlook.Application") and naviagte its object model.
Best way to investigate the Outlook object model is to use Outlook's VBA IDE - use the object browser or something like that.
BTW - it's really a lot easier with VB6 than C++...
|
|
|
|
|
Hi All,
Is there a way of limiting the size of the margins when printing.
At present I can't think of a better way than subclassing the pring dialog box and intercepting text input to the margin size edit boxes.
The reason for this is that our test team have complained that if they put a huge number into the text margin boxes it messes up the appearance of the document and so should be prevented. Can you believe it
Cheers
Tom
Philosophy: The art of never getting beyond the concept of life.
Religion: Morality taking credit for the work of luck.
|
|
|
|