|
Thank you very much!
It helped
Now I also used GetSaveFileName !
|
|
|
|
|
I've created a dialog with nothing special in it. I don't know why, but I continue to get the following errors:
error C2065: 'IDD_SORU' : undeclared identifier
error C2057: expected constant expression
All for the following line of code, which I did not write:
/ Dialog Data
enum { IDD = IDD_SORU };
</code>
I have rebuilt everything, even deleted the dialog and remade it. Any ideas?
If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|
|
Looks like IDD_SORU is not declared. This should be in your resource header file, its probably called resource.h
Visula Studio should have added a #define tot his file for IDD_CORU when you created the dialog. Its not unusual for Visual Studio to get confused with these things.
Open your resource.h file
At the bottom there is a line like the following
#define _APS_NEXT_RESOURCE_VALUE 348
Add a #define for IDD_SORU to the resource.h file
use the number from the _APS_NEXT_RESOURCE_VALUE line and increment _APS_NEXT_RESOURCE_VALUE
so in this example you would add the following line
#define IDD_SORU 348
and modify this line
#define _APS_NEXT_RESOURCE_VALUE 349
Hope that helps
|
|
|
|
|
Thanks for the help!
It seems that it is already defined in the resource.h file. It is defined as 132 and the _APS_NEXT_RESOURCE_VALUE is defined as 133. Should I simply delete the entire dialog and try again?
If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|
|
That will probably work.
It could be a problem with the pre-compiled headers. Try a rebuild all. Also check that the resource.h is included in the dialog header file
|
|
|
|
|
Platform: Win2k / Visual Studio 6.0, all service packs
I'm writing an AppWizard, using the builtin appwizard generator and I have problems loading / using bitmaps in my dialogs.
I'm importing a bmp and insert them into one of my dialog resources (IDD_CUSTOM1) as a picture control, using the resource / dialog editor.
The picture appears in the resource editor, but does not appear when running it through VS6.0, there are no error messages.
Anyone seen this problem and know the solution?
- Jo
|
|
|
|
|
Hello,
When the selection of my tree control changes I would like to get the item icon index, I have this code:
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;<br />
int iImage=pNMTreeView->itemNew.iImage;
However, the value of iImage is something like 1242756 or -86040328 (if I use a more indirect method). In fact, the entire NVITEM structure seems to have wrong values (the pszText member has jibberish).
I've also tried this:
TVITEM item;<br />
item.hItem=m_TreeCtrlName.GetSelectedItem();<br />
int iImage=item.iImage
Which will return a different, incorrect value. The GetImageCount from the TreeCtrl's ImageList returns the correct value though. Any idea of what I'm doing wrong?
Thanks,
Aaron Stubbendieck
modified 12-Jul-20 21:01pm.
|
|
|
|
|
Aaron Stubbendieck wrote:
When the selection of my tree control changes I would like to get the item icon index, I have this code:
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
int iImage=pNMTreeView->itemNew.iImage;
However, the value of iImage is something like 1242756 or -86040328 (if I use a more indirect method). In fact, the entire NVITEM structure seems to have wrong values (the pszText member has jibberish).
According to MSDN, only the mask, hItem, state, and lParam members of TVITEM structure are valid. You should check the mask bits to ensure the member you want is valid before you try to accesss it.
That said, you can use CTreeCtrl::GetItemImage() to get the image from the hItem member of the TVITEM structure.
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
TVITEM tvnew = pNMTreeView->itemNew;
int iImage = 0;
if (tvnew.mask & TVIF_HANDLE == TVIF_HANDLE)
{
int selimage;
GetItemImage(tvnew.hItem, iImage, selimage);
}
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Ah, thank you for pointing out that those members weren't valid, and I'm not sure how I over looked GetItemImage. Its working perfectly now.
modified 12-Jul-20 21:01pm.
|
|
|
|
|
how to add two different projects .in a single project and to call each other or how to call functions of each other
|
|
|
|
|
U can just import the corresponding files which has ur functions.
Shanmuga Sundar.V
|
|
|
|
|
Hello!
I've created a MFC dialog-based project without context-sensitive help. When I now press F1 a window pops up telling me that the help file hasn't been found.
How can I disable this feature?
I've searched MSDN and found that the function CWinApp::OnHelp is called... Should I override this function?
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)
|
|
|
|
|
Dominik Reichl wrote:
CWinApp::OnHelp is called... Should I override this function
Close, but not quite. What I do is simply comment out the the line in your application class' message map that calls CWinApp::OnHelp
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
I've created a dialog-based project without context-sensitive help. That line doesn't exist in my message map, neither in the CWinApp class nor in the main dialog class.
Now?
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)
|
|
|
|
|
Oh oh... it actually does exist... I've overseen it
Sorry, problem solved, thanks!
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 (probably) a very naive question, but I haven't done this before !!
I have just downloaded the Progress Dialog project from this website. However, having unzipped the package, I cannot find any project workspace file and therefore can't build the project. The only clue seems to be in the .dsp file which contains the following text:
# Microsoft Developer Studio Project File - Name="IProgDlg" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=IProgDlg - Win32 Debug Unicode
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "IProgDlg.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "IProgDlg.mak" CFG="IProgDlg - Win32 Debug Unicode"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "IProgDlg - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "IProgDlg - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE "IProgDlg - Win32 Release Unicode" (based on "Win32 (x86) Application")
!MESSAGE "IProgDlg - Win32 Debug Unicode" (based on "Win32 (x86) Application")
!MESSAGE
I don't understand where I find the "Export Makefile" command that it mentions.
Also, I am only running VC++ Ver. 4.0 and I see that Version 6.00 is mentioned above - is this a problem ??
Any help would be greatly appreciated
Doug
|
|
|
|
|
|
How can I stablish height for rows in a CListCtrl ??
Thx.
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
One solution is to derive a class from CListCtrl and do custom draw. Check out CodeProject code section for examples.
Kuphryn
|
|
|
|
|
I knew that I had to do it through owner draw but I didn't know how, now I found that article that explains it. Thank you very much !!
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
there seems to b some problem here, i have installed the library and i am trying to run a sample code for it. The program compiles successfully but it gives me the unresolved external symbol error and i have set all the include files and libraries in the project settings.
unresolved external symbol _cvLoadImage
any comments?
|
|
|
|
|
hi there
i have a project in visual c++ 7, with a main.cpp file, and 5 header files used by the main file. how do i get the compiler to generate a .obj file for each header file on the project?? right now it is creating just one for the entire project...
Thanks
|
|
|
|
|
.obj files (called object files) are generated from .cpp files (source files), not .h files (header files). Header files are used to share declarations between two or more .cpp files. Here's an example header file, ClassA.h :
class ClassA {
public:
ClassA();
~ClassA();
int A;
}; and the corresponding source file, ClassA.cpp
#include "ClassA.h"
ClassA::ClassA()
: A(0)
{
};
ClassA::~ClassA()
{
}; and the main program, Main.cpp
#include "ClassA.h"
int main(int argc,char *argv[])
{
ClassA An_A;
} From this example, there would be two object files, ClassA.obj and Main.obj . ClassA.h is #include 'd by both of them to ensure that they both agree on the declaration of ClassA .
Software Zen: delete this;
|
|
|
|
|
I have 2 sliderControls in my Application. One to control the system volume (SPK )and other the system mike (MIC).
When i slide any one of the Scroll bar the function HScroll is called. Here how do i distinguish between the SPK and MIC Sliders ??
Presently my HScroll is as below ---
void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
DWORD vol;
if (pScrollBar != NULL)
{
vol = ((CSliderCtrl *)pScrollBar)->GetPos();
Obj.SetVolume(vol); //This func implemented in another class
}
}
I am calling only my Speaker function.
|
|
|
|
|
The CScrollBar pointer passed to the handler can be cast to a CSliderCtrl pointer. Compare the HWND associated with this pointer to thos of your controls. This should allow you to determine which control was moved.
|
|
|
|