If I run GetSafeOwner(NULL,NULL) in a dialog, it returns a value. If from that dialog, I call a DLL with
someclass.myfunction(this,dialog), and in that DLL I call
where pParent is the value of "this"
pParent->GetSafeOwner(NULL,NULL); it returns a totally different value. I can fix it by...
I am designing a large application where I would like to have multiple processes called by the same menu program.
For simplicity, I think I want to use a different executable for each program.
My problem is that I want the windows of the called processes to always be on top of the menu, and...
I created a combo box, and then modified the declaration to a class derived from ComboBox that I intend to use to get the State portion of an address. (The derived class has only two extra functions, OnGetFocus to populate the box, and OnKillFocus to do some post processing.) I then imported...
Thanks stupidog. I found COXEdit from DUNDEE Software. It seems to work pretty well, are there any opinions out there of DUNDEE, or any other masked edit developer.
Rick
Is there an easy, built-in way to place separators in Edit Boxs for items such as dates and telephone numbers.
In other words, I would like for the edit to open with something like " - - ", and when the person enters data, each "-" stays in place, and the data flow around it.
Thanks in...
I found a solution; however, I have no idea why it works.
With the dialogs attached to the second and third tab, placing the following function in the Message Map works just fine.
virtual void OnOK(){};
Put in the dialog attached to the first tab, I had to declare the function in the message...
I have a TabControl that is working, for the most part, but whenever I press the ENTER key, the contents of the particular tab disappear. If I select another tab, then come back they re-appear.
I have tried WantReturn, and have tried
virtual void OnOK(){};
Neither seems to work...
I have downloaded a sample from MS. The directions state:
To build and run the CMNCTRL2 sample
Open the solution cmnctrl2.sln.
On the Build menu, click Build.
On the Debug menu, click Start Without Debugging.
If I open cmnctrl2.sln as a file, then Build is disabled, and it won't open as a...
We are in the process of building a large application where the user may have several dialogs, etc. open at one time. We don't want a modal dialog (ie. Yes, No, Cancel) to suspend operations on other dialogs, just the parent dialog.
It seems that we can substitute a non-modal dialog, and test...
I think that an appropriate thing to do here is simply change your fprintf(f,"%.2f",2000.0) function to sprintf(ss,"%.2f",2000.0), and then examine the contents of ss. Alternately, you could substitute a real file for NUL, and examine its contents. If you do, be sure to close the file, and...
You are absolutely correct. I can't explain starting at '1' other than a brain dump. I also can't believe that I looked at this code for hours and couldn't see the problem.
Oh well, a second, or in this case, third set of eyes.
Anyway, thanks a lot.
Rick
This was part of a large class, and included some SQL queries, so, for testing purposes, I simply created a dialog app, and placed this code in the OnOK() function, and commented out the exit code.
LVCOLUMN lvc;
LVITEM lvi;
int ii,blar;
int count;
char itembuff[51],itembuff1[51]...
/Per
Thanks, worked like a charm.
I am wondering why using the LVITEM structure wouldn't work. I had set mask to LVIF_TEXT and also ORed it with LVIF_IMAGE. Set the iItem to the line number, and iSubItem to 1. Also, pszText was set to an appropriate character array. I know that I have this...
I have a list control that I have set up a column 2 with a header. Everything works just fine except that the data for column 2 doesn't populate. No errors, just not there.
Any Ideas????
iSubItem is set to 1.
Thanks, Rick
I am from the Unix Environment so have absolutely no experience with Windows and DLLs.
I read somewhere that static variable behave improperly in DLLs because of the shared nature of the DLL. Yet, accroding to Microsoft, each time a process attaches to a DLL, the DLL creates a separate data...
The following code works appropriately. I am not certain what is happening with you.
#include "stdafx.h"
int main(int argc, char* argv[])
{
FILE *inf;
int ii;
inf=fopen("NUL","wt");
if(inf){
ii=fprintf(inf,"%d",4);
fclose(inf);
}else ii=999;
printf("%d\n",ii);
return 0;
}
Rick
ionutdinulescu
What return are you getting? When I execute that code, 1 is returned, as expected. If you are getting a (-1), then perhaps f has not been opened in a correct mode.
Rick
xwb:
Thanks for your reply.
I am constrained by the fact that we have well over a million lines of 'C' code that is all contained in static libraries on the SCO Unix OS.
I have no problem with the idea of using DLLs, but, as yet, I have only figured out how to do this by creating classes...
mbozza:
I can't find anything wrong with
// variable with file scope
DWORD* somePtr = (DWORD*) 0x00123ABC;
void someFunction(void)
{
somePtr++; //crashes program
}
as a matter of fact it compiles and works just fine on
my system.
On the other hand:
DWORD* temp = (DWORD*)0x00123ABC...
Perfnurt:
Thanks for taking the time to answer.
There seem to be two considerations driving this train: 1. It seems to be the "Windows" thing to do, and 2. It should ultimately save some space. The folks who use our application are heavily regulated by the US Govt, and depending on what types...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.