Calling in the experts. What could cause this??? (Solved)

Started by Shooter, December 19, 2010, 06:09:49 AM

Previous topic - Next topic

WillASM

Quote from: Shooter on December 19, 2010, 07:05:59 PM
You stated that something was missing... was there something missing, or just something that was overlooked? I'm still not seeing the tab strip, or understanding as to WHY I'm not seeing the tab strip. Going from one environment to the other, I think I did a fair job of translating considering I'm new at this.

And by the way, I came to this forum in hopes of getting aid and help when I hit the brick wall of my limited knowledge, not to be ridiculed for my naivete. The last I'd seen of assembly language was just before Windows 95 rolled out, and the current help files are not complete. (B, D, W?? shouldn't that have been in the Win32 help file? And when an error returns, shouldn't there be some sort of explanation as to what 02 vs. 03 means? I miss the days of the QUE help books.)

-Shooter

Not trying to poke fun at you, honest! I was just hoping you would spot the error on your own.
More satisfaction that way. You are missing a comma...

INVOKE GetDlgItem,[hwnd],IDC_TAB1

This is very hard to spot, and Goasm will not give a warning or error message on this.
Add the comma and it will work just fine.

Don't give up you are really doing well! WillASM

Shooter

I don't know if you caught it, but I edited my original response. I was getting frustrated. For that I apologize.

I did catch it, finally, and made the change. The proggy works now, albeit the size of the controls seem way off (I used the exact sizes and placements found in the original MASM32 / RadASM 2.x example).

I went back and changed the sizes of the main dialog, the three tab dialogs, the static texts, and the textboxes, realigned them to match each other, etc, but when I run the program, on the first tab the alignment of the text box is indented somewhat. I've read elsewhere of others seeing a problem similar to this, but that was on some other languages' forums, not for assembly. I checked to make sure they're all Left:3, and they are. Strange.

-Shooter

And WilliASM, I do appreciate the guidance. I'm not looking for someone to fix my problems, just someone to point out 'the little things'.
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

WillASM

Quote from: Shooter on December 19, 2010, 07:28:12 PM
I don't know if you caught it, but I edited my original response. I was getting frustrated. For that I apologize.

I did catch it, finally, and made the change. The proggy works now, albeit the size of the controls seem way off (I used the exact sizes and placements found in the original MASM32 / RadASM 2.x example).

I went back and changed the sizes of the main dialog, the three tab dialogs, the static texts, and the textboxes, realigned them to match each other, etc, but when I run the program, on the first tab the alignment of the text box is indented somewhat. I've read elsewhere of others seeing a problem similar to this, but that was on some other languages' forums, not for assembly. I checked to make sure they're all Left:3, and they are. Strange.

-Shooter

And WilliASM, I do appreciate the guidance. I'm not looking for someone to fix my problems, just someone to point out 'the little things'.

Sorry, I posted before your edit was done. Glad to see you found it!
This is an error I have made myself so I know it can drive a person crazy trying to find it!!!
The size of the controls were way off here as well but that is easy enough to fix.

The alignment of the text box here seems ok? I have both the tab dialogs and the edit box's left value set to 3.
Check that and see if it helps..

Good luck, WillASM

Shooter

Yup, sure enough, the first tab's dialog was set to Left:10 (I'm gonna have to remember that one).  :toothy

After fixing that comma problem and getting everything sized right, I noticed that
A) The main dialog loses focus when switching tabs, and you have to manually click back on it to regain focus (not a major issue),
B) When I exit, there's an image of one of the tab dialogs left behind, which does go away when you click on it or anything else.

Here's an image of what I'm talking about:


This seems similar to that 'ghosting' problem I mentioned before.

-Shooter
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

WillASM

Quote from: Shooter on December 19, 2010, 07:55:30 PM
Yup, sure enough, the first tab's dialog was set to Left:10 (I'm gonna have to remember that one).  :toothy

After fixing that comma problem and getting everything sized right, I noticed that
A) The main dialog loses focus when switching tabs, and you have to manually click back on it to regain focus (not a major issue),
B) When I exit, there's an image of one of the tab dialogs left behind, which does go away when you click on it or anything else.

Here's an image of what I'm talking about:


This seems similar to that 'ghosting' problem I mentioned before.

-Shooter

Have not been able to fix the first problem a) yet...
For the second problem you can comment or just remove the following line...

;   invoke DefWindowProc,[hwnd],[uMsg],[wParam],[lParam]

It is not needed.

Have to leave for work soon but if you are still having problems later post your
updated code and I will look at it when I get home.

Keep on going, you are doing Great! WillASM

Shooter

Welp,
Removing the DefWindowProc fixed the first problem, and I added INVOKE SetFocus,[hwnd] to solve the second problem.

I think I can finally call this one a success! NICE!!!

Now on to retrieving a value from the system registry.

Thanks so much, WilliASM, especially for pointing out what was wrong with my code. I really appreciate it.

-Shooter
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

WillASM

Glad to have helped! SetFocus did work for me here too. Nice one!

WillASM