|
Sounds like you didn't set the "set buddy int" style, to make the spinner change the contents of the edit box.
--Mike--
"So where does that leave us? Well, it leaves us right back where we started, only more confused than before." -- Matt Gullett
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
That solved the problem. My game is now complete. Thanks a lot.
Cheers, nickelplate.
|
|
|
|
|
Hi!
I'm having problems with an edit control not responding to ctrl+c, ctrl+v and ctrl+x keystroke combinations when it's residing inside a DialogBar.
The edit control doesn't receive a WM_CHAR message for any of the three keystroke combinations as it does in a regular dialog box, and I assume that's the problem.
Anyone know why?
|
|
|
|
|
The problem is probably that you've got an accelerator table that's stealing the messages. You may need to disable the accelerator table when the edit control has focus (handle EN_SETFOCUS and EN_KILLFOCUS).
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
I am facing similar problem. pl help me out
I have CComboBox placed on CDialogBar. Here I dont't get the crtl+c, ctrl+v and ctrl+x messages on the ComboBox. But I can rightmouse click on combobox and can copy/paste.
Thanks
Sandeep Naik
|
|
|
|
|
Hi All
im printing some stuff out in landscape mode, i have the below
in my OnBeginPrint function to set the orientation of the paper
LPDEVMODE pDevMode;
pDevMode = pInfo->m_pPD->GetDevMode();
pDevMode->dmOrientation = DMORIENT_LANDSCAPE;
pDC->ResetDC(pDevMode);
first time round, it prints in landscape, but the actual text doesnt stretch across
the whole page like it should, the actual text is in the size of portrait mode on a landscape peice of paper
however if i print again, its all fine
and clues any1 ?
thanks
simon
|
|
|
|
|
hi,
i faced the same problem before and I got the solution by adding this code into my OnPreparePrinting(CPrintInfo* pInfo) which I found in a forum.
{
tagPDA pPrintDlg;
AfxGetApp()->GetPrinterDeviceDefaults (&pPrintDlg);
pInfo->m_pPD->m_pd.hDevMode = pPrintDlg.hDevMode;
LPDEVMODE devMode = pInfo->m_pPD->GetDevMode();
if (devMode)
{
// dmOrientation == DMORIENT_PORTRAIT
// dmOrientation == DMORIENT_LANDSCAPE
if (devMode->dmOrientation != DMORIENT_LANDSCAPE)
devMode->dmOrientation = DMORIENT_LANDSCAPE;
GlobalUnlock (devMode);
}
pInfo->m_bDirect = 1;
int rc = DoPreparePrinting(pInfo);
pInfo->m_bDirect = 0;
return rc;
}
hope this will help you.
regards,
sherryfa
|
|
|
|
|
I have an app which is a Dialog app. It then opens another dialog when I press a button. Now what happens is that it receives information via TCP. Both the dialogs have List controls.
When the TCP info comes in, the Main Dialog which has the object of the 2nd dialog, then takes the information and neatens it and says add the information into the List control of the 2nd dialog like this:
2ndDialog.m_list.AddString(information received).
This gives an ASSERTION FAILURE as in the subject. How can I fix this?
Live in peace
|
|
|
|
|
The list box in the second dialog has not been created yet. Has the dialog been opened yet? If not, then you can't add strings to the list box.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Well the listbox, is declared in the class of the dialog. Okay, the dialog is not opened at that stage. I will try opening it then, and then try DoModal. But I know if will fail at the point when I try AddString. Let me test first then tell u......
DoModal works fine. But now its all a matter of adding to the list when the dialog is opened. Lets try that.
Live in peace
|
|
|
|
|
It does not work at all.
2ndDialog.DoModal()
takes away the execution from the main dialog, so I am not able to addString from the main dlg.
How else can i do it?
Live in peace
|
|
|
|
|
Make an array of strings in your second dialog that the first dialog can add into, then in the second dialog's OnInitDialog() function, add the strings from the array into the list box. CArray will be fine.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Well, I understand the OnInitDialog is not defined, only as virtual funtion it is defined. Now if I do use that function, without defining anything, the system crashes.
Problem is that the ListBox seems to be in the wrong context. This inevitebly causes the assertion fail. I hope that is correct reasoning though.
How does one use a richedit control, without using a richedit view?
Live in peace
|
|
|
|
|
Ohhh! Thanks I now understant your explanation. I need to define the OnInitDialog function. I see. And then I do what I need to do now.
Thanks
Live in peace
|
|
|
|
|
Does any1 knows anything more (like syntax) then they are ADODB functions?
Nothing in MSDN, NOTHING!!!
Love is the law, love under will.
|
|
|
|
|
|
The names suggest that they are wrapper for the Collection property.
inline _variant_t Recordset15::GetCollect ( const _variant_t & Index ) {
VARIANT _result;
VariantInit(&_result);
HRESULT _hr = get_Collect(Index, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _variant_t(_result, false);
}
inline void Recordset15::PutCollect ( const _variant_t & Index, const _variant_t & pvar ) {
HRESULT _hr = put_Collect(Index, pvar);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}
I suppose the valuje of Index depends on the context of the Collection
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
I always get these two errors when trying to include commctrl.h in my application.
c:\program files\microsoft visual studio\vc98\include\commctrl.h(26) : error C2146: syntax error : missing ';' before identifier 'HRESULT'
c:\program files\microsoft visual studio\vc98\include\commctrl.h(26) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
I've added comctl32.lib to the list of library modules in my project settings, but it wouldn't resolve the problem. I use MS Visual C++ 6.0.
Any ideas?
Cheers, Blackmesa.
|
|
|
|
|
Blackmesa wrote:
I've added comctl32.lib to the list of library modules in my project settings, but it wouldn't resolve the problem. I use MS Visual C++ 6.0.
Any ideas?
Your problem has nothing to do with linker settings. The problem is that you need some header included before commctrl.h. What type of project is this MFC, ATL, Win32 API... ?
John
|
|
|
|
|
It's a WIN32 API project.
Cheers, Blackmesa.
|
|
|
|
|
Do you have #include <windows.h> before #include <commctrl.h> ?
John
|
|
|
|
|
The first #include in the incriminated file concerns commctrl.h, as you can see below.
/**
* input.cpp
*
* Input module.
**/
#include <commctrl.h>
#include "input.h"
#include "inputvars.h"
#include "gamevars.h"
#include "layout.h"
#include "resource.h"
//.... rest of file
Cheers, nickelplate.
|
|
|
|
|
make sure you have included "winnt.h" or "wtypes.h" first. Does this help?
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
After including wtypes.h, I have no more errors. Thanks a lot guys.
Cheers, nickelplate.
|
|
|
|
|
You're welcome
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|