|
I Apologize if this isn't the forum to ask this...
I have a MS Access (MDB) file with a table with 2 date fields, i want to read from a dialog on my app (on MS Visual .NET Studio 2005), here's the code I've been using do far:
<br />
hr=theApp.m_cs.Open(theApp.m_ds);<br />
if(SUCCEEDED(hr)) {<br />
<br />
<br />
theApp.m_cs.StartTransaction();<br />
<br />
<br />
theApp.m_cs.Commit();<br />
CCommand< CDynamicAccessor > cmd;<br />
CComBSTR query(_T("SELECT NumContrato, NumClie, FechaC, FechaCob, Inversion, NoCobrador, NoVendedor, Total, Plazo, Pagos FROM Contrato"));<br />
CString string(query.m_str);<br />
cmd.Open(theApp.m_cs,string);<br />
<br />
hr = cmd.MoveFirst();<br />
<br />
query=static_cast< BSTR >(cmd.GetValue(1));<br />
CString csres(query.m_str);<br />
this->m_numc=(int)*(query.m_str);<br />
query=static_cast< BSTR >(cmd.GetValue(2));<br />
m_numcte=(int)*(query.m_str);<br />
query=static_cast< BSTR >(cmd.GetValue(3));<br />
<br />
MessageBox(csres);<br />
theApp.m_cs.Close();<br />
}<br />
FechaC, FechaCob, are the two Dates I want to retrieve, but when I debug, it reads a 0 (zero) from the date fields, is there a limitation? can they be read? is there a special way to read them?
> thanks in advance!
-----
Me!
|
|
|
|
|
I'm adding a WEP network with WEP key using the WZC_WLAN_CONFIG struct and the WZC API and even though I have 802.1x authentication disabled it still does NOT uncheck the 802.1x enabled checkbox.
I've set the following:
encr = SUPP_ENCR_WEP; // (0)
Privacy = WZC_ENCR_WEP; // (0)
dwCtlFlags = (WZCCTL_WEPK_PRESENT | WZCCTL_WEPK_XFORMAT); // (0x3)
Privacy = Ndis802_11WEPEnabled;
NetworkTypeInUse = Ndis802_11FH;
memcpy(new_profile.KeyMaterial, new_network->key, new_network->key_length);
new_profile.KeyLength = new_network->key_length;
All other parameters are 0...
I've tried manually adding a WEP network through WZC and I get exactly the same parameters back when I query the preferred list. So I'm sure it's not the configuration.
MY QUESTION:
How is it possible to disable IEEE 802.1x checkbox then?!
I noticed that if doing it through the WZC GUI by unchecking "The key is provided for me automatically" it will uncheck the "Enable IEEE 802.1x authenication for this network" box. So somehow in the GUI you co-related that. Which is the correct way of doing it. However, since I specified 0x3 for dwCtlFlags shouldn't WZC recognize it the same way?
Any help is appreciated. Thanks!
|
|
|
|
|
Hi,
Guys,
m_Player = MCIWndCreate(GetSafeHwnd(),AfxGetInstanceHandle(),
WS_CHILD | WS_VISIBLE, m_sFileName);
if i am correct the m_sfileName is to call out the avi file.
Can some one advice how to do for this case?
Thanks a million
|
|
|
|
|
YUANGE wrote: Can some one advice how to do for this case?
advice for what ? The documentation is clear.
szFile <br />
Null-terminated string indicating the name of an MCI device or data file to open<br />
|
|
|
|
|
Im sorry I dont understand what do you want? can you more explain
|
|
|
|
|
Hi, I set BOLD the selected item (using TVIS_BOLD), but when I de-select it I'm not able to reset the previews font (Non-Bold).
How can I perform this?
|
|
|
|
|
You have to clear the TVIS_BOLD flag bit. Use SetItemState() with zero as the state and TVIS_BOLD as the mask.
Darker than a black steer's tookus on a moonless praire night
Within you lies the power for good, use it!!!
|
|
|
|
|
Thanks a lot it's work fine.
Another question.. and If I need to set BOLD the item only if it haven't no child and reset it only if the new selected item hasn't no child too??
I hope to explain well my doubt.
|
|
|
|
|
Use GetChildItem to check if the item in question has any child items.
Darker than a black steer's tookus on a moonless praire night
Within you lies the power for good, use it!!!
|
|
|
|
|
you have to know what item (HTREEITEM) was selected to be able to deselect it.
As I understand the OP, he want to bold the selected item, and if he clicks on another item, it will/should deselect (unbold) the previous item and select (bol) the new one.
|
|
|
|
|
Ok,you understand the OP, but I must deselect the previous item only if the new one have no child.
How to control this on event handler?
|
|
|
|
|
Hi,
I want to write Data in a Stringtable, to read this Data again, when the Program was stopped and started again later. Is this possible, and how?
Greetz
|
|
|
|
|
See here for starters. Use RT_STRING instead.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thank you David,
But this was not what I wanted. I found out that I can read from a Stringtable with
CString Test;
CString.LoadString(IDS_TEST);
or
AfxMessageBox(IDS_TEST);
OK, But how can I add Strings to my Stringtable not with the editor but with Programcode? Is it Possible?
|
|
|
|
|
TheInfernalCrow wrote: But this was not what I wanted. I found out that I can read from a Stringtable with
CString Test;
CString.LoadString(IDS_TEST);
You specifically asked, "I want to write Data in a Stringtable".
TheInfernalCrow wrote:
OK, But how can I add Strings to my Stringtable not with the editor but with Programcode? Is it Possible?
I already provided you with a link.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
i am trying to test a app. while _UNICODE defined. but when i define _UNICODE
in the app. it gives me following error.
Unicode_Test error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup
where i am going wrong?
Thanx in advance.
|
|
|
|
|
See this[^]from Microsoft.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Hi
In the code bottom I want to create a new dialog box when a condition is provided.But it failed.It is possible to create a new dialog box in a thread?If it is possible how can I do that.Thanks for your help.
UINT threading(LPVOID p)
{
CMyClass * me = (CMyClass *)p;
if(something happen)
me->threading();
return 0;
}
void CMyClass::threading()
{
CDlg *dlg = new CDlg;
dlg->Create(IDD_DIALOG2,this);
dlg->ShowWindow(SW_SHOW);
}
|
|
|
|
|
iayd wrote: But it failed.
How do you know it failed?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
It locked all windows and did not create the new dialog box properly.(But I should tell that I am writing the code for a Palm Pc with embedded visual C++)
|
|
|
|
|
Are you running a message pump in the thread?
Steve
|
|
|
|
|
No.There was not any problem before I tried to create a new dialog box in CMyClass::Threading method.I wonder that can I create a new dialog box in a thread?
|
|
|
|
|
Hello All,
I have to take back-up of a file which is either of word, text or excel etc and which is already exists.
For example: suppose there is a file which have 4 lines of text today and anybody came tomorrow and open this file writing something in this file and does not save this but my application is able to take backup of this file data which is already saved.
How it is possible because I am getting only one method which is like read the contents of the file and write it into another file but it falls down the performance of my application.
if anybody have idea how can I achieve this please share with me its very urgent.
|
|
|
|
|
Hello,
i have a question about speed between this two objects, vectors and maps(CMap, CMapStringToOb, ...).
For example, for searching an loop(and sort, search etc.), what of them is faster?
What of them to prefer, what to use if i need to store many data(class)?
Any sugestion what to use?
thanks for answers
termal
|
|
|
|
|
don't confuse, vectors and maps are fundamentally different.
vectors are dynamic arrays (in the basic meaning), when maps are associative array, in the sense that you have a unique key, and a value associated to it...
|
|
|
|