structure alignmentHello,
I use VS .NET to compile my MFC applications.
It seems that structures are aligned in some way I can't understand.
For example:
struct {
int nCount; //4 bytes
bool active; //1 byte
char Str[13]; //13 bytes
}MyStruct;
I use 18 bytes, but doing a sizeof(MyStruct) returns 20 .
How does my compiler handle this?
And where are these 2 extra bytes added ?
thx
Structures are padded, by the compiler, to align with boundaries (even
number of bytes, in general). This improves performance, trying to match
the data size to a multiple of the compiler's native size. You need t...
BROWSEINFO STRUCTURECan we customize the button "Make New Folder" to "Create New Folder"
using the ulFlags BIF_NEWDIALOGSTYLE ?
you can install a hook function (specify it in BROWSEINFO) and use API to
access dialog controls on the folder select dialog.
<infinity@mail2dreamer.com> ????
news:1136887655.391484.198800@g47g2000cwa.googlegroups.com...
> Can we customize the button "Make New Folder" to "Create New Folder"
> using the ulFlags BIF_NEWDIALOGSTYLE ?
>
...
Template Wizard ProblemI have created a program in Excel to generate quarterly reports. The user
fills in a daily worksheet (a template) and adds the entry to a database
record. This worked fine a few days ago. However, I have been working on
the program in the past few days and now it does not work.
When I create an entry with the daily worksheet template and save, it should
ask me how to update the database. Instead, it now says 'The database
structure is different from the database structure support [sic] by the
template'. It will let me save and the update screen does come up after
that, but...
GP Table StructureI too am learning Crystal Report. Its clear that understanding GP tables is
key to writing Crystal Reports. It is also clear that comprehensive
information regarding GP Table Structure is very hard to come by. Is there a
textbook available that defines table names and inter relationships.
Ed,
Your best bet is the Microsoft Dynamics GP Software Development Kit (SDK)
documentation. Accolade Publications also publishes a set of useful titles
exclusively dedicated to explain in detail the flow of information and
posting ("Information Flow & Posting") and other tricks of th...
Array of structureHi Everybody
I have a small structure
Structure SkuInfo
Dim SkuNo As String
Dim Priority As Integer
End Structure
and Array
Dim arrSkus() As SkuInfo
Before adding next element to this array I want to make sure
that I do not have elements with the same SKUNO.
I am trying to use indexof, but do not know how to use it with array of
structures.
I realize I can use For... Next loop, but hope there is a better way to do
this.
Thanks in advance
"Leon" <Leon@discussions.microsoft.com> wrote in message
news:367DE46B-4CFF-4AED-A...
Outlook database structure
Hello,
Can someone tell me where I can find a description of the outloo
database tables? I mean which fields, datatype, etc etc ...
especially want the table in which the accounts are kept.
thx
-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com
found it, if anyone needs it ...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnout98/html/olexcoutlk.as
-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View a...
Visio 2007Is there a simple hook from Visio 2007 and an Active directory Environment to
do and export/import from AD to Visio.
I want to create a simple drwaing of my tree - Root - OU's etc..
Hello,
yes there is:
www.netdocad.com
--
Mit freundlichen Grüßen/ with kind regards
Senaj Lelic
DE MVP Visio
"Bhoros" <Bhoros@discussions.microsoft.com> schrieb im Newsbeitrag
news:84DA2C84-5934-45D1-A75D-5EC06163DCDD@microsoft.com...
> Is there a simple hook from Visio 2007 and an Active directory Environment
> to
> do and export/import from AD to Visio.
>
>...
About StructuresHi,
I am a having a bit of trouble with a structure.
I just declared the structure the same as the way as it is shown.
typedef struct tagSCROLLBARINFO {
DWORD cbSize;
RECT rcScrollBar;
int dxyLineButton;
int xyThumbTop;
int xyThumbBottom;
int reserved;
DWORD rgstate[CCHILDREN_SCROLLBAR+1];
} SCROLLBARINFO, *PSCROLLBARINFO, *LPSCROLLBARINFO;
Normally, I would do something like this...
SCROLLBARINFO ScrollInfo;
ScrollInfo.cbSize = sizeof(SCROLLBARINFO);
m_sbHorz.GetScrollBarInfo(&ScrollIn...
defining a structure in vc++hello,
I need to define a structure in vc++.I wanted to how it is possible
to define a structure whose variables are global
Well, define your structure and instant a global of it.
MyGobalStruc mgs;
mgs.v1 =
mgs.v2 =
etc
sayu wrote:
> hello,
> I need to define a structure in vc++.I wanted to how it is possible
> to define a structure whose variables are global
thanks,
but where should i write structure declarations,like what type of elements
it contatins
struct recrd
{
int n;
char c;
float f;
}if i want to insert this declaration in a class.how do i go about i...
Exception appears after changing project's directory structure (VSHi,
Problem synopsis:
I've recently tried to reorganize our project, by dividing our files into
various directories, instead of them all lying at the top-level directory.
After changing the project to mimic the new structure and fixing the
"Additional Include Directories" setting to point to all the new directories,
the project compiles. Yet now we get an exception thrown as the program
starts up. As can be seen below, it seems like the exception is thrown from
CArray (which is why I posted to this group), however it might just be that
the heap is out of memory, and when C...
Best Approach (psuedocode) for summing structure element valuesI'm dealing with an Excel worksheet which allow the user to enter
a values into a year/date column and an amount column. If the
user enters multiple years then I need to sum the values.
I thought this might be easier in VB so what I had in mind was:
1) Create two identical structures (type) of:
Type TWSInfo
thisYr As Integer
thisValue As Single
End type
Dim TThisWS(rowcount) as TWSInfo
Dim TThisSum(rowcount) As TWSInfo
2) Read in each Excel row into the structure
3) Sort the structure by Year
4) Loop the struct...
Tiered commission structureIs there a third party product that will allow tiered commission definitions
for salespersons.
My company has the following commission structure for salespeople:
0-250,000 - 1% commission
250,000-500,000 - 2% commission and so on.
The commissions are based on YTD sales and also on sales order size. If this
can be done through a workaround (anything but manually changing the % on the
order), I am interested in that.
Ethotech.Com
Check out their products - they have written somehting for calculating
commission - though, I've not used it.
...
Structure alignement problemHi all,
In my mfc application, in compiler settings i have changed struct member
alignment to 1 byte and this is working in debug mode. But when i tried to
do this in release mode of my application then i got following warning in
compilation of almost all the cpp files in release mode:
D:\arsalan\MyApplication\StdAfx.cpp(5) : warning C4653: compiler option
'structure packing (/Zp)' inconsistent with precompiled header; current
command-line option ignored
Compiling...
And thus my application in release mode is not working because i have some
structures which must be 1 byte ali...
Devmode Structure And Default Printer MarginI'm coding a function that will automatically take a
window and print it on a page. I'm also centering the
window on the page. I've noticed that there seems to be a
default margin of 3/16'' on my printer. I've also noticed
that I could override this margin by using the
OffsetViewportOrg method. My question is how can I
determine what the default margin is? I've looked at the
devmode structure, but I can't see where a default
printer margin is indicated.
Help would be appreciated.
Thanks
Ned
See if the following KB article helps you
http://...
BROWSEINFO: set (pre)selected pathHi together,
in C++.net I can do the following in a FolderBrowserDialog for the user
to change f.e. the workPath for an application:
FolderBrowserDialog* di=new FolderBrowserDialog();
di->RootFolder = Environment::SpecialFolder::Desktop;
di->SelectedPath=workPath;
In an MFC project I can do the following:
BROWSEINFO bi;
bi.pidlRoot = NULL; // set root to user's desktop
But I did not find any possibily to pre(select) the old workPath in then
structure:
typedef struct _browseinfo {
HWND hwndOwner;
LPCITEMIDLIST pidlRoot;
LPTSTR pszDisplayName;
LPCTSTR lpszTi...
directory structure xsl transformation questionI really have 2 questions regarding the following xml snippet. The xml is a
directory representation.
<?xml version="1.0" standalone="yes"?>
<FileSystem>
<Row>
<ID>1</ID>
<Name>Root</Name>
<Directory>Root</Directory>
<Dir>true</Dir>
<ParentID>0</ParentID>
</Row>
<Row>
<ID>2</ID>
<Name>c:\temp\boot\windowsapplication1\bin</Name>
<Directory>c:\temp\boot\windowsapplication1\bin</Directory>
<Dir>true<...
structures and pointersi have a structure
typedef struct tm
{
int date;
int hour;
int minutes;
} time;
i want to use this structure dynamically, ie, i want it to grow.
like it would be
time *sept= new time;
sept->date=15;
......
.........
.......
but i want something like
for(int i=0;i<MAX;i++)
{
sept[i]->date=i+5;
}
i want to grow the structure dynamically, ie, the valur of MAX is
provided at runtime.
how can i do tht????
You can allocate an array like this:
time *pt = new time [arraysize];
and delete it with:
delete [] pt;
Growing the array is a little more difficult. An easier way would be to u...
BROWSEINFO --> How to Show only Show only Hard Disk Driveshi..
I need to browse only Hard drives (if there r C & D, only C drive and D
drive) in my dialog. I dont Know the details. If you now the details
please mail
me.And another thing is upon opening the drive it should display only
the Folders , and should not display Files
- Navin
Hello,
Looks like you might need to use GetLogicalDriveStrings() and
GetDriveType(). You can look them up in the MSDN help.
GetLogicalDriveStrings() is used to grab all the drives on the system, then
use GetDriveType() with your results which will output values like
DRIVE_REMOVABLE, DRIVE_REMOTE, DRIVE_...
where can i find file about KeServiceDescriptorTable structurei can`t find some detialed information about KeServiceDescriptorTable could
anyone give me a hand ?
Why would you want this? First the index of individual calls changes
often (depending on the OS even service packs have changed it). Second,
the main use for the data would be hooking which does not work on 64-bit
versions of the OS.
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
> -----Original Message-----
> From: ywd [mailto:ywd@discussions.microsoft.com]
> Posted ...
Image structuresI would like to learn more about icons and bitmaps. Specifically how to
read and write them to and from both device contexts and disk files. I
have found many examples that "extract" such images from files but they
lack the ability to write the images to disk.
Any help would be appreciated.
Thanks
"Mark F." <m7829@yahoo.com> wrote in message
news:2xY7d.6517$YT3.1461@fe2.texas.rr.com...
> I would like to learn more about icons and bitmaps. Specifically how to
> read and write them to and from both device contexts and disk files. I
> have found many exampl...
thread Could anyone help me with the correct code to pass a structure to a
worker thread. I would prefer to pass the "this" pointer, but I am not sure
how to include it in a struct declaration or how to initialize it. But the
main problem I am having is how to write the code after the structure has
been passed to the worker thread. How do you access the individual variables
of the struct in the worker thread?
void CThreadTestDlg::OnStart()
{
struct ThreadStruct
{
HWND hWnd;
long NumA;
unsigned short NumB;
unsigned short NumC;
};
ThreadStruct* threadinputs = new...
structured flowcharta structured flowchart for a program that calculates and displays the
commission amount for an employee. The user will enter the employee name and
sales amount. If the sales amount is greater than $1000, the employee will
receive a $100 commission; otherwise he will receive no commission.
sounds like somebody's homework assignment.
al
"John Smith's commission amount" <John Smith's commission
amount@discussions.microsoft.com> wrote in message
news:2093DAFA-759B-4E73-9FAF-B33AC9ABBF53@microsoft.com...
>a structured flowchart for a program that calculate...
converting tabular structures in a Word document into an actual table or reading data from the tabular structures using VBA codeI have a macro which can read the last cell/column of all tables in a
Word 2003/2007 document and store the data in an MS-Access table. But,
some Word documents have the data in structures like a table format
but are not actually tables. The structure looks like a table, but the
table borders are actually line connectors. These documents were
created by a software(VeryPDF PDF to Word converter) which converted
the PDF documents(the original format these documents were) into Word
documents.
1. Is there a way I can convert/replace the tabular structures with
actual tables in Word so t...
Organizational StructuresWe currently have a GP 7.5 setup that has a seperate database for each for
each company or business unit. We currently have over 40 databases.
Can we use Organizational Structures to go from this structure to one DB
that would hold all the companies and business units? Would we be restricted
by functional currency, i.e. would those entities that had different
functional currencies have to be in seperate DBs?
Would all entities using the Organizational Structure have to have to use
the same subledger processing options. That is, the same Sales Order
processing set up for example. Or wou...
Structure of MFCh
I would like to develop an MFC based application.I would like to know
1. Where & How do i declare the classes,structures i use
2.Do i have to create header files & .cpp classes as well as new user defined functions or can i
se the existing MFC based classes..& headers created automatically on selecting
DIALOG based appln
Check out these links...
http://devcentral.iftech.com/articles/MFC/default.php
http://www.codeguru.com/Cpp/Cpp/cpp_mfc/tutorials/article.php/c759
"CJ`" <anonymous@discussions.microsoft.com> wrote in message
news:C047C631-9E7F-4F1B-A2E1-E...