|
Yes, that's what I meant! Is there any reason why you can't create (start) this dialog
from the main window instead from the interface? Your interface is modeless and how you
create the DialogBox (which is modal) will affect only its parent. Can you post some code,
how you create your 'DialogBox' (constructor) before you call DoModal()?
As my daughter would say, "... Whatever!"
|
|
|
|
|
I need to know how I can retrieve data from my database if its stored as as bytes.
So far to get strings out I have been doing a _bstr_t cast to the value received from rs->fields->getItem->Value . However somewhere I read about
rs->fields->getItem->Value.iVal
and
rs->fields->getItem->Value.bVal
but cannot find any info on it.
Thanks for your help,
ns
|
|
|
|
|
__variant_t derives from VARIANT. iVal, bVal, fltVal and others are defined in VARIANT stuct.
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
Look in MSDN. VARIANT is a union and can hold many types of data. In fact you can look here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcemfc/htm/struct_32.asp
|
|
|
|
|
Hello,
I'm trying to make a personal app. that will organize my MP3 collection in a particular way. Is there any code out there that can parse MP3 header tags to get the particular text fields (e.g., title, album, artist, etc.)?
Thanks!
JennyP
|
|
|
|
|
|
Actually it is very easy to parse ID3V1 tags. Simply seek the file pointer of an mp3 file to the end minus 128 bytes. You can then read the 128 from this pointer until the EOF (End of file).
If the first three bytes equal "ID3" you know that there is an ID3V1 tag at the end.
However, I don't know how ID3V2 tags work
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
oops, my fault.
It a long time ago I worked with ID3 tags
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I wrote something a while ago that uses filenames for song names and folder names for artist and album. ID3V1 is a doddle, it's just sitting on the end of the mp3 ( which is why if you're *ahem* downloading an mp3 and don't get it all, there's no id3 info ). ID3V2 is compressed though, I used a class I found on the net ( and fixed, as I recall ) to do it. If you have no joy and want ID3V2, just LMK and I'll send you the class. I can't post it to CP as I did not actually originally write it.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
|
|
|
|
|
Hi Christian,
I would love to get that ID3V2 class you spoke of! I always use V2, so V1 won't work for me. I don't plan on selling (or widely distributing) this application.
Thanks!!!
JennyP
|
|
|
|
|
Could you please send me this class per mail?
E-Mail is foxhunter@hlla.net
thanks in advance
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hello,
When clicking on a CEdit box, I would like the entire contents of the box to be selected (so that the user can simply overwrite existing text instead of manually backspacing over the existing contents). I have searched and didn't find anything on MSDN help. When a user tabs to the CEdit box, the entire contents are selected--the exact behavior I want for a user mouse-click. Any suggestions?
Thanks!
JennyP
|
|
|
|
|
override OnSetFocus (handle EN_SETFOCUS) for your edit control, and then call m_myEdit.SetSel(0,-1);
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Hi Chris,
I've done just that, and no dice. I verified that it gets called with TRACE but the edit box still puts the insert cursor where the mouse was when I clicked on it. Do I need to call more items from the function? Here's the function....
void CDiagGoalSched::OnSetfocusEditDue() <br />
{<br />
TRACE0("SET FOCUS...");<br />
m_CtrlEditDue.SetSel(0, -1);<br />
}
Thanks!
JennyP
|
|
|
|
|
try this:
::PostMessage(m_edit.m_hWnd, EM_SETSEL, 0, -1);
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Bingo! Why does this work and not the first one? Is it the order of window messages in the queue? (I.e., the m_EditCtrl.SetSel() was before the Edit's translation from mouse position to cursor position?)
Thanks!
JennyP
|
|
|
|
|
yep, i think you explained it. by posting the message (instead of Sending as SetSel does), you give Windows a chance to finish the Focus Change message (which probably ends with the edit control clearing the selection) before you change the selection manually.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Hi !!
I am designing a chat server these days. The server is designed in a manner to scale upto thousands of connections.
But i want one advice. The message from one client to another is protocol specific. Server decodes the message and find out information regarding target connection. Here lies the problem. What information i include in the message so that server easily find the target socket???
Infact whenever new connection established, i keep its pointer in std::vector data structure and send the position of that socket in vector to all other authorized buddies. But this is not a good approach. If one buddy disconnects, the position of others in vector is disturbed. So i want advice in this regard.
Kashif Mehmood
|
|
|
|
|
Kashif Mehmood wrote:
i keep its pointer in std::vector data structure and send the position of that socket in vector to all other authorized buddies.
std::map with GUID as a key?
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
Hi,
I'm trying to use MSFlexGrid On ATL Composite Control but it's giving me error. If I use this control in MFC based application it works fine but crashes in ATL. Do U've any idea how to use an ActiveX control on ATL Composite Control?
Regards;
Uttam Kumar
|
|
|
|
|
Which kind of error? Can you see your flex grid window if you test with ActiveX Control Test
container?
[edit]
I tried a simple project and didn't have any problem
[edit]
|
|
|
|
|
I have:
_variant_t *tempkeyValue = new _variant_t[60];
that executes fine on WinXP but crashes on Win2K. Any ideas why? And how to get around it?
Thanks,
ns
|
|
|
|
|
Somewhere earlier in your program you have trashed the memory and thus the allocation is failing.
Tim Smith
"Programmers are always surrounded by complexity; we can not avoid it... If our basic tool, the language in which we design and code our programs, is also complicated, the language itself becomes part of the problem rather that part of the solution."
Hoare - 1980 ACM Turing Award Lecture
|
|
|
|
|
Hello, the codegurus around the world.;)
I guess that you misunderstand how you get the vaule with VARIANT type.
Generally speaking, we have some helper function convering from VARIANT to
string.
Check DAO sample in MSDN to find the helper function.
Please, don't send me your email about your questions directly.
Have a nice day!
Sonork - 100.10571:vcdeveloper
-Masaaki Onishi-
|
|
|
|