|
If the login dialog doesn't have a caption, it won't show in the taskbar. Could that be the problem?
Software Zen: delete this;
|
|
|
|
|
The dialog actually has a caption...
It has the following flags:
title, system menu, format: context menu, border: dialog border, 3D view, visible, no fail create, centered.
Any more ideas??
Thanks for your reply and 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)
|
|
|
|
|
I have same problem, all subdialogs of my dialog don't show in taskbar ... they are all normal CDialogs.
Maybe it could be solved by creating them with parent NULL, or DesktopWindow
|
|
|
|
|
Try a system menu. (Properties dialog of your dialog recource)
|
|
|
|
|
Hey I want to enlist local drives in combo box ...in similar way as in "Look in :" combo box of Search in Windows 2000 professional ....Does any one knows answer..?
Drushti
|
|
|
|
|
hi,
try this Code
Add A Button [OpenFolder]
Edit Box For display Selected File Path[IDC_EDIT_FILEPATH]
-----------------In OnOpenFolderClick function-----------
{
LPITEMIDLIST pidlRoot = NULL;
LPITEMIDLIST pidlSelected = NULL;
BROWSEINFO bi = {0};
LPMALLOC pMalloc = NULL;
TCHAR szDisplayName[MAX_PATH];
SHGetMalloc(&pMalloc);
pidlRoot = NULL;
bi.hwndOwner = m_hWnd;
bi.pidlRoot = pidlRoot;
bi.pszDisplayName = szDisplayName;
bi.lpszTitle = "Choose a folder";
bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT;
bi.lpfn = BrowseCallbackProc;
bi.lParam = 0;
pidlSelected = SHBrowseForFolder(&bi);
if(!pidlSelected)
return;
if(pidlRoot)
{
pMalloc->Free(pidlRoot);
}
pMalloc->Release();
SHGetPathFromIDList(pidlSelected,szDisplayName);
GetDlgItem(IDC_EDIT_FILEPATH)->SetWindowText(szDisplayName);
}
---------------------------------------
------add Below Code For Call Back Fuction. Above the function
-----------------------------------------------
CString g_csDefaultPath = "";
INT CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg,LPARAM lp, LPARAM pData)
{
TCHAR szDir[MAX_PATH];
strcpy(szDir,(LPSTR)(LPCSTR)g_csDefaultPath);
switch(uMsg)
{
case BFFM_INITIALIZED:
//if (GetCurrentDirectory(sizeof(szDir)/sizeof(TCHAR), szDir))
{
// WParam is TRUE since you are passing a path.
// It would be FALSE if you were passing a pidl.
SendMessage(hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)szDir);
}
break;
case BFFM_SELCHANGED:
// Set the status window to the currently selected path.
if (SHGetPathFromIDList((LPITEMIDLIST) lp ,szDir))
{
SendMessage(hwnd,BFFM_SETSTATUSTEXT,0,(LPARAM)szDir);
}
break;
}
return 0;
}
by
baijumax
|
|
|
|
|
|
Hi there,
I've created functions to implement a linked list.
I'll like to know how do i call the destructor in the main.
it has been defined as such in the clist class
cList::~cList()
{
node *tmp = head, *pred;
while(tmp != NULL)
{
pred = tmp;
tmp = tmp -> getNext();
delete pred;
}
delete head;
}
|
|
|
|
|
The destructor gets called automatically if the cList object isn't needed/referenced any more.
If you wish to explicitely call the destructor yourself, you could do something like this:
cList* pList = new cList();
delete pList;
_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)
|
|
|
|
|
Dominik Reichl wrote:
The destructor gets called automatically if the cList object isn't needed/referenced any more.
Hmm.. Too much Java there? If the object is created on the stack, its descructor is called when the object goes out of scope. If the object is created in the heap (with new keyword) its destructor is only called if you delete the object explicitly with delete operator.
|
|
|
|
|
thank you guys!
|
|
|
|
|
Of course, I meant that. Never call a new without a delete
_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)
|
|
|
|
|
ooooh ok!
thanks, dominik!
|
|
|
|
|
Hi all,
I want to know whether there are any c++/(preferably)c softwares or packages which r able to plot a graph for given values in real time.... (i.e if there is program which generates values, we have to plot a graph for tht values as and when each value is generated along with the previous values on the graph). The other thing tht i can say abt it is it must work like simulink in matlab, which is capable of real time monitoring and plotting of signals in matlab.
Anyone having any idea on those type of softwares or packages..plz lemme know...
thanks in advance,
Suman
|
|
|
|
|
Anyone have any code (or links to something like this) that can:
take a string of arguments and parse it into an array or individuals strings, just like what main( inat argc, char** argv) would get fed?
And this would have to support quotes, the works.
so you would feed it:
foo.exe -p "sissyphous and friends.txt" -b --extract-all -m=stuff
and you'd end up with a list like:
foo.exe,
-p,
sissyphous and friends.txt,
-b,
--extract-all,
-m=stuff
Thanks
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
|
Thanks there was one that looked close to what I wanted: Command line parser By Pavel Antonov. I'll have a look at his code - in the meantime I just went ahead and hacked something together.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
Here's my situation:
For various reasons, my program is only translated into English and Japanese, however, it is required to run under 8 different languages, defaulting to English if the language is not supported.
When I run my program on a Korean machine, the English text displays as expected, with no text being cut off, etc.
When I force my program to run in English on a Japanese machine, the English text also displays correctly.
However, when I run my program on a Simplified Chinese machine, the English text is cut off on certain screens. Even though the font is specified as FONT 8, "MS Sans Serif" , it looks like a different font is being used. The text appears larger, with more spacing between the characters.
What gives? Any tips/pointers to articles/knowledge to bestow?
Thanks!
Jon Sagara
"the good thing about hitting your head against a wall is when you stop"
-- l a u r e n's Web page
My Articles
|
|
|
|
|
|
having real time problem with scanning a bitmap image into a document
CDib dib;
CMainFrm::ScanNew()
{
CWinApp *pApp = AfxGetApp();
POSITION pos = pApp->GetFirstDocTemplatePosition();
CMultiDocTemplate *pTemp = (CMultiDocTemplate*)pApp- >GetNextDocTemplate(pos);
CTestDoc *pDoc = (CTestDoc*)pTemp->OpenDocumentFile(NULL);
if (pDoc)
{
scanimage();
}
}
this code calls the OnNewDocument()so the CNew Dialog creates a whole new set of problems.
CTestDoc::OnNewDocument()
{
CNew dlg;
int ret dlg.DoModal();
if (ret == IDOK)
{
CreateNewBitmap(dlg.blaW, dlg.blaH, dlg.blaBits);
{
}
ive tried everything I could think of to keep this from crashing but!
I try to create a new bitmap with the New menu then try to Aquire a scanned image there is a conflicted between the two because the upper calls the OnNewDocument()????????
Ive have also tried combined with OnScannedImage()
CMainFrm::OnNewFile()
{
CWinApp *pApp = AfxGetApp();
POSITION pos = pApp->GetFirstDocTemplatePosition();
CMultiDocTemplate *pTemp = (CMultiDocTemplate*)pApp- >GetNextDocTemplate(pos);
CTestDoc *pDoc = (CTestDoc*)pTemp->OpenDocumentFile(NULL);
if (pDoc)
{
scanimage();
}
}
but the client pops up before the settings take place.
Mr Confused
|
|
|
|
|
I think the problem has to do with the fact that the application framework hasn't completed the process of opening the document.
Try posting the ScanNew() command (to the view, not the mainframe) after the document's view has had a chance to initialize itself. Do this in the view's OnInitialUpdate() handler. You'll also need to move the scanning code from the mainframe to the view.
Hope this helps!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Since I am really new to VC++ I am having issues with arrays.
First I can't figure out how to create a 2 dimensional array {50*3} full of doubles. There are a ton of classes to do this and I think I have missed something simple in using CArray.
Second I need to figure out a means to pass this array to functions so that they can pass them back once they have done their thing.
Is there an easy way to do this that I am completely overlooking.
Can it be easily done with pointers?
|
|
|
|
|
Try this...
Just change the array or vector declarations to substitute double for int.
<code>
// ***************************************
// Example: Dynamic Multidimensional Array
// ***************************************
// We want both array dimensions to be allocated dynamically and
// to be able to reference an element as x[i][j]
// Here's how to do it...
// ***********
// MFC Version
// ***********
// Array of ints
typedef CArray <int, int> CIntArray;
// Array of arrays of ints
typedef CArray <CIntArray, CIntArray&> CMultiIntArray;
void TraceDynamicArray(const unsigned int rows, const unsigned int columns)
{
CMultiIntArray aTest;
// Allocate number of rows
aTest.SetSize( rows );
// For each row
for (int row = 0; row < aTest.GetSize(); row++)
{
// Allocate number of columns
aTest[row].SetSize( columns );
// For each column
for (int column = 0; column < aTest[row].GetSize(); column++)
{
// Assign a value
aTest [row] [column] = 10 * row + column;
// Trace it
afxDump << aTest [row] [column] << "\t";
}
afxDump << "\n";
}
}
// ****************************
// Standard C++ Library Version
// ****************************
// Array of arrays of ints
typedef vector<vector<int> > CMultiIntArray;
void TraceDynamicArray(const unsigned int rows, const unsigned int columns)
{
CMultiIntArray aTest;
// Allocate number of rows
aTest.resize( rows );
// For each row
for (int row = 0; row < aTest.size(); row++)
{
// Allocate number of columns
aTest[row].resize( columns );
// For each column
for (int column = 0; column < aTest[row].size(); column++)
{
// Assign a value
aTest [row] [column] = 10 * row + column;
// Trace it
cout << aTest [row] [column] << "\t";
}
cout << "\n";
}
}
// Example usage: Standard C++ Library version
int main(int argc, char* argv[])
{
TraceDynamicArray(3,5);
return 0;
}
// For rows = 3, columns = 5, produces output...
// 0 1 2 3 4
// 10 11 12 13 14
// 20 21 22 23 24
</code>
Kevin
|
|
|
|
|
void f1(double a[50][3])
{
for (int i = 0; i < 50; i++) {
for (int j = 0; j < 3; j++) {
a[i][j] = ...
}
}
}
double array1[50][3];
f1(array1); I take it this isn't what you meant?
Software Zen: delete this;
|
|
|
|
|
Hello,
I wish it were that simple, maybe it is and I am missing the big pictures.
I have my_array[i][xyz] == my_array[50][3] where xyz stores the x,y,z coordinates of points in 3d space, I use i to reference any particular point I want. I want to pass this array or another one like it into my function that does vector math on the array without changing it then return an arbitrary array that I can reassign to to already existing array that may be composed of velocities vectors.
I was also trying to figure out, can I pass the array into the function without passing in the entire array and the value for the element I wish to index. Can I do this somehow without creating an intermediate array which is passed into the function. Can it be done with pointers?
It seem like such a simple thing to do, but I can't get anything to work reasonably.
Thanks
David
|
|
|
|