|
Dylan Kenneally wrote:
but the dialogs title is set to my new string resource.
So what are you expecting to happen?
Dylan Kenneally wrote:
...is there some significance to these resource ID's?Depending on where the insertion point was when you inserted a new String Table item, the ID will be in a different range. I've never used IDs past the 32000 range.
|
|
|
|
|
hi,
I am working on an application to control the printers. I m getting a problem when i use SetDefaultPrinter in VC it gives me error of undeclared identifier i have included the header files. other function related to printers like OpenPrinter, GetPrinter etc r working fine but this one is not working can anybody help me out plzzz its urgent
take care
contact me at Jaffer_mumtaz@yahoo.com
|
|
|
|
|
It's a new functions only available on NT machines. In order for the compiler to see the function, you have to define WINVER to 0x500.
Joel Lucsy
|
|
|
|
|
Hi Joel
Thnx for replying early.
I m working on windows 2000 plzz can u guide me a little more on it.I desperately need the function to work on my machine. what i need to do in the code inorder to use that code.
take care
|
|
|
|
|
You have to include < winspool.h > in the cpp-file where you use it, you have to link against winspool.lib, and you have to read MSDN! Its all in there!
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
put the line:
#define WINVER 0x0500
in you stdafx.h before any #include's
Joel Lucsy
|
|
|
|
|
Hi joel
I still get the same error undeclared identifier. as far as linking the the winspool.lib file plzz explain it a little more wht i have done is in the project settings of VC i have linked the winspool.lib file.
take care
One thing more when i chaged the version it gave the error
then after some time it started working but with the same error. i m using win 2000 professional edition.
any help will be appreciated alot
|
|
|
|
|
You probably need to get the latest PlatformSDK from Microsoft.
Joel Lucsy
|
|
|
|
|
Hi!
Has anyone a working source code for Bluetooth under Windows XP using the included Microsoft Bluetooth stack? I need to get it working for my thesis, since this is the last unsolved problem. Can anyone help?
Thanks!!!
|
|
|
|
|
Nowadays the GUIs created with Flash MX are well received.
I love the visual effects that are not easy to achieve
just with some knowledge of Windows API and MFC.
I am some conversant with Windows API and MFC, so want to
go on using them to implement many parts of programs, while
creating GUI with Flash.
How to interact with Flash "controls" from within MFC? To be more specific,
if I press a button in the Flash I like to make a MFC dialog
box such as AfxMessageBox("Hello") pop up. Likewise, if I am to put
a string in an edit box in the Flash?
I haven't set about learning Flash yet but hope
some advice posted here could guide me through a new
programming experience.
|
|
|
|
|
You can have links in html (flash) that send actions to your application.
For example you can have a html file with the following links:
Minimise.
Beep.
Unknown request.
You have to override the OnAppCmd from CViewHtml or CHtmlCtrl and do something like this:
void CHtmlCtrl::OnAppCmd(LPCTSTR lpszWhere)
{
if( _tcscmp( _T("Minimise"), lpszWhere )==0 )
{
AfxGetMainWnd()->ShowWindow( SW_MINIMIZE );
}
else if( _tcscmp( _T("Beep"), lpszWhere )==0 )
{
MessageBeep( MB_ICONASTERISK );
}
else
{
MessageBox( lpszWhere, _T("Unexpected Command"), MB_ICONQUESTION );
}
}
The OnAppCmd is called by OnBeforeNavigate2 when a link starts with "app:".
So you can put a link on your button that will be interpreted by your application.
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
I would like to share my knowledge on doc based and dialog based archtectures (many not be new - But can be interesting when there are more comments ....)
My understanding on the above is document based applications are maily for say, word/paint brush kind of applications and dialog based is generally used for say, take an input (port configure info) process them and show the results on the dialog box controls...
any comments?
|
|
|
|
|
I would say based on my experience writing and using many apps that your comments on what dialog-based app is used for is wrong.
Dialog apps can be used for anything MDI or SDI app is used for. The choice of UI is up to author, but decision to use dialog in no way limits what functionality is provided by app.
Best wishes,
Hans
|
|
|
|
|
Hans Dietrich wrote:
Dialog apps can be used for anything MDI or SDI app is used for.
But then you would have to do a lot of things yourself for which the Framework takes care with MDI/SDI.
But if you would have to tweak MFC anyway, you are probably better off using dialog based GUI. Anyway, you can do all stuff that the MFC doc/view provides also by hand.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Thaks Hans,
Yes I do agree with that... But in view of what visual studions AppWizard generates (I hadnt mentioned it earlier), We must have decided before hand, what kind of application we are goind to build (SDI/MDI/Dlg)...
Willy
|
|
|
|
|
Hi
Let's say i change 3 words of an rtf file
When i compile the .hlp file with Micr. Help Workshop i get the following error:
HC4002: Warning:
The RTF file c:\docume~1\jbrg\mydocu~1\testin~1\helpfi~1\hlp\.\showstring.rtf is corrupted at offset 309.
This only happens when i change the file and save it.
If i recompile the first unedited file, it compiles good without 'corrupted ..'. When i change a word in the file, i get that error. Anyone any ideas?
Does anyone know what the problem might be?
Greetings
Jens
|
|
|
|
|
Hello,
I have an MDI application and
I’m trying to create child window(s),
that could be move outside the main application area (CMDIFrameWnd).
Is it possible to do sth. like this?
Thanx for the help,
Hubert
|
|
|
|
|
Not with MDI. The MDI child windows are clipped within the MDI client.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Hi,
Could anybody please help me in mapping between EMF version and Windows version? I need to prepare version of EMF used on various Windows platforms.
Thnaks in advance.
Regards,
-Shivpal
|
|
|
|
|
I use in c the following declaration
typedef struct
{
int x;
char *y;
}MYSTRUCT;
MYSTRUCT mystruct[] =
{
1,"xxxxxxxxx",
2,"YYYYYYYYY",
3,"CCCCCCCCC"
};
why it generate an error in mfc source ???
help me please???
thanks
|
|
|
|
|
I have no problem with this code... no error, no warning...
What's your error message?
Hello World!!!
from Raphaël
|
|
|
|
|
:(Dear Raphael,
I declared it , inside file header of generic class with other structures.
if i declare the struct inside file .cpp i not have the problem . Why ???
thank's
|
|
|
|
|
Wherever you use your struct, it must be known.
A header file with this definition that is included in any cpp where you use the struct would nornmaly suffice.
But when (in a third header) you make a variable of (instantiate) the struct, the compiler also needs to know it to reserve the right amount of space.
So maybe you need to include the header defining your struct there also.
Hope this helps.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
thanks for your help
Davide
|
|
|
|
|
MYSTRUCT mystruct[] =
{
{1,"xxxxxxxxx"},
{2,"YYYYYYYYY"},
{3,"CCCCCCCCC"}
};
Trust in the code Luke. Yea right!
|
|
|
|