|
Hi
How do I retrieve the column names of a table programatically at run time.
Thanks in advance.
Taruni
|
|
|
|
|
|
Hello
I am trying to create a modeless dialog. I have been following examples such as
http://www.codeproject.com/dialog/gettingmodeless.asp
http://www.functionx.com/vcnet/Lesson10.htm
http://www.softlookup.com/tutorial/vc++/vcu21fi.asp#I9
and produced the following code
header file:
<br />
<br />
#ifndef __CSTARTUPSCREENDLG_H<br />
#define __CSTARTUPSCREENDLG_H<br />
<br />
#include "resource.h"<br />
<br />
<br />
<br />
class CStartUpScreenDlg : public CJPMDialog<br />
{<br />
public:<br />
<br />
CStartUpScreenDlg(CWnd* pParent = NULL);<br />
void CloseStartUpScreen();<br />
<br />
enum { IDD = IDD_START_UP_SCREEN }; <br />
<br />
JPMCEditExt m_startupinfo;<br />
<br />
<br />
<br />
<br />
<br />
protected:<br />
virtual void DoDataExchange(CDataExchange* pDX);
<br />
<br />
<br />
protected:<br />
virtual BOOL OnInitDialog();<br />
<br />
DECLARE_MESSAGE_MAP()<br />
<br />
<br />
};<br />
<br />
<br />
.cpp file for header file
<br />
#include "stdafx.h"<br />
#include "resource.h"<br />
#include "aboutDlg.h"<br />
#include "user.h"<br />
#include "tradecapture.h"<br />
#include "mainfrm.h"<br />
#include "tradecapturedoc.h"<br />
#include "global.h"<br />
#include "EdgDiag.h"
#include "componentversionsdlg.h"<br />
#include "passworddlg.h"<br />
#include "startupscreen.h"<br />
<br />
<br />
#ifdef _DEBUG<br />
#define new DEBUG_NEW<br />
#undef THIS_FILE<br />
static char THIS_FILE[] = __FILE__;<br />
#endif<br />
<br />
static CEdgDiag *pDiag = NULL;
<br />
CStartUpScreenDlg::CStartUpScreenDlg(CWnd* pParent ) : CJPMDialog(CStartUpScreenDlg::IDD, pParent)<br />
{<br />
<br />
<br />
<br />
}<br />
<br />
void CStartUpScreenDlg::DoDataExchange(CDataExchange* pDX)<br />
{<br />
CJPMDialog::DoDataExchange(pDX);<br />
<br />
DDX_Control(pDX, IDC_START_UP_INFO, m_startupinfo);<br />
<br />
<br />
}<br />
<br />
BEGIN_MESSAGE_MAP(CStartUpScreenDlg, CJPMDialog)<br />
ON_WM_LBUTTONDBLCLK()<br />
<br />
<br />
<br />
END_MESSAGE_MAP()<br />
<br />
BOOL CStartUpScreenDlg::OnInitDialog() <br />
{<br />
CJPMDialog::OnInitDialog(); <br />
<br />
<br />
return TRUE;<br />
}<br />
<br />
void CStartUpScreenDlg::CloseStartUpScreen()<br />
{<br />
<br />
DestroyWindow();<br />
<br />
<br />
<br />
}<br />
<br />
<br />
main code
<br />
<br />
CStartUpScreenDlg startupDlg;<br />
startupDlg.Create( CStartUpScreenDlg::IDD, this->GetMainWnd());<br />
startupDlg.ShowWindow(SW_SHOW);<br />
startupDlg.SetFocus();<br />
<br />
unfortunately this is not working properly. Although a dialog box appears, the edit box that I want on it does not appear and some static text. If you have any information on what I am doing wrong, please tell me! Thanks for your time.
|
|
|
|
|
minkowski wrote: CStartUpScreenDlg startupDlg;
startupDlg.Create( CStartUpScreenDlg::IDD, this->GetMainWnd());
startupDlg.ShowWindow(SW_SHOW);
startupDlg.SetFocus();
Create startupDlg on heap.
|
|
|
|
|
Try This... and let me know
CStartUpScreenDlg startupDlg;
startupDlg = new CStartUpScreenDlg(); //add this and try
startupDlg.Create( CStartUpScreenDlg::IDD, this->GetMainWnd());
startupDlg.ShowWindow(SW_SHOW);
startupDlg.SetFocus();
SARVEJANAA SUKINOBHAVANTHU
Ashok
|
|
|
|
|
hi
so i changed my code to
<br />
CStartUpScreenDlg *startupDlg = new CStartUpScreenDlg();<br />
<br />
startupDlg->Create( CStartUpScreenDlg::IDD, this->GetMainWnd()); <br />
<br />
startupDlg->ShowWindow(SW_SHOW);<br />
<br />
startupDlg->SetFocus();<br />
<br />
<br />
but i am afraid still the dialog box appears but the static text on it does not. it seems creating it on the heap did not help.
ummm any other ideas ?
-- modified at 6:37 Monday 18th December, 2006
|
|
|
|
|
You are creating a dialog and it appears but some edits&statics arent show,right?
|
|
|
|
|
yes thats right, some static text is not showing in the dialog. any ideas why?
|
|
|
|
|
Are you sure Visible of statics & edits are visible ?
|
|
|
|
|
hey thanks for that. you were right in that the visible check box was not ticked ! its the 1st dialog box i have created so i am still learning
|
|
|
|
|
|
See if visible property of edit box having ID IDC_START_UP_INFO is true.
|
|
|
|
|
hey thanks for that. you were right in that the visible check box was not ticked ! its the 1st dialog box i have created so i am still learning
|
|
|
|
|
Hi..
When i try to save the modifications done to any xml file using XmlDataDocument variable, the error shown is as follows:
The process cannot access the file 'xml file name' because it is being used by another process.
Could anyone plz solve this!!
Thanks..
|
|
|
|
|
zxc89 wrote: Could anyone plz solve this!!
Sure. Don't try to modify the file when it's in use by another process.
Are you sure you are not leaving the file open somewhere?
|
|
|
|
|
I am pretty sure that the file is not opened anywhere else..
|
|
|
|
|
The error message indicates a sharing violation.
If no other processes are using the file then make sure you haven't opened it twice without
appropriate share flags.
|
|
|
|
|
suppose i delete or hide a icon from system tray, the icon gets removed but there is a blank space at that place, how can i refesh the tray or when i delet an icon how the tray should clean that blank space,
any idea
|
|
|
|
|
|
Are you using Shell_NotifyIcon(NIM_DELETE... to remove the icon?
|
|
|
|
|
no i am using SendMessage with TB_delete ( soemthing i dont remember now), i dont want to use sheelnotify cas i am deleting some other app icon,
|
|
|
|
|
I don't know what you'd do then. The tray icons are tied to a HWND in the app they are associated
with and that app also receives messages from the shell related to the icon.
Doesn't the app have a setting to hide the tray icon?
Good luck!
|
|
|
|
|
hi mark,
my doubt is , i am making a application which can hide or delet other icon present in system tray or tray noification area, when i delete an icon from there, the icon gets removed but there is blank space or empty space is there, how to refesh the tray or what i can do so tht when i remove or hide an icon, the icon as well as the empty space will also be removed,
if you want the code i can post it here
|
|
|
|
|
I have no ides. The icons belong to other apps so you may get them to disappear but that
doesn't mean they've been removed.
|
|
|
|
|
hi guys,
i got the idea, if anyone needs help let me know i am willing to help my best.
|
|
|
|