Click here to Skip to main content
15,921,884 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to set CFileDialog file filter control (cmb1) ? Pin
Osborn28-Jul-08 5:11
Osborn28-Jul-08 5:11 
GeneralRe: How to set CFileDialog file filter control (cmb1) ? Pin
Iain Clarke, Warrior Programmer28-Jul-08 5:29
Iain Clarke, Warrior Programmer28-Jul-08 5:29 
GeneralRe: How to set CFileDialog file filter control (cmb1) ? Pin
Osborn28-Jul-08 5:44
Osborn28-Jul-08 5:44 
GeneralRe: How to set CFileDialog file filter control (cmb1) ? Pin
Osborn30-Jul-08 3:45
Osborn30-Jul-08 3:45 
QuestionC2373:redefinition; different type modifiers Pin
zahrak28-Jul-08 4:14
zahrak28-Jul-08 4:14 
QuestionTranslating C# structure to C++ Pin
__DanC__28-Jul-08 4:08
__DanC__28-Jul-08 4:08 
AnswerRe: Translating C# structure to C++ Pin
Luc Pattyn28-Jul-08 4:21
sitebuilderLuc Pattyn28-Jul-08 4:21 
GeneralRe: Translating C# structure to C++ Pin
Matthew Faithfull28-Jul-08 4:21
Matthew Faithfull28-Jul-08 4:21 
At a guess I'd day you need two shorts for your string lengths or possibly even two BYTEs. If C# strings are a development of BSTRs then I doubt the string lengths will be as much as the 4 bytes you get with an int. 4GB long strings are really not what MS want to be supporting I guess. The other thing is you need the character data itself effectively in the structure rather than pointers to the characters (LPCTSTR).
You want something like this.

<br />
struct MyData<br />
{<br />
  int val1;<br />
  int val2;<br />
  unsigned short strLength1;<br />
  TCHAR string1[strLength1];<br />
  unsigned short strLength2;<br />
  TCHAR string2[strLength2];<br />
};<br />


but of course you can't do that directly as strLength1 and strLength2 are not known at compile time. This means you're likely going to have to use some form of serialization/deserilaization rather then just passing a structure unless you can use fixed length strings.

"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)

GeneralRe: Translating C# structure to C++ Pin
__DanC__28-Jul-08 4:34
__DanC__28-Jul-08 4:34 
GeneralRe: Translating C# structure to C++ Pin
Matthew Faithfull28-Jul-08 4:49
Matthew Faithfull28-Jul-08 4:49 
GeneralRe: Translating C# structure to C++ Pin
__DanC__28-Jul-08 6:33
__DanC__28-Jul-08 6:33 
GeneralRe: Translating C# structure to C++ Pin
Mark Salsbery28-Jul-08 7:19
Mark Salsbery28-Jul-08 7:19 
QuestionShadow after using CFiledialog in the dialog Pin
bhanu_850928-Jul-08 3:44
bhanu_850928-Jul-08 3:44 
AnswerRe: Shadow after using CFiledialog in the dialog Pin
bhanu_850928-Jul-08 4:55
bhanu_850928-Jul-08 4:55 
AnswerRe: Shadow after using CFiledialog in the dialog Pin
Rajesh R Subramanian28-Jul-08 5:31
professionalRajesh R Subramanian28-Jul-08 5:31 
AnswerRe: Shadow after using CFiledialog in the dialog Pin
Mark Salsbery28-Jul-08 7:27
Mark Salsbery28-Jul-08 7:27 
AnswerRe: Shadow after using CFiledialog in the dialog Pin
shivareaj7-Oct-12 23:17
shivareaj7-Oct-12 23:17 
Questionconverting char* into BYTE* Pin
subramanyeswari28-Jul-08 3:17
subramanyeswari28-Jul-08 3:17 
AnswerRe: converting char* into BYTE* Pin
CPallini28-Jul-08 3:22
mveCPallini28-Jul-08 3:22 
GeneralRe: converting char* into BYTE* Pin
toxcct28-Jul-08 3:33
toxcct28-Jul-08 3:33 
GeneralRe: converting char* into BYTE* Pin
VaDa Um Uie28-Jul-08 3:45
VaDa Um Uie28-Jul-08 3:45 
GeneralRe: converting char* into BYTE* Pin
toxcct28-Jul-08 3:50
toxcct28-Jul-08 3:50 
GeneralRe: converting char* into BYTE* Pin
VaDa Um Uie28-Jul-08 3:52
VaDa Um Uie28-Jul-08 3:52 
GeneralRe: converting char* into BYTE* Pin
CPallini28-Jul-08 7:20
mveCPallini28-Jul-08 7:20 
GeneralRe: converting char* into BYTE* Pin
toxcct28-Jul-08 9:04
toxcct28-Jul-08 9:04 

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.