|
The dialog is not shown (there's no WS_VISIBLE style in dialog resources), so SW_HIDE does nothing (I've tried).
It does not bring the focus back to main window.
And I don't want to call SetFocus on main window, because I need to create hidden
dialog also when my app is not active (It would steal another application's focus).
rrrado
|
|
|
|
|
One probable solution is to call GetForegroundWindow() just before creating dialog (from where you created the dialog box) and SetForegroundWindow(H) very soon after creating it.
|
|
|
|
|
But this is not too safe The window could be changed in the middle of the Get and Create
rrrado
|
|
|
|
|
SOLVEDSOLVED
Thanks for your ideas.
If anybode else would like to know,
I've replaced "return TRUE" to "return FALSE" in OnInitDialog().
rrrado
|
|
|
|
|
Hi i needed some help with the program i have been working on it all week and it's giving me a headache i know you guys are smart so could you help? Th eprogram begins with
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
string letters= "";
ofstream
cout<< " Enter alphabet";
getline(cin, letters)
outfile.open("
return 0;
}//end of main function
and you are supposed to end with a program that writes 26 letter to a sequntial file
ps its a dat file thanks
|
|
|
|
|
You need to check 'ignore HTML tags' in order for yuor code to be legible.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i am not able to see your program properly!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
how do i create a .dat file in c++ (not usins save as but in code)?
Jay
-- modified at 8:22 Thursday 10th May, 2007
sorta like a temporary file
|
|
|
|
|
Im not sure is this[^] thread helpful for you?
|
|
|
|
|
i saw the thread, wat he wants was alittle different-in general, i want to know if there is a code that creates new files (like .dat files)
|
|
|
|
|
what about using fopen ? or CFile ? or std::ofstream ?
|
|
|
|
|
would you please teach me how to use those functions you mentioned-imma begginer. thank u
|
|
|
|
|
I try to open the database ImageIndex (Connected with ODBC) by using:
try
{
CRecordSet::Open(NULL, _T("Select ImageName, Caption From ImageIndex"), NULL);
}
catch(CException *e)
{
WCHAR ErrorMsg[1024];
e->GetErrorMessage(ErrorMsg, 1024, 0);
::AfxMessageBox(CString(ErrorMsg), MB_OK, 0);
return;
}
and it always give me back the Erros Message with Nothing in it.
The SERVER is MS SQL SERVER 2005. I can run the SQL query "Select ImageName, Caption From ImageIndex" in the SQL SERVER Management Stuido Express and it did return me the correct results that I want.
Anyone knows why this is happening?
Thank you very much.
|
|
|
|
|
Whats return value of Open? 0 or 1
|
|
|
|
|
It won't go through this line to return me a value.
|
|
|
|
|
You may want to pass some actual parameters instead of those NULLs
Also, CRecordset::Open is not static so I don't know about caling it like this:
CRecordSet::Open(...
Just a typo?
Anyway, maybe try catching CDBException* for details on the exception from ODBC...
try
{
CRecordSet::Open(NULL, _T("Select ImageName, Caption From ImageIndex"), NULL);
}
catch(CDBException *e)
{
TRACE(_T("*******************************************\n"));
TRACE(_T("** Database Exception \n"));
TRACE(_T("** %s \n"), e->m_strError);
TRACE(_T("** %s \n"), e->m_strStateNativeOrigin);
if (pszSrcCodeOrigin && _tcslen(pszSrcCodeOrigin) > 0)
{
TRACE(_T("** %s \n"), pszSrcCodeOrigin);
}
TRACE(_T("*******************************************\n"));
e->Delete();
}
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hello,
can i show the text underlinded in CListCtrl when the mouse is over a specified cell?
I know how to determine what cell is under the mousecursor,
but how to set font property to underlined?
Any idea how to do this?
thanks in advance
termal
|
|
|
|
|
|
Hello All,
I need to add a short cut icon to launch my custom application from
Start-->All Programs.
To elaborate, when I click on Start-->All Program,
I should be able to see the name of my applcation like many others already are (Microsoft Office etc.), clicking on icon should make me launch my application.I do not have any idea how to achieve this?
Please suggest.
Thanks and Regards.
Amarjeet.
|
|
|
|
|
|
Programmatically?
If yes...
SHGetSpecialFolderLocation() and SHGetPathFromIDList() can get you info on where to put shortcuts.
To create shortcuts, see Shell Links[^]
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi
i have got an VC++ application and when i try to open its solution file i get this message.
"The project 'abc.dsp' must be converted to the current Viusal C++ project format. After it has converted, you will not be able to edit this project in previous version of Visual Studio."
So that means it ws compiled in older version of VC++. Now if i convert it, i am able to compile the program but i am unable to step through the application.
To view the problem in detail pls visit my last post.
http://www.codeproject.com/script/comments/forums.asp?msg=2028885&forumid=1647&mode=all&userid=3708087#xx2028885xx
Thanks a lot
SS
|
|
|
|
|
in C, C++ we can execute DOS commands with system() at the time console window is appearing, i want to eliminate the console window while running the other programs
plz help me out
thanks in advance
vasu
|
|
|
|
|
See here.
"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
|
|
|
|
|
Try using system, _wsystem .
Regards,
Paresh.
|
|
|
|