|
Good to know. Thanks for all of your help The security thing is new to me, but I am sure I will figure it all out.
Thanks again!!
There are 10 kinds of people in this world. Those who understand binary and those who don't.
|
|
|
|
|
Hello
Can anyone direct me to a resource where I can see working demo(s) / samples highlighting HOWTO dynamically create a user interface from a XML data definition.
What I mean is this:
There will be one or more XML data files which will actually contain information regarding controls to be drawn.
A program will read those XML files and dynamically create the defined controls.
Hence, if the XML reads something like:
....
<Button>
<ID>CommitPatchButton</ID>
<Caption>Complete task</Caption>
<Style>Flat</Style>
</Button>
....
Then our program should create the button which is associated with the ID 'CommitPatchButton' with the defined specifications.
Ofcourse, the XML definition will ONLY define UI Elements and their visibility (for instance,if the button should be made visible or not).
The code associated with the controls will be already present beforehand.
Thus, in our case, if the above button is defined as visible in the XML data, then we will draw it as specified, and to user will be able to use the functionality associated with it.
Ideally a VC++/MFC solution will do, though, it's a working implementation that's more neccessary, so that I can grasp the idea quickly.
Otherwise, if you have a brilliant whitepaper/article/layout to achieve the goal (but with the code lacking..), send it(or a link to it) to me anyways !
Note: No business quotations please.
Regards
Kamal Shankar
"God then made two great lights; the greater light to rule the day, and the less light to rule the night"
- Genesis 47:3
|
|
|
|
|
|
Can someone please tell me a ** simple ** way to hide and unhide my application from the alt-ctrl-del end task list?I am really frustrated with this problem.
|
|
|
|
|
RegisterServiceProcess(0, 1);
Can it be simpler?
Best regards,
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
A side comment to Dominik's response:
The RegisterServiceProcess call appears to be only available in the Windows 9x/ME environment.
Software Zen: delete this;
|
|
|
|
|
Thank you for replying promptly.I tried using the function RegisterServiceProcess in VC++ which i am writing my code in but it is not present( gives an undeclared identifier error). In the MSDN help, the function is listed under Platform sdk and win ce docs.I am a novice. what do i need to do to make it work in VC++.?
|
|
|
|
|
As I mentioned, it appears that the function RegisterServiceProcess() is only available in the Windows 9x/ME environment. I searched on MSDN, and found this article[^].
I also did a 'find in files' operation on the header files for Visual C++ 6, .NET 2002, .NET 2003, and the Platform SDK. RegisterServiceProcess() is not defined.
Software Zen: delete this;
|
|
|
|
|
I am writing an application that uses worker threads. I am trying to figure out why running the same SQL select statement some times it executes in 20 msec and other times takes 2 minutes. It executes the select statement through a connection object.This is happening randomly. The application has a total of 3 threads by design and the ADO connect object creates 5 more (per windows task manager).
1st thread: dialog (it is an MFC dialog based app)
2nd thread: main thread to control worker threads
3rd thread: worker thread this is the one that creates the ado connection object and executes the business logic.
Can any one give me any ideas?
Thanks,
JC
|
|
|
|
|
How is ADO object shared among the threads? Are you passing in a pointer or creating a new ADO object?
Kuphryn
|
|
|
|
|
Each worker thread has its own connection object and any other ado object it may need. For debugging porpuses I am only using one worker thread that executes always the same business logic. I can see in my log file that even so the transactions it executes are exactly the same, one may take 5 mseconds to finish where another may take 2 minutes. The log file indicates that the worker thread is always waiting on the ado calls to return. (that is the only place where I can see delays happening)
Thanks,
nanukos
|
|
|
|
|
I am not familiar with ADO and its I/O mechanism. Sounds like your design is valid and ADO is a blocking I/O model.
Kuphryn
|
|
|
|
|
I need my program to view data from a .dbf file but I don't want to have to use a DBMS to do so. How would I go about doing this?
Parse the file myself?
Or is their a better way?
Kevin Shaffer
kshaff03@msn.com
|
|
|
|
|
If you are not interested in using a DBMS, then your only recourse is to process the file yourself, not a trivial task by any means. See here, here and here for file format information.
Why not use ODBC? Create a DSN using the ODBC applet in Control Panel. Then you can use the CRecordset class to access the data. You can also create a DSN-less connection.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
This is my first experience with a database of any sort...
My program only needs to update data from a .dbf from a cd once a month, so it doesn't have to be efficient, and no writing is needed either. I cannot distribute any software with my hardware that is not already installed on windows, for example Microsoft Access, etc.
If I use ODBC, (I know very little about it now) would my program be able to access the file without having to distribute a DBMS along with my own software?
Kevin Shaffer
kshaff03@msn.com
|
|
|
|
|
kshaff03 wrote:
...and no writing is needed either.
If no writing is needed, then how are you going to update the .dbf file?
kshaff03 wrote:
I cannot distribute any software with my hardware that is not already installed on windows, for example Microsoft Access, etc.
Most drivers come preinstalled with the OS.
kshaff03 wrote:
If I use ODBC, (I know very little about it now) would my program be able to access the file without having to distribute a DBMS along with my own software?
Most likely, yes. Newer technologies exist (e.g., ADO, DAO), but I've not had the privilege of using them. One of these days I'll give 'em a whirl, though.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_database_topics_.28.odbc.29.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcodbc_drivers_overview.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/dasdkodbcoverview.asp
http://support.microsoft.com/default.aspx?scid=kb;en-us;110093
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
DavidCrow wrote:
If no writing is needed, then how are you going to update the .dbf file?
Actually, I am updating a text file on the harddrive with a subscription from a cd that contains a .dbf file with the data I need.
Thank you very much for all your help and advice. I was under the impression that you would have to buy Access and have it installed in order for your program to use the drivers. I guess it is time to learn some database programming!
Thanks again.
Kevin Shaffer
kshaff03@msn.com
|
|
|
|
|
kshaff03 wrote:
I was under the impression that you would have to buy Access and have it installed in order for your program to use the drivers.
With some databases, this might be the case, but not with Access.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi
When i send my request using CHttpConnection to the server using the POST method my "+" sign is replaced by blank space. I am sending the header as
Content-Type: application/x-www-form-urlencoded\r\n
can any body help me in this what type of header i should send so that it won't replace the "+" sign .
Thanks
shailesh
|
|
|
|
|
You need to URLEncode the +, because in a URL, + is a synonym for a blank space.
You should replace your + with %2B.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
|
|
Hi,
I m using CRichEditCtrl in a Dialogbox, How can I capture the Lost Focus event of CRichEditCtrl.
|
|
|
|
|
Does OnKillFocus() not work?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Thanks for replying
No, OnKillFocus() is not working.
Actually wat i have done is create a subclass of CRichEditCtrl and that i have included in the Dialog that facilitates me to capture KeyPress event.
The code snippet is sumthing like this:
BOOL CSend::PreTranslateMessage(MSG* pMsg)
{
extern char userStatus[50];
if (pMsg->message == WM_KEYDOWN)
strcpy(this->userStatus,"Typing");
return CRichEditCtrl::PreTranslateMessage(pMsg);
}
but , then i have find out that Lost Focus is Mouse event and that cannot be handled using abouve snippet so i have tried a different this which is as follows:
BOOL CChat::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
// TODO: Add your specialized code here and/or call the base class
NMHDR* pNMHDR = (NMHDR *)lParam;
if(pNMHDR && pNMHDR->code == NM_KILLFOCUS)
{
CWnd *pFocus = CWnd::GetFocus(); // call to a static function
if(pFocus &&(pFocus->GetParent() == this))
{
if(pFocus->GetDlgCtrlID() == TXT_SEND)
MessageBox("here",NULL,MB_OK);
}
}
return CDialog::OnNotify(wParam, lParam, pResult);
}
OR
BOOL CChat::OnCommand(WPARAM wParam, LPARAM lParam)
{
// TODO: Add your specialized code here and/or call the base class
UINT notificationCode = (UINT) HIWORD(wParam);
return CDialog::OnCommand(wParam, lParam);
}
But stll unable 2 capture lost focus event of CRichEditCtrl.
|
|
|
|