Click here to Skip to main content
15,888,401 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CreateProcessAsUser Question Pin
Lucidation5-Jan-12 13:38
Lucidation5-Jan-12 13:38 
GeneralRe: CreateProcessAsUser Question Pin
Richard Andrew x645-Jan-12 13:45
professionalRichard Andrew x645-Jan-12 13:45 
GeneralRe: CreateProcessAsUser Question Pin
Lucidation6-Jan-12 12:25
Lucidation6-Jan-12 12:25 
GeneralRe: CreateProcessAsUser Question Pin
Richard Andrew x646-Jan-12 12:53
professionalRichard Andrew x646-Jan-12 12:53 
QuestionCommand Routing From CDialogBar to CMainFrame Pin
sdancer7530-Dec-11 9:41
sdancer7530-Dec-11 9:41 
SuggestionRe: Command Routing From CDialogBar to CMainFrame Pin
Randor 30-Dec-11 15:06
professional Randor 30-Dec-11 15:06 
QuestionIntializing a structure array to store SQL Results from a class Pin
jkirkerx30-Dec-11 7:15
professionaljkirkerx30-Dec-11 7:15 
AnswerRe: Intializing a structure array to store SQL Results from a class Pin
Code-o-mat30-Dec-11 8:30
Code-o-mat30-Dec-11 8:30 
turn your UA_Listbox struct into a class and add a constructor:
CSS
class UA_Listbox {
public:
  INT             iUserID;
  WCHAR           *szFirstName;
  WCHAR           *szLastName;
  WCHAR           *szAccountName;

  UA_Listbox() //Standard constructor, do the initialization of members here, like:
  : iUserID(0)
  , szFirstName(NULL)
  , szLaszName(NULL)
  , szAccountName(NULL)
  {
  }
} UA_LISTBOX;

If you mean, you want to initialize the items differently (so every item gets different values) then you won't be able to do it that way, you will need to have a pointer-array and add the items one-by-one, eg:
UA_Listbox **uaListBoxPtrArray;
...
uaListBoxPtrArray = new UA_ListBox*[dwCount];
for (DWORD i = 0; i < dwCount; i++)
{
  uaListBoxPtrArray[i] = new UA_Listbox;
  uaListBoxPtrArray[i]->iUserID = ...//initialize the members as you need to, maybe add a constructor
                                     //for passing the values...
}

You might try using std::vector too, like:
std::vector<UA_Listbox *> arListBox;
for (DWORD i = 0; i < dwCount; i++)
{
  arListBox.push_back(new UA_Lostbox(...));
}

> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<

GeneralRe: Intializing a structure array to store SQL Results from a class Pin
jkirkerx30-Dec-11 9:15
professionaljkirkerx30-Dec-11 9:15 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
Code-o-mat30-Dec-11 9:33
Code-o-mat30-Dec-11 9:33 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
jkirkerx30-Dec-11 10:01
professionaljkirkerx30-Dec-11 10:01 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
Code-o-mat30-Dec-11 10:06
Code-o-mat30-Dec-11 10:06 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
jkirkerx31-Dec-11 8:51
professionaljkirkerx31-Dec-11 8:51 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
Code-o-mat31-Dec-11 8:57
Code-o-mat31-Dec-11 8:57 
AnswerRe: Intializing a structure array to store SQL Results from a class Pin
jschell30-Dec-11 8:35
jschell30-Dec-11 8:35 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
jkirkerx30-Dec-11 9:22
professionaljkirkerx30-Dec-11 9:22 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
Vaclav_30-Dec-11 12:24
Vaclav_30-Dec-11 12:24 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
jkirkerx30-Dec-11 12:40
professionaljkirkerx30-Dec-11 12:40 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
jschell31-Dec-11 13:10
jschell31-Dec-11 13:10 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
jkirkerx31-Dec-11 13:14
professionaljkirkerx31-Dec-11 13:14 
QuestionUNIT how to convert int Pin
dlsyaim29-Dec-11 21:59
dlsyaim29-Dec-11 21:59 
AnswerRe: UNIT how to convert int Pin
_Flaviu29-Dec-11 22:03
_Flaviu29-Dec-11 22:03 
AnswerRe: UNIT how to convert int Pin
Richard MacCutchan29-Dec-11 22:09
mveRichard MacCutchan29-Dec-11 22:09 
GeneralRe: UNIT how to convert int Pin
dlsyaim29-Dec-11 22:26
dlsyaim29-Dec-11 22:26 
GeneralRe: UNIT how to convert int Pin
Richard MacCutchan29-Dec-11 22:51
mveRichard MacCutchan29-Dec-11 22:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.