|
It is a bad design to assume that the dialog box owns the list control. Instead, send the message to the dialog and let it route it on to the control as it sees fit. This way the control can be changed without the calling routine needing to know the details.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hello,
i send the message to the main dialog box, and call the target funcion?!
::SendMessage(AfxGetApp()->GetMainWnd()->m_hWnd, WM_LISTCTR_MSG,0,(LPARAM)lpParam);
this works
With best regards
break;
|
|
|
|
|
hi!
i hav designed a menu. now i want that on clicking the menu item "import file", FileOpen dialog gets opened. what code to write for it and where.
could anybody help me.
thanx
|
|
|
|
|
Ru using MFC or SDK
if MFC then SDI or MDI,
I think u need to get hold on VC++
first .
get some good book
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
first map the function click of the menu with its IDC no and in its function write the following code :
CFileDialog fileDlg (FALSE, "txt", "*.txt",
0, ".txt", this);
fileDlg.DoModal();
see mdn for the explanation on the parameters
|
|
|
|
|
Hi,
After changing alot of code in my MFC application, it is no longer
opens up. Compile has no errors or warnings. It seems that the program
DOES load, but exit immediatly.
Any idea where to look for? Any idea where i can put a break point to
help me catch it? How to define an entry point?
|
|
|
|
|
If you have a dialog based app you could look into the InitInstance method and add a breakpoint where you call the DoModal method. If the problem is inside the dialog class then begin looking into OnInitDialog method.
Hope it helps,
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
I've put a breakpoint in that function.
Does not reach there.... debuger did not stop there.
|
|
|
|
|
Does it reach the constructor of the app?
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
|
press F10
u will go to
extern "C" int WINAPI
_tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow)
{
// call shared/exported WinMain
return AfxWinMain(hInstance, hPrevInstance, lpCmdLine, nCmdShow);
}
no press F10 again and then F11 to go to the defination of afxwinmain
check out the afxwinmain function in "Winmain.cpp" by pressing "F10"
find out from which function call the program exit
int AFXAPI AfxWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow)
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
No help.
Pressing f10 or f11 does not reach anywhere.
Again, it seems it starts (the layout of the VS changes) and it immediattly returns with return number 0xff.
|
|
|
|
|
Found my error. A simple bug in some other lib i used. But, i could find it after i added breakpoints to ALL the functions used in the solution.
Is there any simple way to debug an application from the first instruction?
|
|
|
|
|
Adding a breakpoint at the declaration of the global app object?
CYourApp theApp;
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Sorry
No idea regarding that
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Hi
I have a mfc application whose icon for EXE is the one comes default MFC icon. I want to change it by the one I have. I have *.ICO file and I want my EXE icon to be that file....
How to change it ?
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Try importing the ICO file into the 'Resource' view in the visual c++ program.
Make sure you remove the MFC default icon from that 'Resource' view.
|
|
|
|
|
Hi,
usually I replace the .ico file in the project's \res folder.
Regards
We can do no great things, only small things with great love. - Mother Theresa
|
|
|
|
|
hi,
I want to Enable/Disable Hardware devices mentioned above programatically using VC++.
|
|
|
|
|
Hello , I am new to MFC.
I am doing an application which involves database .
I want Tables list when I choose my .mdb file using CFileDialog .
and again ,when I press on Table , I want to retrive table
fields
I am using ODBC with MS Access databse
praveen
|
|
|
|
|
Check out this link:
http://www.codeproject.com/database/expressodl.asp
it's quite helpfull
|
|
|
|
|
Hi there!
I am using CxImage library to display images in different formats in a Picture Control(VC++).It works fine with other file formats but as soon as some TIF Image format comes it generates the following two error messages in a message box.
IT DISPLAYS THE IMAGE FINE IN PICTURE CONTROL but I DON'T WANT TO GET THOSE ERROR MESSAGES.
The error messages are as follows:
1)TIFF IMAGE:wrong data type 1 for "XML Packet";tag ignored
2)TIFF IMAGE:unkown field with tag 34665(0x8769) encountered
The piece of code at which these error messages in message box prompted is as under:
HBITMAP m_bitmap = NULL;
unsigned long fileFormat;
if(getFileExtension() == ".tif")
{
fileFormat = CXIMAGE_FORMAT_TIF;
}//End of if(getFileExtension() == ".tif")
else if(getFileExtension() == ".gif")
{
fileFormat = CXIMAGE_FORMAT_GIF;
}//End of else if(getFileExtension() == ".gif")
else if(getFileExtension()==".jpg")
{
fileFormat = CXIMAGE_FORMAT_JPG;
}//End of else if(getFileExtension()==".jpg")
//CxImage imageFile(fileToDisplay, CXIMAGE_FORMAT_JPG);
MessageBox("File Clicked = "+ fileToDisplay);
CxImage imageFile(fileToDisplay, fileFormat);
m_bitmap = imageFile.MakeBitmap(m_PicToDisplay.GetDC()->m_hDC);
m_PicToDisplay.SetBitmap(m_bitmap);
if (m_bitmap) DeleteObject(m_bitmap);
asifrogers
|
|
|
|
|
I need good article to understand c++ namespace
Thanx.
Regards
Rajesh
|
|
|
|
|
This is driving me crazy. My application is a MFC Dialog Based Window. I have a button that brings up another modeless Dialog Box with some other buttons and information. I cannot move the second Dialog completely out of the way of my first one, so I would like to be able to Click on the Frame of the first Dialog Box and have it appear on top of the Second one. I have tried a lot of different calls to no avail. Here are some or all of them. Can anyone help please.
void CSCSInfoDlg::OnLButtonUp(UINT nFlags, CPoint point)
{
CDialog::OnLButtonUp(nFlags, point);
SetWindowPos(&this->wndTop , 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
BringWindowToTop();
Invalidate();
UpdateWindow();
SendMessage(WS_MAXIMIZE, 0, 0);
if (m_pParseLog) // second window
m_pParseLog->SetWindowPos(&wndBottom, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
// ShowOwnedPopups(false);
SetFocus();
}
Bruce
|
|
|
|
|
Hi All,
i am somewht stuck up, i need a Timeline control in vc++ 6, similar to the
one we see in windows movie maker / macromedia flash (at the bottom of their
UI). any help / directions / pointers would be highly appreciated.
Thanx,
Vin@)$0.
|
|
|
|