|
I am frustrated. It seems that my ado database adds new records at random places at different runs of the program. I need some sort of certainty here. Even MoveLAst doesnt help. I am doing an addNew() on the ado recordset....
Appreciate your help,
ns
|
|
|
|
|
Look at primary key, it usually dictates where it is inserted. However you cannot rely on it ether because physical layout of the table relies on internal workings of particular database, as far as I know there is no guarantee. You can use "sort by" to get records in the order you want.
|
|
|
|
|
|
Thomas George wrote:
Is it possible to show a floating toolbar without caption?
Typically they use MiniFrameWnd(?) and I don't think there is any option to remove the caption for this. The caption also provides something to grab to move the toolbar around. I think you'd need to provide your own frame wnd to do this.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
|
I have a standadrd combobox populated with a font's 256 characters.
When the user selects one, the list closes, and the correct value is shown in the combo line.
If the user selects a character with a double (ie 'A' and 'a'), the next
time the list drops down, the FIRST one ('A') is shown in the combo line, not the selected one ('a').
As long as the selected value is unique, there is no problem.
I have tried using OnDropDown to reset the CurSel to the proper index, GetLBText for the string, etc. and nothing works.
|
|
|
|
|
Hey.
Having a small problem launching an app using ShellExecuteEx and using WaitForSingleObject afterwards....
If I use WaitForSingleObject the app launches but seems to freeze until I close my program... If I don't use WaitForSingleObject then it runs perfectly fine...
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = ".\\J2EE_SDK_1.3.1\\setupJ2EE.exe";
ShExecInfo.lpParameters = "";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
if(!ShellExecuteEx(&ShExecInfo))
{
}
this->ShowWindow(SW_HIDE);
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);
The program I'm launching is the setup for the Java Enterprise Enviornment [An InstallShield v 5.10 setup file.]
Any ideas???
Regards,
Brian Dela
Run naked in the snow until you're sweating like a stuck pig and can't seem to catch your breath. When the flu becomes pneumonia, they can cure that with a shot. - Roger Wright
|
|
|
|
|
try something like
<br />
MSG msg;<br />
while (WaitForSingleObject( ShExecInfo.hProcess, 0 ) != WAIT_OBJECT_0)<br />
{<br />
while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE ))<br />
{<br />
TranslateMessage( &msg );<br />
DispatchMessage( &msg );<br />
}<br />
}<br />
Joel Lucsy
|
|
|
|
|
Excellent... Works perfectly
Thanks
Regards,
Brian Dela
Run naked in the snow until you're sweating like a stuck pig and can't seem to catch your breath. When the flu becomes pneumonia, they can cure that with a shot. - Roger Wright
|
|
|
|
|
How to create a Button and Text(output only) controls in a Microsoft C 6.0 DLL without using MFC nor class?
Is there any reference coding available?
Thanks.
|
|
|
|
|
I need a class that creates the controller I need dynamically. When this class is created it loads up some data from a file and depending on what it says in that file the controller should be a CListCtrl or a CEdit.
So I thought I create a dummy controller inherited directly from CWnd let my dialog creates it and then this controller will load the data in the file and then creates the CListCtrl or CEdit and subclass it to my own controller.
It should work, but I don't get it to. I think I might have misunderstood some things with subclassing.
In OnInitDialog I have
// Created Dynamically for now
m_DummyController.create( this , CRect( x , y, w , h ) , 1 );
And then DummyController is doing its stuff (checking what kind of controller it wants to transform into)
CMyDummyCtrl::BeAEditCtrl()
{
CEdit pEdit = new CEdit;
if( pEdit->create( WS_CHILD | WS_BORDER | WS_VISIBLE , CRect( x , y, w , h ) , GetParent() , 0 ) )
{
pEdit->SubclassWindow( this->GetSafeHwnd() );
}
} This doesn't work at all. I tried different versions of it so I’m properly going at this problem the wrong way. So any help with be good.
/Mathias
|
|
|
|
|
Your problem is about "scope", you've declared a CEdit variable (pEdit) inside a function, and that variable is destroyed when you leave the same function...
in order to solve it, declare your CEdit inside the class and then use it from any function in the same class, the CEdit will exist while the owner class exists too...
Hope this helps...
|
|
|
|
|
There where some typos in the code.
CEdit pEdit = new CEdit;
CEdit* pEdit = new CEdit; So it was a pointer. But the problem is that it crashes in subclassWindow(...)
A better way of explaining my problem is.
I Have my Dummy controller an that controller then creates a new controller ( CEdit ) and displays it inside CMyDummyCtrl and the CEdit controller is taking up the same place that CMyDummyCtrl and all Messages sent to CMyDummyCtrl should always be relayed to CEdit since CMyDummyCtrl isn't really doing anything
That is what I want to do. And I thought I was able to do that with subclassWindow(..)
but I don't get it to work.
|
|
|
|
|
Has anyone tried capturing events fired by CHotKeyCtrl? I would like to know when the user selects a new hotkey but I can't seem to find any info on that. Anyone?
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
It sends an EN_CHANGE message just like an edit control.
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
Homepage | RightClick-Encrypt | 1ClickPicGrabber
"Which comes first, the bug or the stress?" -- Chris Maunder
|
|
|
|
|
Hiya can anyone show me quickly how to use Visual Source Safe 6.0. I have a project that I want to make changes to and then detect in VSS and make the necessary changes...
Also does anyone have a tutorial on VSS??
Thanks a million,
grahamoj.
|
|
|
|
|
Heres the scenrio I would like to access a set of library functions that were originally designed to be called from C (they are in fact the Sybase Open Client libraries), I know there are OLE and ODBC drivers etc but they constrain what you can do.
So the idea is to write some "glue" to go between the C interfaces of open client and VB.NET.
I believe that there is no reason why I cannot do this so I tried to just test this out and wrote a simple class in C++, compiled it as a DLL and tried to link it in as a reference to my VB program. This returns an error saying that my dll is not a .Net assembly.
I have tried to find something relevant in all the documentation that I have available but there is just so much I have been unable to find what I need.
Can someone throw me a bone here before I go totally bald.
Thanks
|
|
|
|
|
|
I want to create a piece of code which will be opening a new browser window displaying given Url.
It seems to be very easy, but I don't have idea how to do this.
Please help
|
|
|
|
|
ShellExecute (NULL, "open", url, NULL, NULL, SW_SHOW);
|
|
|
|
|
Great thank you.
Could you give me a hint how to open this url in a new browser window, not in the already opened one.
Thanks in advance
|
|
|
|
|
ShellExecute (NULL, "open", "iexplore.exe" , "http://www.etc.com", NULL, SW_SHOW);
1) Better to type _T("string") instead "string"
2) The 3rd param is the program to "open" and the 4th param is the parameter for the 3rd
3) If you type
ShellExecute (NULL, "open", url_1, NULL, NULL, SW_SHOW);
Sleep(2000); // 2 seconds
ShellExecute (NULL, "open", url_2, NULL, NULL, SW_SHOW);
the web pages (1st,then 2nd) will be show on the same browser window.
The code line I suggest you will open multiple windows
4) Look in MSDN for "ShellExecute", in order to understand last parameter
(you can combine more atributes using '|' operator)
5) If your URL is not a constant string, make a variable:
CString strUrl;
...
ShellExecute (NULL, "open", (LPCTSTR)strUrl, ......)
|
|
|
|
|
Hallo!
Is there anybody how knows, or even has, a VC++ sample (or a link for more details) how to create and send a MagicPacket to create a "Wake up on lan" event on an other PC!
Thanks a lot!
Ralph
|
|
|
|
|
Here's a short program [^]for doing this on linux. (discussed here[^])
It should be easy to port.
|
|
|
|
|
Thanks for your quick reply!
I'll try to code this in MFC and W2K, may be it works!
Ralph
|
|
|
|