|
You can validate on kill focus. When user desided to change focus you can call validation function (usualy override DDX_) if validation didn't pass set focus back or ...
Thanks,
Alex
|
|
|
|
|
What does validation have to do with the OP's question?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Sorry I was answering for LaiJun posting and by mistake got in that thread.
|
|
|
|
|
Hello,
Classes that depend on eachother (cyclic dependancy) is bad design. Try to isolate all general operations and put them in another class, where your two other classes derive from. So all the functions that need the shared variables will have to go into the "general" class
Hope this helps
I also got the blogging virus..[^]
|
|
|
|
|
hey there !
lately, i wrote kinda framework which every kind of module (dll) can hook to and push its respective data (be it video or audio in bitstream format). this data will then be executed (pushed) through a callback which has been declared by another sink (dll) that connected to the framework before.
before i continue... the bitstream data in the source dll origins at an internal samplegrabber. (ex.g. video-capture.dll delivers video data, audio.dll delivers pcm-samples, etc.) ... so, if video-data from a digital NTSC-cam arrives at its respective filter, the filter informs the framework that i got new data. then the framework calls a method from another module with a pointer to the data-buffer as interface. now the target module can process the new buffer (ex.g. push it to a filter that excepts a bitstream which then pushes it to an avi-mux, whatever...)
to come to the main point: a sink-dll which connected to the framework is ex.g. record.dll. this module accepts both video and audio data. so the record-dll-graph looks like a video-source-filter and an audio source filter both connected to an avi-mux which leads to a file-writer.
to push the video-samples (bufferstream) into the avi-mux, i wrote an own video-filter. the same should happen with the audio-bitstream. now would be the time to write an audio-filter equal to the video-filter to push into the avi-mux. my question is whether there is an already existing filter that accepts bitstream as input or not. i've already jerked around with the running object table (ROT). would this be sorta solution or is there any easier way ?
fact is that copying the video-filter is easy, but the callback would happen about 44100 times per second (at pcm 44.1 kHz). certainly i could buffer the audio data and push it via callback after it reached 50kb for example. then i'd have to care about sync techniques again... moreover i need to delay arriving audio-bit-chunks, i.e. a dll gets an audio-chunk and has to push it again after 100ms without modification, whereas chunks arrive at 44.1kHz.
so, in brief:
* is there a filter that accepts bitstream as input ?
* what's the best way to delay a bitstream-sample ?
thanx in advance for any clues...
peter
|
|
|
|
|
I have a property page and 5 edit boxes. I need to validate the data entered in each edit box.
How do I know which edit box is currently active and can I use the OnChar()
message handler to process the data keyed by the user.
laiju
|
|
|
|
|
laiju wrote:
How do I know which edit box is currently active...
See the WM_SETFOCUS message.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I used the WM_SETFOCUS message with its following handler .But the function is not getting the call at all..
I have included the ON_WM_SETFOCUS() in the message map.
CPropertyPage::OnSetFocus(pOldWnd);
CWnd *pWnd = this->GetActiveWindow();
CEdit *pEdit = (CEdit*)pWnd->GetActiveWindow();
int iCtlID = pEdit->GetDlgCtrlID();//RETURNS controlID of currently
active editbox
switch(iCtlID)
{
case IDC_EDIT_OSD_ITEM_POSX:
break;
case IDC_EDIT_OSD_ITEM_POSY:
break;
case IDC_EDIT_OSD_ITEM_WIDTH:
break;
case IDC_EDIT_OSD_ITEM_HEIGHT:
break;
default:
break;
}
laiju
|
|
|
|
|
You can validate on Kill focus when user desided to change focus. If it didn't pass validation setfocus back.
|
|
|
|
|
That is a good suggestion which i have tried already.
I would like to set the characters typed by the user restricted to AlphaNumeric characters so that all other special characters and key strokes are not accepted by the edit control in the property page.
Any idea how this can be done.
laiju
|
|
|
|
|
Look list below. I don't remember exact name of functions, but be cariful some of this functions don't use locale to identify is for example "." in non english language dot or could be letter.
Routine Character test condition
isalnum, iswalnum, _ismbcalnum Alphanumeric
isalpha, iswalpha, _ismbcalpha Alphabetic
__isascii, iswascii ASCII
iscntrl, iswcntrl Control
__iscsym Letter, underscore, or digit
__iscsymf Letter or underscore
isdigit, iswdigit, _ismbcdigit Decimal digit
isgraph, iswgraph, _ismbcgraph Printable other than space
islower, iswlower, _ismbclower Lowercase
_ismbchira Hiragana
_ismbckata Katakana
_ismbclegal Legal multibyte character
_ismbcl0 Japan-level 0 multibyte character
_ismbcl1 Japan-level 1 multibyte character
_ismbcl2 Japan-level 2 multibyte character
_ismbcsymbol Nonalphanumeric multibyte character
isprint, iswprint, _ismbcprint Printable
ispunct, iswpunct, _ismbcpunct Punctuation
isspace, iswspace, _ismbcspace White-space
isupper, iswupper, _ismbcupper Uppercase
iswctype Property specified by desc argument
isxdigit, iswxdigit Hexadecimal digit
mblen Return length of valid multibyte character; result depends on LC_CTYPE category setting of current locale
Alex
|
|
|
|
|
How can I create a CEdit with verical editing of the text. Changes to a vertical font hasn't an effect.
Best regards,
Eugene Pustovoyt
ICQ UIN: 161325180
|
|
|
|
|
what do you want to do ? turn the font to the left, or just write one char per row ???
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I want turn the font to the 90 degree.
Best regards,
Eugene Pustovoyt
ICQ UIN: 161325180
|
|
|
|
|
Eugene, what cool hack are you working on now?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi Ravi,
Now I'm create a CTabCtrl class. And I'm need in-place edit for the vertical and horizontal caption of the tab.
Best regards,
Eugene Pustovoyt
ICQ UIN: 161325180
|
|
|
|
|
Cool! Perhaps you'll consider posting it at CP? (I can give you my 5 now).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Thanks. Now I should use you as a beta-tester for it
Best regards,
Eugene Pustovoyt
ICQ UIN: 161325180
|
|
|
|
|
Please could someone help me.
All I'm trying to do is send Ctrl Alt and Del in my code, but really struggling!
Could someone help me. Sample code would be nice.
Really appreciate any help.
Thanks.
Rich
|
|
|
|
|
Try [SendInput] api!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
What are you trying to accomplish?
Lock workstation:
Check LockWorkStation
Log off/Shutdown/restart:
Check ExitWindowsEx
Or for the joy of sending Ctrl Alt Del:
Check SendMessage & PostMessage
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I've created a On-Screen keyboard.
I want to use it to Logon to windows. So I've created a CAD button.
But really struggling? Tried several methods but no success.
Thanks for any help
Rich
|
|
|
|
|
Ctrl-Alt-Del is a special key sequence in the NT kernel.
Search the MSDN for GINA.
Kelly Herald
Software Developer
MPC
|
|
|
|
|
Thanks for all your help
Regards
Rich
|
|
|
|
|
I would like to add a small text entry on the continuation of the menu bar under MFC. To do this I need to get a handle to the Menu bar.
Is there a way to do this, or is there some other way to add a small text entry after the menu items?
Thanks,
Ilan
|
|
|
|