Click here to Skip to main content
15,885,546 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MPEG-4 PinPopular
CPallini13-Apr-10 21:37
mveCPallini13-Apr-10 21:37 
GeneralRe: MPEG-4 Pin
ThatsAlok14-Apr-10 19:31
ThatsAlok14-Apr-10 19:31 
QuestionNeed information how to do screen scraping in windows using VC++/C++ Pin
John50213-Apr-10 20:55
John50213-Apr-10 20:55 
AnswerRe: Need information how to do screen scraping in windows using VC++/C++ Pin
Hadi Dayvary14-Apr-10 3:20
professionalHadi Dayvary14-Apr-10 3:20 
AnswerRe: Need information how to do screen scraping in windows using VC++/C++ Pin
ThatsAlok14-Apr-10 19:32
ThatsAlok14-Apr-10 19:32 
GeneralRe: Need information how to do screen scraping in windows using VC++/C++ Pin
John50220-Apr-10 3:41
John50220-Apr-10 3:41 
QuestionMoving controls within the dialog. Pin
shiv@nand13-Apr-10 19:41
shiv@nand13-Apr-10 19:41 
AnswerRe: Moving controls within the dialog. Pin
Emilio Garavaglia13-Apr-10 20:43
Emilio Garavaglia13-Apr-10 20:43 
First, commas, full-stops and semicolons has a meaning also in natural langage:
Your question can be:
"hi, I want to move A button control on mouse LButton down, with no Resize; position must be saved within the dialog.
How it can be done?
"
or
"hi I want to move button controls on mouse LButton down with no Resize and position. Must be saved within the dialog.
How it can be done?
"
And they are quite different questions.

Assuming the first, since a control is a window, just use MoveWindow (note: mouse coordinates are obtained in screen coordinates, while move window requires parent client coordinates, so do the proper translation with ScreenToClient).

I don't understand what you mean with "saved within the dialog": if you mean "saved within the dialog RESOURCE", then give a look to http://msdn.microsoft.com/en-us/library/ms648004(v=VS.85).aspx[^].
Consider also that, unless you are writing a "resource management tool", modifying the resource result in modifying the "exe", and this is not, in general, a good idea: what does it happen if multiple users attempt to to modify your "exe" if it is shared across a network?
It is better to save the control positions in a file stored in a user specific directory (you can get the path with SHGetFolderPath, giving CSIDL_APPDATA as a CSIDL) and, when loading the dialog, change the controls positions (again, with MoveWindow) accordingly to such file (if existent) before showing the dialog.

2 bugs found.
> recompile ...
65534 bugs found.
D'Oh! | :doh:


AnswerRe: Moving controls within the dialog. Pin
CPallini13-Apr-10 20:45
mveCPallini13-Apr-10 20:45 
AnswerRe: Moving controls within the dialog. Pin
Iain Clarke, Warrior Programmer13-Apr-10 20:55
Iain Clarke, Warrior Programmer13-Apr-10 20:55 
AnswerRe: Moving controls within the dialog. Pin
SandipG 13-Apr-10 21:00
SandipG 13-Apr-10 21:00 
QuestionHow do i change the column position of list view Pin
arun_pk13-Apr-10 19:23
arun_pk13-Apr-10 19:23 
AnswerRe: How do i change the column position of list view Pin
CPallini13-Apr-10 21:51
mveCPallini13-Apr-10 21:51 
AnswerRe: How do i change the column position of list view Pin
Niklas L13-Apr-10 22:19
Niklas L13-Apr-10 22:19 
GeneralRe: How do i change the column position of list view Pin
arun_pk13-Apr-10 23:15
arun_pk13-Apr-10 23:15 
Questionremove space for title at top of groupbox? Pin
permutations13-Apr-10 12:04
permutations13-Apr-10 12:04 
AnswerRe: remove space for title at top of groupbox? Pin
David Crow14-Apr-10 3:32
David Crow14-Apr-10 3:32 
GeneralRe: remove space for title at top of groupbox? Pin
permutations14-Apr-10 4:14
permutations14-Apr-10 4:14 
GeneralRe: remove space for title at top of groupbox? Pin
David Crow14-Apr-10 4:25
David Crow14-Apr-10 4:25 
QuestionWindows Explorer extension Pin
o m n i13-Apr-10 10:58
o m n i13-Apr-10 10:58 
AnswerRe: Windows Explorer extension Pin
«_Superman_»13-Apr-10 11:04
professional«_Superman_»13-Apr-10 11:04 
GeneralRe: Windows Explorer extension Pin
o m n i13-Apr-10 11:39
o m n i13-Apr-10 11:39 
QuestionVisual Studio 6.0 to Visual Studio 2008 Issue Pin
djcouture13-Apr-10 9:23
djcouture13-Apr-10 9:23 
AnswerRe: Visual Studio 6.0 to Visual Studio 2008 Issue Pin
Joe Woodbury13-Apr-10 9:38
professionalJoe Woodbury13-Apr-10 9:38 
GeneralRe: Visual Studio 6.0 to Visual Studio 2008 Issue Pin
djcouture13-Apr-10 10:23
djcouture13-Apr-10 10:23 

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.