|
BOOL CIFlappApp::InitInstance()<br />
{<br />
AfxEnableControlContainer();<br />
<br />
<br />
#ifdef _AFXDLL<br />
Enable3dControls();
#else<br />
Enable3dControlsStatic();
#endif<br />
<br />
<br />
SetRegistryKey(_T("Local AppWizard-Generated Applications"));<br />
<br />
LoadStdProfileSettings();
<br />
<br />
CSingleDocTemplate* pDocTemplate;<br />
pDocTemplate = new CSingleDocTemplate(<br />
IDR_MAINFRAME,<br />
RUNTIME_CLASS(CIFlappDoc),<br />
RUNTIME_CLASS(CMainFrame),
RUNTIME_CLASS(CIFlappView));<br />
AddDocTemplate(pDocTemplate);<br />
<br />
CCommandLineInfo cmdInfo;<br />
ParseCommandLine(cmdInfo);<br />
<br />
CSplash splash1(TEXT(".\\IFlapp.bmp"), RGB(128, 128, 128));<br />
<br />
splash1.ShowSplash();<br />
Sleep(1000);
<br />
<br />
splash1.CloseSplash(); <br />
<br />
<br />
m_pMsi = new CMsiInterface();<br />
m_pIFile = new CFileInterface();<br />
m_pIReg = new CRegInterface();<br />
<br />
char buffer[_MAX_PATH];<br />
::GetModuleFileName (NULL, buffer, _MAX_PATH);<br />
<br />
<br />
m_strAppPath = (CString(buffer).Left(CString(buffer).ReverseFind('\\')+1));<br />
m_strAppDrive = FindDrive(m_strAppPath);<br />
<br />
#ifdef _DEBUG<br />
#endif<br />
<br />
m_lAppCount = 0;<br />
CString strDrive = m_strAppDrive;<br />
strDrive += ":";<br />
CSecureUSB secUSB;<br />
secUSB.SetPath(strDrive);<br />
if(secUSB.InitWMI())<br />
{<br />
secUSB.ConnectWMI();<br />
secUSB.GenerateHash();<br />
}<br />
else<br />
{<br />
return FALSE;<br />
}<br />
<br />
if (!ProcessShellCommand(cmdInfo))<br />
return FALSE;<br />
<br />
m_pMainWnd->ShowWindow(SW_SHOW);<br />
m_pMainWnd->UpdateWindow();<br />
<br />
return TRUE;<br />
}
|
|
|
|
|
i just asked about a small light sample in which you call the application, not the whole stuff.
also, did you try to use the debugger and watch the content of some useful variables ?
ps, use the <pre></pre> tags when you have some code to post...
|
|
|
|
|
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
|
|
|
|
|
kiranin wrote: why this happend and how i recover from this one?
don't know, as you don't provide much infos...
|
|
|
|
|
What does your frame's OnCreateClient() method look like? When one of the buttons is clicked, what does the handler function look like? Does the program behave correctly up until one of the buttons is clicked?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I got the solution....
My debug folder path is not set correct thats y i got like this.
Thanks to all
|
|
|
|
|
I am using this code to store data in msaccess database but when i try to open the table it is not tthere
,and while opening the mdb file it will always ask for conversion if i click the convert database then also no table is present.
1)What should i chage in this code to open in msAccess2003 Can anybody help me to solve my problem?
2)For storing i have not done any odbc/oledb (DSN)connection is that needed.If yes how to do the connection?
3)Is this code is right?
<br />
#ifdef _DEBUG<br />
afxDump<<"before opening tha datbase"<<"\n";<br />
#endif<br />
db.Create("C:\\ODLDATA.mdb");<br />
db.Open("C:\\ODLDATA.mdb");<br />
#ifdef _DEBUG<br />
afxDump<<"after database is open"<<"\n";<br />
#endif<br />
COleVariant var;<br />
var.ChangeType(VT_BSTR,NULL);<br />
<br />
CString ID,datetimestamp,marketno,bid,ask,marketstate,marketname,Sql;<br />
<br />
recset.Open(AFX_DAO_USE_DEFAULT_TYPE,"SELECT * FROM T_Quote",NULL);<br />
Sql = "SELECT * FROM T_Quote";<br />
recset.AddNew();<br />
recset.SetFieldValue("ID","RequestId");<br />
recset.SetFieldValue("DateTimeStamp","Timestamp");<br />
recset.SetFieldValue("MarketNo","a");<br />
recset.SetFieldValue("Bid","Bid");<br />
recset.SetFieldValue("Ask","Ask");<br />
recset.SetFieldValue("MarketName","Market");<br />
recset.SetFieldValue("MarketState","d");<br />
recset.Update();<br />
recset.Close();<br />
db.Close();<br />
<br />
<br />
|
|
|
|
|
abrakadbra wrote: 2)For storing i have not done any odbc/oledb (DSN)connection is that needed.If yes how to do the connection?
No, you can have a DSN-less connection. I briefly show how to do that here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I want to set the text of a specified row in my list control to another color.
How can i do this? I googled and got a listcontol with alternate colored rows. but i want to change the row (i have an index of it)text color at runtime.
Thank you
KIRAN PINJARLA
|
|
|
|
|
|
Read this article[^]
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Hi,
I need to know whether a remote(in other LAN)host/server is up or down. I can ping any host in my LAN. But when I want to ping any server as for example www.codeproject.com from my pc I get Request timed out message. Thanks in advance.
Nayan Kumar Sarkar
|
|
|
|
|
Nayan_vmcl wrote: But when I want to ping any server as for example www.codeproject.com from my pc I get Request timed out message.
Machines can opt to not respond to ICMP requests. If a machine responds to such a request, it is up and running. However, if a machine does not respond to such a request, it could be for a number of reasons.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Right, and any reliable firewall will do its best to hide such computer in network, so it looks like down.
Regards
|
|
|
|
|
HookApi,example "TextOutA",but how do it.
|
|
|
|
|
Can you be more specific what do you need with TextOut
|
|
|
|
|
first intercept "TextOut",
second replacing it,use our function "MyTextOut"
:
MyTextOut(int nXStart, int nYStart, LPCSTR lpszString,int cbString)
{
//do anything
//here is "TextOut" to do
}
!when we use the "TextOut",it run "MyTextOut" first in fact.
-- modified at 3:41 Wednesday 11th October, 2006
|
|
|
|
|
Im sorry but i dont understand what do you need, you have a function MyTextOut that it has TextOut then?
|
|
|
|
|
thanks all the same.
intercept API can help us do more useful things.
get words from windows screen just only a little section...
|
|
|
|
|
Is this a joke?
If you could easily just intercept TextOut and replace it with your own then this computer fad
wouldn't have lasted a week!
I have to ask... WHY?
Just scan the pixels on the screen, use OCR algorithm to get the text, and change it.
That will work.
Mark
|
|
|
|
|
I've not tried it, but see here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
can any one tell me where the standard include directory path will be there in VC++ IDE using VS2005....
Regards,
Mpk1979
mpk1979
|
|
|
|
|
The Include path can be check or set in Tools->Options , Projects and Solutions->VC++ Directories
|
|
|
|
|
Hi, I am developing a SDI application. It contains 2 tabs. 1st tab is again contains 3 panes, which needs to be created using splitter windows. That splitter window is divided into 2 rows.
So my query is how to create a splitter window in a CTabCtrl?
|
|
|
|
|
Use the splitter as you always would. The only difference is the parent window is one of the tab
windows.
Mark
|
|
|
|